Skip to content

Commit

Permalink
fix: use snapshot in the refresh webhook test for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
sgal committed Jul 29, 2022
1 parent 6159ee1 commit 6508ceb
Show file tree
Hide file tree
Showing 19 changed files with 516 additions and 228 deletions.
4 changes: 2 additions & 2 deletions internal/httpclient-next/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ docs/JsonWebKeySetGeneratorRequest.md
docs/LoginRequest.md
docs/LogoutRequest.md
docs/MetadataApi.md
docs/OAuth2AccessRequest.md
docs/OAuth2Client.md
docs/OAuth2TokenIntrospection.md
docs/Oauth2TokenResponse.md
Expand All @@ -44,7 +45,6 @@ docs/RefreshTokenHookRequest.md
docs/RefreshTokenHookResponse.md
docs/RejectRequest.md
docs/RequestWasHandledResponse.md
docs/Requester.md
docs/Session.md
docs/TrustJwtGrantIssuerBody.md
docs/TrustedJsonWebKey.md
Expand Down Expand Up @@ -78,6 +78,7 @@ model_json_web_key_set.go
model_json_web_key_set_generator_request.go
model_login_request.go
model_logout_request.go
model_o_auth2_access_request.go
model_o_auth2_client.go
model_o_auth2_token_introspection.go
model_oauth2_token_response.go
Expand All @@ -89,7 +90,6 @@ model_refresh_token_hook_request.go
model_refresh_token_hook_response.go
model_reject_request.go
model_request_was_handled_response.go
model_requester.go
model_session.go
model_trust_jwt_grant_issuer_body.go
model_trusted_json_web_key.go
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ All URIs are relative to _http://localhost_
- [JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md)
- [LoginRequest](docs/LoginRequest.md)
- [LogoutRequest](docs/LogoutRequest.md)
- [OAuth2AccessRequest](docs/OAuth2AccessRequest.md)
- [OAuth2Client](docs/OAuth2Client.md)
- [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md)
- [Oauth2TokenResponse](docs/Oauth2TokenResponse.md)
Expand All @@ -172,7 +173,6 @@ All URIs are relative to _http://localhost_
- [RefreshTokenHookResponse](docs/RefreshTokenHookResponse.md)
- [RejectRequest](docs/RejectRequest.md)
- [RequestWasHandledResponse](docs/RequestWasHandledResponse.md)
- [Requester](docs/Requester.md)
- [Session](docs/Session.md)
- [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md)
- [TrustedJsonWebKey](docs/TrustedJsonWebKey.md)
Expand Down
52 changes: 26 additions & 26 deletions internal/httpclient-next/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3301,6 +3301,31 @@ components:
format: date-time
title: NullTime implements sql.NullTime functionality.
type: string
oAuth2AccessRequest:
properties:
client_id:
description: ClientID is the identifier of the OAuth 2.0 client.
type: string
grant_types:
description: GrantTypes is the requests grant types.
items:
type: string
type: array
granted_audience:
description:
GrantedAudience is the list of audiences granted to the OAuth 2.0
client.
items:
type: string
type: array
granted_scopes:
description:
GrantedScopes is the list of scopes granted to the OAuth 2.0 client.
items:
type: string
type: array
title: Requester is a token endpoint's request context.
type: object
oAuth2Client:
example:
metadata: "{}"
Expand Down Expand Up @@ -3917,7 +3942,7 @@ components:
type: string
type: array
requester:
$ref: "#/components/schemas/requester"
$ref: "#/components/schemas/oAuth2AccessRequest"
session:
$ref: "#/components/schemas/Session"
subject:
Expand Down Expand Up @@ -3976,31 +4001,6 @@ components:
The response payload sent when there is an attempt to access already
handled request.
type: object
requester:
properties:
client_id:
description: ClientID is the identifier of the OAuth 2.0 client.
type: string
grant_types:
description: GrantTypes is the requests grant types.
items:
type: string
type: array
granted_audience:
description:
GrantedAudience is the list of audiences granted to the OAuth 2.0
client.
items:
type: string
type: array
granted_scopes:
description:
GrantedScopes is the list of scopes granted to the OAuth 2.0 client.
items:
type: string
type: array
title: Requester is a token endpoint's request context.
type: object
trustJwtGrantIssuerBody:
properties:
allow_any_subject:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requester
# OAuth2AccessRequest

