feat: add --skip-logout-consent flag to CLI (#3709) · ory/hydra@f502d6e · GitHub
Skip to content

Commit f502d6e

Browse files
authored
feat: add --skip-logout-consent flag to CLI (#3709)
1 parent 4fa2889 commit f502d6e

8 files changed

Lines changed: 355 additions & 0 deletions

cmd/.snapshots/TestCreateClient-case=creates_successfully.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
],
1717
"scope": "offline_access offline openid",
1818
"skip_consent": false,
19+
"skip_logout_consent": false,
1920
"subject_type": "public",
2021
"token_endpoint_auth_method": "client_secret_basic",
2122
"tos_uri": "",

cmd/.snapshots/TestCreateClient-case=supports_encryption.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"scope": "offline_access offline openid",
2424
"skip_consent": false,
25+
"skip_logout_consent": false,
2526
"subject_type": "public",
2627
"token_endpoint_auth_method": "client_secret_basic",
2728
"tos_uri": "",

cmd/.snapshots/TestCreateClient-case=supports_setting_flags.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"scope": "offline_access offline openid",
2424
"skip_consent": false,
25+
"skip_logout_consent": false,
2526
"subject_type": "public",
2627
"token_endpoint_auth_method": "client_secret_basic",
2728
"tos_uri": "",

cmd/.snapshots/TestUpdateClient-case=creates_successfully.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
],
1717
"scope": "offline_access offline openid",
1818
"skip_consent": false,
19+
"skip_logout_consent": false,
1920
"subject_type": "public",
2021
"token_endpoint_auth_method": "client_secret_basic",
2122
"tos_uri": "",

cmd/.snapshots/TestUpdateClient-case=supports_encryption.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
],
1717
"scope": "offline_access offline openid",
1818
"skip_consent": false,
19+
"skip_logout_consent": false,
1920
"subject_type": "public",
2021
"token_endpoint_auth_method": "client_secret_basic",
2122
"tos_uri": "",

cmd/cmd_create_client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const (
3939
flagClientScope = "scope"
4040
flagClientSectorIdentifierURI = "sector-identifier-uri"
4141
flagClientSkipConsent = "skip-consent"
42+
flagClientLogoutSkipConsent = "skip-logout-consent"
4243
flagClientSubjectType = "subject-type"
4344
flagClientTokenEndpointAuthMethod = "token-endpoint-auth-method"
4445
flagClientSecret = "secret"

cmd/cmd_helper_client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func clientFromFlags(cmd *cobra.Command) hydra.OAuth2Client {
4141
ResponseTypes: flagx.MustGetStringSlice(cmd, flagClientResponseType),
4242
Scope: pointerx.String(strings.Join(flagx.MustGetStringSlice(cmd, flagClientScope), " ")),
4343
SkipConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientSkipConsent)),
44+
SkipLogoutConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientLogoutSkipConsent)),
4445
SectorIdentifierUri: pointerx.String(flagx.MustGetString(cmd, flagClientSectorIdentifierURI)),
4546
SubjectType: pointerx.String(flagx.MustGetString(cmd, flagClientSubjectType)),
4647
TokenEndpointAuthMethod: pointerx.String(flagx.MustGetString(cmd, flagClientTokenEndpointAuthMethod)),
@@ -79,6 +80,7 @@ func registerClientFlags(flags *pflag.FlagSet) {
7980
flags.String(flagClientName, "", "The client's name.")
8081
flags.StringSlice(flagClientPostLogoutCallback, []string{}, "List of allowed URLs to be redirected to after a logout.")
8182
flags.Bool(flagClientSkipConsent, false, "Boolean flag specifying whether to skip the consent screen for this client. If omitted, the default value is false.")
83+
flags.Bool(flagClientLogoutSkipConsent, false, "Boolean flag specifying whether to skip the logout consent screen for this client. If omitted, the default value is false.")
8284

8385
// back-channel logout options
8486
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.")

internal/httpclient/go.sum

Lines changed: 347 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)