Skip to content

Commit

Permalink
feat: add --skip-logout-consent flag to CLI (#3709)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jan 31, 2024
1 parent 4fa2889 commit f502d6e
Show file tree
Hide file tree
Showing 8 changed files with 355 additions and 0 deletions.
Expand Up @@ -16,6 +16,7 @@
],
"scope": "offline_access offline openid",
"skip_consent": false,
"skip_logout_consent": false,
"subject_type": "public",
"token_endpoint_auth_method": "client_secret_basic",
"tos_uri": "",
Expand Down
Expand Up @@ -22,6 +22,7 @@
],
"scope": "offline_access offline openid",
"skip_consent": false,
"skip_logout_consent": false,
"subject_type": "public",
"token_endpoint_auth_method": "client_secret_basic",
"tos_uri": "",
Expand Down
Expand Up @@ -22,6 +22,7 @@
],
"scope": "offline_access offline openid",
"skip_consent": false,
"skip_logout_consent": false,
"subject_type": "public",
"token_endpoint_auth_method": "client_secret_basic",
"tos_uri": "",
Expand Down
Expand Up @@ -16,6 +16,7 @@
],
"scope": "offline_access offline openid",
"skip_consent": false,
"skip_logout_consent": false,
"subject_type": "public",
"token_endpoint_auth_method": "client_secret_basic",
"tos_uri": "",
Expand Down
Expand Up @@ -16,6 +16,7 @@
],
"scope": "offline_access offline openid",
"skip_consent": false,
"skip_logout_consent": false,
"subject_type": "public",
"token_endpoint_auth_method": "client_secret_basic",
"tos_uri": "",
Expand Down
1 change: 1 addition & 0 deletions cmd/cmd_create_client.go
Expand Up @@ -39,6 +39,7 @@ const (
flagClientScope = "scope"
flagClientSectorIdentifierURI = "sector-identifier-uri"
flagClientSkipConsent = "skip-consent"
flagClientLogoutSkipConsent = "skip-logout-consent"
flagClientSubjectType = "subject-type"
flagClientTokenEndpointAuthMethod = "token-endpoint-auth-method"
flagClientSecret = "secret"
Expand Down
2 changes: 2 additions & 0 deletions cmd/cmd_helper_client.go
Expand Up @@ -41,6 +41,7 @@ func clientFromFlags(cmd *cobra.Command) hydra.OAuth2Client {
ResponseTypes: flagx.MustGetStringSlice(cmd, flagClientResponseType),
Scope: pointerx.String(strings.Join(flagx.MustGetStringSlice(cmd, flagClientScope), " ")),
SkipConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientSkipConsent)),
SkipLogoutConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientLogoutSkipConsent)),
SectorIdentifierUri: pointerx.String(flagx.MustGetString(cmd, flagClientSectorIdentifierURI)),
SubjectType: pointerx.String(flagx.MustGetString(cmd, flagClientSubjectType)),
TokenEndpointAuthMethod: pointerx.String(flagx.MustGetString(cmd, flagClientTokenEndpointAuthMethod)),
Expand Down Expand Up @@ -79,6 +80,7 @@ func registerClientFlags(flags *pflag.FlagSet) {
flags.String(flagClientName, "", "The client's name.")
flags.StringSlice(flagClientPostLogoutCallback, []string{}, "List of allowed URLs to be redirected to after a logout.")
flags.Bool(flagClientSkipConsent, false, "Boolean flag specifying whether to skip the consent screen for this client. If omitted, the default value is false.")
flags.Bool(flagClientLogoutSkipConsent, false, "Boolean flag specifying whether to skip the logout consent screen for this client. If omitted, the default value is false.")

// back-channel logout options
flags.Bool(flagClientBackChannelLogoutSessionRequired, false, "Boolean flag specifying whether the client requires that a sid (session ID) Claim be included in the Logout Token to identify the client session with the OP when the backchannel-logout-callback is used. If omitted, the default value is false.")
Expand Down
347 changes: 347 additions & 0 deletions internal/httpclient/go.sum

Large diffs are not rendered by default.

0 comments on commit f502d6e

Please sign in to comment.