Skip to content

Commit

Permalink
fix: remove required mark (#3693)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jan 5, 2024
1 parent 4a8e9a4 commit 3a764a0
Show file tree
Hide file tree
Showing 7 changed files with 393 additions and 32 deletions.
4 changes: 0 additions & 4 deletions flow/consent_types.go
Expand Up @@ -471,13 +471,9 @@ type LoginRequest struct {
ID string `json:"challenge"`

// RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client.
//
// required: true
RequestedScope sqlxx.StringSliceJSONFormat `json:"requested_scope"`

// RequestedAudience contains the access token audience as requested by the OAuth 2.0 Client.
//
// required: true
RequestedAudience sqlxx.StringSliceJSONFormat `json:"requested_access_token_audience"`

// Skip, if true, implies that the client has requested the same scopes from the same user previously.
Expand Down
2 changes: 0 additions & 2 deletions internal/httpclient/api/openapi.yaml
Expand Up @@ -3463,8 +3463,6 @@ components:
- challenge
- client
- request_url
- requested_access_token_audience
- requested_scope
- skip
- subject
title: Contains information on an ongoing login request.
Expand Down
16 changes: 13 additions & 3 deletions internal/httpclient/docs/OAuth2LoginRequest.md
Expand Up @@ -8,8 +8,8 @@ Name | Type | Description | Notes
**Client** | [**OAuth2Client**](OAuth2Client.md) | |
**OidcContext** | Pointer to [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.md) | | [optional]
**RequestUrl** | **string** | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. |
**RequestedAccessTokenAudience** | **[]string** | |
**RequestedScope** | **[]string** | |
**RequestedAccessTokenAudience** | Pointer to **[]string** | | [optional]
**RequestedScope** | Pointer to **[]string** | | [optional]
**SessionId** | Pointer to **string** | SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional]
**Skip** | **bool** | Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. |
**Subject** | **string** | Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. |
Expand All @@ -18,7 +18,7 @@ Name | Type | Description | Notes

### NewOAuth2LoginRequest

`func NewOAuth2LoginRequest(challenge string, client OAuth2Client, requestUrl string, requestedAccessTokenAudience []string, requestedScope []string, skip bool, subject string, ) *OAuth2LoginRequest`
`func NewOAuth2LoginRequest(challenge string, client OAuth2Client, requestUrl string, skip bool, subject string, ) *OAuth2LoginRequest`

NewOAuth2LoginRequest instantiates a new OAuth2LoginRequest object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -137,6 +137,11 @@ and a boolean to check if the value has been set.

SetRequestedAccessTokenAudience sets RequestedAccessTokenAudience field to given value.

### HasRequestedAccessTokenAudience

`func (o *OAuth2LoginRequest) HasRequestedAccessTokenAudience() bool`

HasRequestedAccessTokenAudience returns a boolean if a field has been set.

### GetRequestedScope

Expand All @@ -157,6 +162,11 @@ and a boolean to check if the value has been set.

SetRequestedScope sets RequestedScope field to given value.

### HasRequestedScope

`func (o *OAuth2LoginRequest) HasRequestedScope() bool`

HasRequestedScope returns a boolean if a field has been set.

### GetSessionId

Expand Down

0 comments on commit 3a764a0

Please sign in to comment.