Skip to content

Commit

Permalink
fix: Rename config name for enforced for public clients
Browse files Browse the repository at this point in the history
Signed-off-by: sawadashota <xiootas@gmail.com>
  • Loading branch information
sawadashota committed May 27, 2020
1 parent 12c1fa4 commit 3ca4b38
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
true
]
},
"enforced_public_clients": {
"enforced_for_public_clients": {
"type": "boolean",
"description": "Sets whether PKCE should be enforced for public clients.",
"examples": [
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ oauth2:
#
# Examples:
# - true
enforced_public_clients: true
enforced_for_public_clients: true


## secrets ##
Expand Down
4 changes: 2 additions & 2 deletions driver/configuration/provider_viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const (
ViperKeyAccessTokenStrategy = "strategies.access_token"
ViperKeySubjectIdentifierAlgorithmSalt = "oidc.subject_identifiers.pairwise.salt"
ViperKeyPKCEEnforced = "oauth2.pkce.enforced"
ViperKeyPKCEEnforcedPublicClients = "oauth2.pkce.enforced_public_clients"
ViperKeyPKCEEnforcedForPublicClients = "oauth2.pkce.enforced_for_public_clients"
ViperKeyLogLevel = "log.level"
)

Expand Down Expand Up @@ -444,5 +444,5 @@ func (v *ViperProvider) PKCEEnforced() bool {
}

func (v *ViperProvider) EnforcePKCEForPublicClients() bool {
return viperx.GetBool(v.l, ViperKeyPKCEEnforcedPublicClients, false, "OAUTH2_PKCE_ENFORCED_PUBLIC_CLIENTS")
return viperx.GetBool(v.l, ViperKeyPKCEEnforcedForPublicClients, false, "OAUTH2_PKCE_ENFORCED_FOR_PUBLIC_CLIENTS")
}
2 changes: 1 addition & 1 deletion internal/.hydra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ oauth2:
cost: 20
pkce:
enforced: true
enforced_public_clients: true
enforced_for_public_clients: true

secrets:
system:
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ oauth2:
# Set this to true if you want PKCE to be enforced for all clients.
enforced: false
# Set this to true if you want PKCE to be enforced for public clients.
enforced_public_clients: false
enforced_for_public_clients: false
session:
# store encrypted data in database, default true
encrypt_at_rest: true
Expand Down

0 comments on commit 3ca4b38

Please sign in to comment.