Skip to content

Commit

Permalink
feat: add session and requester to refresh token webhook data (#3204)
Browse files Browse the repository at this point in the history
Closes #3203
  • Loading branch information
sgal authored Aug 1, 2022
1 parent b5af690 commit 6d23859
Show file tree
Hide file tree
Showing 34 changed files with 4,456 additions and 20 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ require (
github.com/ThalesIgnite/crypto11 v1.2.4
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/cenkalti/backoff/v3 v3.0.0
github.com/evanphx/json-patch v4.11.0+incompatible
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-openapi/errors v0.20.1
github.com/go-openapi/runtime v0.20.0
Expand Down Expand Up @@ -48,7 +47,7 @@ require (
github.com/oleiade/reflections v1.0.1
github.com/olekukonko/tablewriter v0.0.1
github.com/ory/analytics-go/v4 v4.0.3
github.com/ory/fosite v0.42.3-0.20220728130632-c3e0133cfed9
github.com/ory/fosite v0.42.3-0.20220729111320-05d71b23559c
github.com/ory/go-acc v0.2.8
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.9.13
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,8 @@ github.com/ory/dockertest/v3 v3.6.3/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/
github.com/ory/dockertest/v3 v3.8.1 h1:vU/8d1We4qIad2YM0kOwRVtnyue7ExvacPiw1yDm17g=
github.com/ory/dockertest/v3 v3.8.1/go.mod h1:wSRQ3wmkz+uSARYMk7kVJFDBGm8x5gSxIhI7NDc+BAQ=
github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0=
github.com/ory/fosite v0.42.3-0.20220728130632-c3e0133cfed9 h1:zynOHfotugrZchcWxs8R7fV2a/19X76Z56zB7Ll5SMw=
github.com/ory/fosite v0.42.3-0.20220728130632-c3e0133cfed9/go.mod h1:CR0cBDLr2rNDTNWmu5x9TeB7qt8KA668N/yZbej3FtE=
github.com/ory/fosite v0.42.3-0.20220729111320-05d71b23559c h1:PdO8dsl7FiQG+D+8wNQgr8uM3zGlKLMCvBh10LrlKKU=
github.com/ory/fosite v0.42.3-0.20220729111320-05d71b23559c/go.mod h1:CR0cBDLr2rNDTNWmu5x9TeB7qt8KA668N/yZbej3FtE=
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4=
github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw=
github.com/ory/go-acc v0.2.8 h1:rOHHAPQjf0u7eHFGWpiXK+gIu/e0GRSJNr9pDukdNC4=
Expand Down
10 changes: 10 additions & 0 deletions internal/httpclient-next/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ docs/AdminApi.md
docs/CompletedRequest.md
docs/ConsentRequest.md
docs/ConsentRequestSession.md
docs/DefaultSession.md
docs/FlushInactiveOAuth2TokensRequest.md
docs/FlushLoginConsentRequest.md
docs/GenericError.md
docs/Headers.md
docs/HealthNotReadyStatus.md
docs/HealthStatus.md
docs/IDTokenClaims.md
docs/InlineResponse200.md
docs/InlineResponse2001.md
docs/InlineResponse503.md
Expand All @@ -29,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 @@ -41,6 +45,7 @@ docs/RefreshTokenHookRequest.md
docs/RefreshTokenHookResponse.md
docs/RejectRequest.md
docs/RequestWasHandledResponse.md
docs/Session.md
docs/TrustJwtGrantIssuerBody.md
docs/TrustedJsonWebKey.md
docs/TrustedJwtGrantIssuer.md
Expand All @@ -56,11 +61,14 @@ model_accept_login_request.go
model_completed_request.go
model_consent_request.go
model_consent_request_session.go
model_default_session.go
model_flush_inactive_o_auth2_tokens_request.go
model_flush_login_consent_request.go
model_generic_error.go
model_headers.go
model_health_not_ready_status.go
model_health_status.go
model_id_token_claims.go
model_inline_response_200.go
model_inline_response_200_1.go
model_inline_response_503.go
Expand All @@ -70,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 @@ -81,6 +90,7 @@ model_refresh_token_hook_request.go
model_refresh_token_hook_response.go
model_reject_request.go
model_request_was_handled_response.go
model_session.go
model_trust_jwt_grant_issuer_body.go
model_trusted_json_web_key.go
model_trusted_jwt_grant_issuer.go
Expand Down
5 changes: 5 additions & 0 deletions internal/httpclient-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,14 @@ All URIs are relative to _http://localhost_
- [CompletedRequest](docs/CompletedRequest.md)
- [ConsentRequest](docs/ConsentRequest.md)
- [ConsentRequestSession](docs/ConsentRequestSession.md)
- [DefaultSession](docs/DefaultSession.md)
- [FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md)
- [FlushLoginConsentRequest](docs/FlushLoginConsentRequest.md)
- [GenericError](docs/GenericError.md)
- [Headers](docs/Headers.md)
- [HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
- [HealthStatus](docs/HealthStatus.md)
- [IDTokenClaims](docs/IDTokenClaims.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [InlineResponse2001](docs/InlineResponse2001.md)
- [InlineResponse503](docs/InlineResponse503.md)
Expand All @@ -158,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 @@ -169,6 +173,7 @@ All URIs are relative to _http://localhost_
- [RefreshTokenHookResponse](docs/RefreshTokenHookResponse.md)
- [RejectRequest](docs/RejectRequest.md)
- [RequestWasHandledResponse](docs/RequestWasHandledResponse.md)
- [Session](docs/Session.md)
- [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md)
- [TrustedJsonWebKey](docs/TrustedJsonWebKey.md)
- [TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md)
Expand Down
126 changes: 126 additions & 0 deletions internal/httpclient-next/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,72 @@ components:
type: array
description: A list of clients.
schemas:
DefaultSession:
description: IDTokenSession is a session container for the id token
properties:
expires_at:
additionalProperties:
format: date-time
type: string
type: object
headers:
$ref: "#/components/schemas/Headers"
id_token_claims:
$ref: "#/components/schemas/IDTokenClaims"
subject:
type: string
username:
type: string
type: object
Headers:
description: Headers is the jwt headers
properties:
extra:
additionalProperties: true
type: object
type: object
IDTokenClaims:
description:
IDTokenClaims represent the claims used in open id connect requests
properties:
acr:
type: string
amr:
items:
type: string
type: array
at_hash:
type: string
aud:
items:
type: string
type: array
auth_time:
format: date-time
type: string
c_hash:
type: string
exp:
format: date-time
type: string
ext:
additionalProperties: true
type: object
iat:
format: date-time
type: string
iss:
type: string
jti:
type: string
nonce:
type: string
rat:
format: date-time
type: string
sub:
type: string
type: object
JSONRawMessage:
title:
JSONRawMessage represents a json.RawMessage that works well with JSON,
Expand Down Expand Up @@ -2412,6 +2478,37 @@ components:
session:
$ref: "#/components/schemas/consentRequestSession"
type: object
Session:
properties:
allowed_top_level_claims:
items:
type: string
type: array
client_id:
type: string
consent_challenge:
type: string
exclude_not_before_claim:
type: boolean
expires_at:
additionalProperties:
format: date-time
type: string
type: object
extra:
additionalProperties: true
type: object
headers:
$ref: "#/components/schemas/Headers"
id_token_claims:
$ref: "#/components/schemas/IDTokenClaims"
kid:
type: string
subject:
type: string
username:
type: string
type: object
StringSlicePipeDelimiter:
items:
type: string
Expand Down Expand Up @@ -3204,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 @@ -3819,6 +3941,10 @@ components:
items:
type: string
type: array
requester:
$ref: "#/components/schemas/oAuth2AccessRequest"
session:
$ref: "#/components/schemas/Session"
subject:
description: Subject is the identifier of the authenticated end-user.
type: string
Expand Down
Loading

0 comments on commit 6d23859

Please sign in to comment.