Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --skip-consent flag to hydra cli #3492

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/cmd_create_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
flagClientResponseType = "response-type"
flagClientScope = "scope"
flagClientSectorIdentifierURI = "sector-identifier-uri"
flagClientSkipConsent = "skip-consent"
flagClientSubjectType = "subject-type"
flagClientTokenEndpointAuthMethod = "token-endpoint-auth-method"
flagClientSecret = "secret"
Expand Down
2 changes: 2 additions & 0 deletions cmd/cmd_helper_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func clientFromFlags(cmd *cobra.Command) hydra.OAuth2Client {
RequestUris: flagx.MustGetStringSlice(cmd, flagClientRequestURI),
ResponseTypes: flagx.MustGetStringSlice(cmd, flagClientResponseType),
Scope: pointerx.String(strings.Join(flagx.MustGetStringSlice(cmd, flagClientScope), " ")),
SkipConsent: pointerx.Bool(flagx.MustGetBool(cmd, flagClientSkipConsent)),
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 @@ -77,6 +78,7 @@ func registerClientFlags(flags *pflag.FlagSet) {
flags.String(flagClientSecret, "", "Provide the client's secret.")
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.")

// 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