Skip to content

Commit

Permalink
feat: improve openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Dec 13, 2024
1 parent 63736ba commit 073aaa4
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 393 deletions.
4 changes: 4 additions & 0 deletions .schema/openapi/patches/oauth2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@
description: "Specify a time duration in milliseconds, seconds, minutes, hours."
type: string
pattern: "^([0-9]+(ns|us|ms|s|m|h))*$"
- op: replace
path: /components/schemas/oAuth2Client/properties/jwks
value:
"$ref": "#/components/schemas/jsonWebKeySet"
226 changes: 211 additions & 15 deletions internal/httpclient/api/openapi.yaml

Large diffs are not rendered by default.

18 changes: 4 additions & 14 deletions internal/httpclient/docs/OAuth2Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Name | Type | Description | Notes
**GrantTypes** | Pointer to **[]string** | | [optional]
**ImplicitGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional]
**ImplicitGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional]
**Jwks** | Pointer to **interface{}** | OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. | [optional]
**Jwks** | Pointer to [**JsonWebKeySet**](JsonWebKeySet.md) | | [optional]
**JwksUri** | Pointer to **string** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional]
**JwtBearerGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional]
**LogoUri** | Pointer to **string** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional]
Expand Down Expand Up @@ -599,20 +599,20 @@ HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set.

### GetJwks

`func (o *OAuth2Client) GetJwks() interface{}`
`func (o *OAuth2Client) GetJwks() JsonWebKeySet`

GetJwks returns the Jwks field if non-nil, zero value otherwise.

### GetJwksOk

`func (o *OAuth2Client) GetJwksOk() (*interface{}, bool)`
`func (o *OAuth2Client) GetJwksOk() (*JsonWebKeySet, bool)`

GetJwksOk returns a tuple with the Jwks field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetJwks

`func (o *OAuth2Client) SetJwks(v interface{})`
`func (o *OAuth2Client) SetJwks(v JsonWebKeySet)`

SetJwks sets Jwks field to given value.

Expand All @@ -622,16 +622,6 @@ SetJwks sets Jwks field to given value.

HasJwks returns a boolean if a field has been set.

### SetJwksNil

`func (o *OAuth2Client) SetJwksNil(b bool)`

SetJwksNil sets the value for Jwks to be an explicit nil

### UnsetJwks
`func (o *OAuth2Client) UnsetJwks()`

UnsetJwks ensures that no value is present for Jwks, not even an explicit nil
### GetJwksUri

`func (o *OAuth2Client) GetJwksUri() string`
Expand Down
52 changes: 52 additions & 0 deletions internal/httpclient/docs/OAuth2LogoutRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Challenge** | Pointer to **string** | Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. | [optional]
**Client** | Pointer to [**OAuth2Client**](OAuth2Client.md) | | [optional]
**ExpiresAt** | Pointer to **time.Time** | | [optional]
**RequestUrl** | Pointer to **string** | RequestURL is the original Logout URL requested. | [optional]
**RequestedAt** | Pointer to **time.Time** | | [optional]
**RpInitiated** | Pointer to **bool** | RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. | [optional]
**Sid** | Pointer to **string** | SessionID is the login session ID that was requested to log out. | [optional]
**Subject** | Pointer to **string** | Subject is the user for whom the logout was request. | [optional]
Expand Down Expand Up @@ -80,6 +82,31 @@ SetClient sets Client field to given value.

HasClient returns a boolean if a field has been set.

### GetExpiresAt

`func (o *OAuth2LogoutRequest) GetExpiresAt() time.Time`

GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise.

### GetExpiresAtOk

`func (o *OAuth2LogoutRequest) GetExpiresAtOk() (*time.Time, bool)`

GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetExpiresAt

`func (o *OAuth2LogoutRequest) SetExpiresAt(v time.Time)`

SetExpiresAt sets ExpiresAt field to given value.

### HasExpiresAt

`func (o *OAuth2LogoutRequest) HasExpiresAt() bool`

HasExpiresAt returns a boolean if a field has been set.

### GetRequestUrl

`func (o *OAuth2LogoutRequest) GetRequestUrl() string`
Expand All @@ -105,6 +132,31 @@ SetRequestUrl sets RequestUrl field to given value.

HasRequestUrl returns a boolean if a field has been set.

### GetRequestedAt

`func (o *OAuth2LogoutRequest) GetRequestedAt() time.Time`

GetRequestedAt returns the RequestedAt field if non-nil, zero value otherwise.

### GetRequestedAtOk

`func (o *OAuth2LogoutRequest) GetRequestedAtOk() (*time.Time, bool)`

GetRequestedAtOk returns a tuple with the RequestedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetRequestedAt

`func (o *OAuth2LogoutRequest) SetRequestedAt(v time.Time)`

SetRequestedAt sets RequestedAt field to given value.

### HasRequestedAt

`func (o *OAuth2LogoutRequest) HasRequestedAt() bool`

HasRequestedAt returns a boolean if a field has been set.

### GetRpInitiated

`func (o *OAuth2LogoutRequest) GetRpInitiated() bool`
Expand Down
Loading

0 comments on commit 073aaa4

Please sign in to comment.