## Properties

Expand All @@ -11,122 +11,122 @@

## Methods

### NewRequester
### NewOAuth2AccessRequest

`func NewRequester() *Requester`
`func NewOAuth2AccessRequest() *OAuth2AccessRequest`

NewRequester instantiates a new Requester object This constructor will assign
default values to properties that have it defined, and makes sure properties
required by API are set, but the set of arguments will change when the set of
required properties is changed
NewOAuth2AccessRequest instantiates a new OAuth2AccessRequest object This
constructor will assign default values to properties that have it defined, and
makes sure properties required by API are set, but the set of arguments will
change when the set of required properties is changed

### NewRequesterWithDefaults
### NewOAuth2AccessRequestWithDefaults

`func NewRequesterWithDefaults() *Requester`
`func NewOAuth2AccessRequestWithDefaults() *OAuth2AccessRequest`

NewRequesterWithDefaults instantiates a new Requester object This constructor
will only assign default values to properties that have it defined, but it
doesn't guarantee that properties required by API are set
NewOAuth2AccessRequestWithDefaults instantiates a new OAuth2AccessRequest object
This constructor will only assign default values to properties that have it
defined, but it doesn't guarantee that properties required by API are set

### GetClientId

`func (o *Requester) GetClientId() string`
`func (o *OAuth2AccessRequest) GetClientId() string`

GetClientId returns the ClientId field if non-nil, zero value otherwise.

### GetClientIdOk

`func (o *Requester) GetClientIdOk() (*string, bool)`
`func (o *OAuth2AccessRequest) GetClientIdOk() (*string, bool)`

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

### SetClientId

`func (o *Requester) SetClientId(v string)`
`func (o *OAuth2AccessRequest) SetClientId(v string)`

SetClientId sets ClientId field to given value.

### HasClientId

`func (o *Requester) HasClientId() bool`
`func (o *OAuth2AccessRequest) HasClientId() bool`

HasClientId returns a boolean if a field has been set.

### GetGrantTypes

`func (o *Requester) GetGrantTypes() []string`
`func (o *OAuth2AccessRequest) GetGrantTypes() []string`

GetGrantTypes returns the GrantTypes field if non-nil, zero value otherwise.

### GetGrantTypesOk

`func (o *Requester) GetGrantTypesOk() (*[]string, bool)`
`func (o *OAuth2AccessRequest) GetGrantTypesOk() (*[]string, bool)`

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

### SetGrantTypes

`func (o *Requester) SetGrantTypes(v []string)`
`func (o *OAuth2AccessRequest) SetGrantTypes(v []string)`

SetGrantTypes sets GrantTypes field to given value.

### HasGrantTypes

`func (o *Requester) HasGrantTypes() bool`
`func (o *OAuth2AccessRequest) HasGrantTypes() bool`

HasGrantTypes returns a boolean if a field has been set.

### GetGrantedAudience

`func (o *Requester) GetGrantedAudience() []string`
`func (o *OAuth2AccessRequest) GetGrantedAudience() []string`

GetGrantedAudience returns the GrantedAudience field if non-nil, zero value
otherwise.

### GetGrantedAudienceOk

`func (o *Requester) GetGrantedAudienceOk() (*[]string, bool)`
`func (o *OAuth2AccessRequest) GetGrantedAudienceOk() (*[]string, bool)`

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

### SetGrantedAudience

