Skip to content

Commit 0e3f7d7

Browse files
authored
fix: omit empty ClientSecret from DCR response (#38)
1 parent 3b8b9fd commit 0e3f7d7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/who-am-i/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ authorization:
33
server: http://dex:5556/
44
authorizationProxyEnabled: true
55
serverMetadataProxyEnabled: true
6-
dynamicClientRegistrationEnabled: true
6+
dynamicClientRegistration:
7+
enabled: true
8+
publicClient: true
79
dexGRPCClient:
810
addr: dex:5557
911
proxy:

oauth/dynamic_client_registration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const DynamicClientRegistrationPath = "/oauth/register"
1818

1919
type ClientInformation struct {
2020
ClientID string `json:"client_id"`
21-
ClientSecret string `json:"client_secret"`
22-
ClientSecretExpiresAt int64 `json:"client_secret_expires_at"`
21+
ClientSecret string `json:"client_secret,omitempty"`
22+
ClientSecretExpiresAt int64 `json:"client_secret_expires_at,omitempty"`
2323
ClientName string `json:"client_name,omitempty"`
2424
RedirectURIs []string `json:"redirect_uris"`
2525
LogoURI string `json:"logo_uri,omitempty"`

0 commit comments

Comments
 (0)