`func (o *Requester) SetGrantedAudience(v []string)`
`func (o *OAuth2AccessRequest) SetGrantedAudience(v []string)`

SetGrantedAudience sets GrantedAudience field to given value.

### HasGrantedAudience

`func (o *Requester) HasGrantedAudience() bool`
`func (o *OAuth2AccessRequest) HasGrantedAudience() bool`

HasGrantedAudience returns a boolean if a field has been set.

### GetGrantedScopes

`func (o *Requester) GetGrantedScopes() []string`
`func (o *OAuth2AccessRequest) GetGrantedScopes() []string`

GetGrantedScopes returns the GrantedScopes field if non-nil, zero value
otherwise.

### GetGrantedScopesOk

`func (o *Requester) GetGrantedScopesOk() (*[]string, bool)`
`func (o *OAuth2AccessRequest) GetGrantedScopesOk() (*[]string, bool)`

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

### SetGrantedScopes

`func (o *Requester) SetGrantedScopes(v []string)`
`func (o *OAuth2AccessRequest) SetGrantedScopes(v []string)`

SetGrantedScopes sets GrantedScopes field to given value.

### HasGrantedScopes

`func (o *Requester) HasGrantedScopes() bool`
`func (o *OAuth2AccessRequest) HasGrantedScopes() bool`

HasGrantedScopes returns a boolean if a field has been set.

Expand Down
22 changes: 11 additions & 11 deletions internal/httpclient-next/docs/RefreshTokenHookRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## Properties

| Name | Type | Description | Notes |
| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | ---------- |
| **ClientId** | Pointer to **string** | ClientID is the identifier of the OAuth 2.0 client. | [optional] |
| **GrantedAudience** | Pointer to **[]string** | GrantedAudience is the list of audiences granted to the OAuth 2.0 client. | [optional] |
| **GrantedScopes** | Pointer to **[]string** | GrantedScopes is the list of scopes granted to the OAuth 2.0 client. | [optional] |
| **Requester** | Pointer to [**Requester**](Requester.md) | | [optional] |
| **Session** | Pointer to [**Session**](Session.md) | | [optional] |
| **Subject** | Pointer to **string** | Subject is the identifier of the authenticated end-user. | [optional] |
| Name | Type | Description | Notes |
| ------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------- | ---------- |
| **ClientId** | Pointer to **string** | ClientID is the identifier of the OAuth 2.0 client. | [optional] |
| **GrantedAudience** | Pointer to **[]string** | GrantedAudience is the list of audiences granted to the OAuth 2.0 client. | [optional] |
| **GrantedScopes** | Pointer to **[]string** | GrantedScopes is the list of scopes granted to the OAuth 2.0 client. | [optional] |
| **Requester** | Pointer to [**OAuth2AccessRequest**](OAuth2AccessRequest.md) | | [optional] |
| **Session** | Pointer to [**Session**](Session.md) | | [optional] |
| **Subject** | Pointer to **string** | Subject is the identifier of the authenticated end-user. | [optional] |

## Methods

Expand Down Expand Up @@ -110,20 +110,20 @@ HasGrantedScopes returns a boolean if a field has been set.

### GetRequester

`func (o *RefreshTokenHookRequest) GetRequester() Requester`
`func (o *RefreshTokenHookRequest) GetRequester() OAuth2AccessRequest`

GetRequester returns the Requester field if non-nil, zero value otherwise.

### GetRequesterOk

`func (o *RefreshTokenHookRequest) GetRequesterOk() (*Requester, bool)`
`func (o *RefreshTokenHookRequest) GetRequesterOk() (*OAuth2AccessRequest, bool)`

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

### SetRequester

`func (o *RefreshTokenHookRequest) SetRequester(v Requester)`
`func (o *RefreshTokenHookRequest) SetRequester(v OAuth2AccessRequest)`

SetRequester sets Requester field to given value.

Expand Down
Loading

0 comments on commit 6508ceb

Please sign in to comment.