From a364db4ff2cbd65116358929f9e5bb37fde0cc88 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Mon, 8 Aug 2022 20:32:18 +0200 Subject: [PATCH] fix: move to v0alpha2 api spec --- Makefile | 1 + client/handler.go | 20 +- client/sdk_test.go | 42 +- cmd/cmd_create_client.go | 2 +- cmd/cmd_create_jwks.go | 2 +- cmd/cmd_delete_client.go | 2 +- cmd/cmd_delete_jwks.go | 2 +- cmd/cmd_delete_tokens.go | 2 +- cmd/cmd_get_client.go | 2 +- cmd/cmd_get_jwks.go | 2 +- cmd/cmd_import_client.go | 2 +- cmd/cmd_import_jwk.go | 2 +- cmd/cmd_introspect_token.go | 2 +- cmd/cmd_list_clients.go | 2 +- cmd/cmd_revoke_token.go | 2 +- cmd/cmd_update_client.go | 2 +- consent/handler.go | 24 +- consent/sdk_test.go | 36 +- consent/strategy_default_test.go | 22 +- consent/strategy_logout_test.go | 4 +- consent/strategy_oauth_test.go | 6 +- .../docs/UpdateOAuth2ClientLifespans.md | 387 ------------- .../model_update_o_auth2_client_lifespans.go | 522 ------------------ internal/httpclient/.openapi-generator/FILES | 15 +- internal/httpclient/README.md | 101 ++-- internal/httpclient/api/openapi.yaml | 210 +++++-- .../httpclient/{api_v1.go => api_v0alpha2.go} | 340 ++++++------ internal/httpclient/client.go | 4 +- ...ate_o_auth2_client_lifespans_parameters.go | 170 ------ ...date_o_auth2_client_lifespans_responses.go | 115 ---- .../docs/DefaultSession.md | 0 .../docs/Headers.md | 12 +- .../docs/IDTokenClaims.md | 38 +- .../docs/OAuth2AccessRequest.md | 0 .../docs/RefreshTokenHookRequest.md | 64 ++- .../docs/Session.md | 8 +- .../docs/{V1Api.md => V0alpha2Api.md} | 320 +++++------ .../model_default_session.go | 16 +- .../model_headers.go | 28 +- .../model_id_token_claims.go | 54 +- .../model_o_auth2_access_request.go | 16 +- .../model_refresh_token_hook_request.go | 74 ++- .../model_session.go | 48 +- internal/httpclient/models/default_session.go | 172 ------ internal/httpclient/models/headers.go | 50 -- internal/httpclient/models/id_token_claims.go | 164 ------ internal/httpclient/models/null_duration.go | 29 - .../models/o_auth2_access_request.go | 59 -- .../models/refresh_token_hook_request.go | 154 ------ internal/httpclient/models/session.go | 190 ------- .../models/update_o_auth2_client_lifespans.go | 519 ----------------- jwk/handler.go | 16 +- jwk/sdk_test.go | 22 +- oauth2/handler.go | 16 +- oauth2/handler_test.go | 2 +- oauth2/introspector_test.go | 2 +- oauth2/oauth2_auth_code_test.go | 10 +- oauth2/revocator_test.go | 2 +- oauth2/trust/handler.go | 8 +- oauth2/trust/handler_test.go | 38 +- spec/api.json | 261 +++++++-- spec/swagger.json | 261 +++++++-- test/conformance/run_test.go | 2 +- test/mock-client/main.go | 2 +- test/mock-lcp/main.go | 12 +- 65 files changed, 1402 insertions(+), 3312 deletions(-) delete mode 100644 internal/httpclient-next/docs/UpdateOAuth2ClientLifespans.md delete mode 100644 internal/httpclient-next/model_update_o_auth2_client_lifespans.go rename internal/httpclient/{api_v1.go => api_v0alpha2.go} (92%) delete mode 100644 internal/httpclient/client/admin/update_o_auth2_client_lifespans_parameters.go delete mode 100644 internal/httpclient/client/admin/update_o_auth2_client_lifespans_responses.go rename internal/{httpclient-next => httpclient}/docs/DefaultSession.md (100%) rename internal/{httpclient-next => httpclient}/docs/Headers.md (71%) rename internal/{httpclient-next => httpclient}/docs/IDTokenClaims.md (82%) rename internal/{httpclient-next => httpclient}/docs/OAuth2AccessRequest.md (100%) rename internal/{httpclient-next => httpclient}/docs/Session.md (96%) rename internal/httpclient/docs/{V1Api.md => V0alpha2Api.md} (74%) rename internal/{httpclient-next => httpclient}/model_default_session.go (98%) rename internal/{httpclient-next => httpclient}/model_headers.go (79%) rename internal/{httpclient-next => httpclient}/model_id_token_claims.go (89%) rename internal/{httpclient-next => httpclient}/model_o_auth2_access_request.go (97%) rename internal/{httpclient-next => httpclient}/model_session.go (88%) delete mode 100644 internal/httpclient/models/default_session.go delete mode 100644 internal/httpclient/models/headers.go delete mode 100644 internal/httpclient/models/id_token_claims.go delete mode 100644 internal/httpclient/models/null_duration.go delete mode 100644 internal/httpclient/models/o_auth2_access_request.go delete mode 100644 internal/httpclient/models/refresh_token_hook_request.go delete mode 100644 internal/httpclient/models/session.go delete mode 100644 internal/httpclient/models/update_o_auth2_client_lifespans.go diff --git a/Makefile b/Makefile index 2bc82a7770f..d4543889577 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,7 @@ sdk: .bin/swagger .bin/ory node_modules -p file://.schema/openapi/patches/security.yaml \ spec/swagger.json spec/api.json + rm -rf "internal/httpclient" npm run openapi-generator-cli -- generate -i "spec/api.json" \ -g go \ -o "internal/httpclient" \ diff --git a/client/handler.go b/client/handler.go index 55928271537..418d25a0fe0 100644 --- a/client/handler.go +++ b/client/handler.go @@ -86,7 +86,7 @@ type adminCreateOAuth2Client struct { Body Client } -// swagger:route POST /admin/clients v1 adminCreateOAuth2Client +// swagger:route POST /admin/clients v0alpha2 adminCreateOAuth2Client // // Create an OAuth 2.0 Client // @@ -124,7 +124,7 @@ type dynamicClientRegistrationCreateOAuth2Client struct { Body Client } -// swagger:route POST /oauth2/register v1 dynamicClientRegistrationCreateOAuth2Client +// swagger:route POST /oauth2/register v0alpha2 dynamicClientRegistrationCreateOAuth2Client // // Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol // @@ -233,7 +233,7 @@ type adminUpdateOAuth2Client struct { Body Client } -// swagger:route PUT /admin/clients/{id} v1 adminUpdateOAuth2Client +// swagger:route PUT /admin/clients/{id} v0alpha2 adminUpdateOAuth2Client // // Update an OAuth 2.0 Client // @@ -301,7 +301,7 @@ type dynamicClientRegistrationUpdateOAuth2Client struct { Body Client } -// swagger:route PUT /oauth2/register/{id} v1 dynamicClientRegistrationUpdateOAuth2Client +// swagger:route PUT /oauth2/register/{id} v0alpha2 dynamicClientRegistrationUpdateOAuth2Client // // Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol // @@ -388,7 +388,7 @@ type adminPatchOAuth2Client struct { Body openapix.JSONPatchDocument } -// swagger:route PATCH /admin/clients/{id} v1 adminPatchOAuth2Client +// swagger:route PATCH /admin/clients/{id} v0alpha2 adminPatchOAuth2Client // // Patch an OAuth 2.0 Client // @@ -470,7 +470,7 @@ type adminListOAuth2Clients struct { Owner string `json:"owner"` } -// swagger:route GET /admin/clients v1 adminListOAuth2Clients +// swagger:route GET /admin/clients v0alpha2 adminListOAuth2Clients // // List OAuth 2.0 Clients // @@ -539,7 +539,7 @@ type adminGetOAuth2Client struct { ID string `json:"id"` } -// swagger:route GET /admin/clients/{id} v1 adminGetOAuth2Client +// swagger:route GET /admin/clients/{id} v0alpha2 adminGetOAuth2Client // // Get an OAuth 2.0 Client // @@ -580,7 +580,7 @@ type dynamicClientRegistrationGetOAuth2Client struct { ID string `json:"id"` } -// swagger:route GET /oauth2/register/{id} v1 dynamicClientRegistrationGetOAuth2Client +// swagger:route GET /oauth2/register/{id} v0alpha2 dynamicClientRegistrationGetOAuth2Client // // Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol // @@ -643,7 +643,7 @@ type adminDeleteOAuth2Client struct { ID string `json:"id"` } -// swagger:route DELETE /admin/clients/{id} v1 adminDeleteOAuth2Client +// swagger:route DELETE /admin/clients/{id} v0alpha2 adminDeleteOAuth2Client // // Deletes an OAuth 2.0 Client // @@ -781,7 +781,7 @@ type dynamicClientRegistrationDeleteOAuth2Client struct { ID string `json:"id"` } -// swagger:route DELETE /oauth2/register/{id} v1 dynamicClientRegistrationDeleteOAuth2Client +// swagger:route DELETE /oauth2/register/{id} v0alpha2 dynamicClientRegistrationDeleteOAuth2Client // // Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol // diff --git a/client/sdk_test.go b/client/sdk_test.go index c206adf0059..2823a5b89e1 100644 --- a/client/sdk_test.go +++ b/client/sdk_test.go @@ -100,11 +100,11 @@ func TestClientSDK(t *testing.T) { c.GetConfig().Servers = hydra.ServerConfigurations{{URL: server.URL}} t.Run("case=client default scopes are set", func(t *testing.T) { - result, _, err := c.V1Api.AdminCreateOAuth2Client(ctx).OAuth2Client(hydra.OAuth2Client{}).Execute() + result, _, err := c.V0alpha2Api.AdminCreateOAuth2Client(ctx).OAuth2Client(hydra.OAuth2Client{}).Execute() require.NoError(t, err) assert.EqualValues(t, conf.DefaultClientScope(ctx), strings.Split(*result.Scope, " ")) - _, err = c.V1Api.AdminDeleteOAuth2Client(ctx, *result.ClientId).Execute() + _, err = c.V0alpha2Api.AdminDeleteOAuth2Client(ctx, *result.ClientId).Execute() require.NoError(t, err) }) @@ -115,7 +115,7 @@ func TestClientSDK(t *testing.T) { // createClient.SecretExpiresAt = 10 // returned client is correct on Create - result, _, err := c.V1Api.AdminCreateOAuth2Client(ctx).OAuth2Client(createClient).Execute() + result, _, err := c.V0alpha2Api.AdminCreateOAuth2Client(ctx).OAuth2Client(createClient).Execute() require.NoError(t, err) assert.NotEmpty(t, result.UpdatedAt) assert.NotEmpty(t, result.CreatedAt) @@ -129,31 +129,31 @@ func TestClientSDK(t *testing.T) { // secret is not returned on GetOAuth2Client compareClient.ClientSecret = x.ToPointer("") - gresult, _, err := c.V1Api.AdminGetOAuth2Client(context.Background(), *createClient.ClientId).Execute() + gresult, _, err := c.V0alpha2Api.AdminGetOAuth2Client(context.Background(), *createClient.ClientId).Execute() require.NoError(t, err) assertx.EqualAsJSONExcept(t, compareClient, gresult, append(defaultIgnoreFields, "client_secret")) // get client will return The request could not be authorized - gresult, _, err = c.V1Api.AdminGetOAuth2Client(context.Background(), "unknown").Execute() + gresult, _, err = c.V0alpha2Api.AdminGetOAuth2Client(context.Background(), "unknown").Execute() require.Error(t, err) assert.Empty(t, gresult) assert.True(t, strings.Contains(err.Error(), "404"), err.Error()) // listing clients returns the only added one - results, _, err := c.V1Api.AdminListOAuth2Clients(context.Background()).PageSize(100).Execute() + results, _, err := c.V0alpha2Api.AdminListOAuth2Clients(context.Background()).PageSize(100).Execute() require.NoError(t, err) assert.Len(t, results, 1) assertx.EqualAsJSONExcept(t, compareClient, results[0], append(defaultIgnoreFields, "client_secret")) // SecretExpiresAt gets overwritten with 0 on Update compareClient.ClientSecret = createClient.ClientSecret - uresult, _, err := c.V1Api.AdminUpdateOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(createClient).Execute() + uresult, _, err := c.V0alpha2Api.AdminUpdateOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(createClient).Execute() require.NoError(t, err) assertx.EqualAsJSONExcept(t, compareClient, uresult, append(defaultIgnoreFields, "client_secret")) // create another client updateClient := createTestClient("foo") - uresult, _, err = c.V1Api.AdminUpdateOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(updateClient).Execute() + uresult, _, err = c.V0alpha2Api.AdminUpdateOAuth2Client(context.Background(), *createClient.ClientId).OAuth2Client(updateClient).Execute() require.NoError(t, err) assert.NotEqual(t, updateClient.ClientId, uresult.ClientId) updateClient.ClientId = uresult.ClientId @@ -162,34 +162,34 @@ func TestClientSDK(t *testing.T) { // again, test if secret is not returned on Get compareClient = updateClient compareClient.ClientSecret = x.ToPointer("") - gresult, _, err = c.V1Api.AdminGetOAuth2Client(context.Background(), *updateClient.ClientId).Execute() + gresult, _, err = c.V0alpha2Api.AdminGetOAuth2Client(context.Background(), *updateClient.ClientId).Execute() require.NoError(t, err) assertx.EqualAsJSONExcept(t, compareClient, gresult, append(defaultIgnoreFields, "client_secret")) // client can not be found after being deleted - _, err = c.V1Api.AdminDeleteOAuth2Client(context.Background(), *updateClient.ClientId).Execute() + _, err = c.V0alpha2Api.AdminDeleteOAuth2Client(context.Background(), *updateClient.ClientId).Execute() require.NoError(t, err) - _, _, err = c.V1Api.AdminGetOAuth2Client(context.Background(), *updateClient.ClientId).Execute() + _, _, err = c.V0alpha2Api.AdminGetOAuth2Client(context.Background(), *updateClient.ClientId).Execute() require.Error(t, err) }) t.Run("case=public client is transmitted without secret", func(t *testing.T) { - result, _, err := c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ + result, _, err := c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ TokenEndpointAuthMethod: x.ToPointer("none"), }).Execute() require.NoError(t, err) assert.Equal(t, "", x.FromPointer[string](result.ClientSecret)) - result, _, err = c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(createTestClient("")).Execute() + result, _, err = c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(createTestClient("")).Execute() require.NoError(t, err) assert.Equal(t, "secret", x.FromPointer[string](result.ClientSecret)) }) t.Run("case=id can not be set", func(t *testing.T) { - _, res, err := c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ClientId: x.ToPointer(uuidx.NewV4().String())}).Execute() + _, res, err := c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(hydra.OAuth2Client{ClientId: x.ToPointer(uuidx.NewV4().String())}).Execute() require.Error(t, err) body, err := ioutil.ReadAll(res.Body) require.NoError(t, err) @@ -202,14 +202,14 @@ func TestClientSDK(t *testing.T) { value := "http://foo.bar" client := createTestClient("") - created, _, err := c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() + created, _, err := c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() require.NoError(t, err) client.ClientId = created.ClientId expected := deepcopy.Copy(client).(hydra.OAuth2Client) expected.RedirectUris = append(expected.RedirectUris, value) - result, _, err := c.V1Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() + result, _, err := c.V0alpha2Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() require.NoError(t, err) expected.CreatedAt = result.CreatedAt expected.UpdatedAt = result.UpdatedAt @@ -224,11 +224,11 @@ func TestClientSDK(t *testing.T) { value := "foo" client := createTestClient("") - created, res, err := c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() + created, res, err := c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() require.NoError(t, err, "%s", ioutilx.MustReadAll(res.Body)) client.ClientId = created.ClientId - _, _, err = c.V1Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() + _, _, err = c.V0alpha2Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() require.Error(t, err) }) @@ -238,13 +238,13 @@ func TestClientSDK(t *testing.T) { value := "http://foo.bar" client := createTestClient("") - created, _, err := c.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() + created, _, err := c.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(client).Execute() require.NoError(t, err) client.ClientId = created.ClientId - result1, _, err := c.V1Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() + result1, _, err := c.V0alpha2Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() require.NoError(t, err) - result2, _, err := c.V1Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() + result2, _, err := c.V0alpha2Api.AdminPatchOAuth2Client(context.Background(), *client.ClientId).JsonPatch([]hydra.JsonPatch{{Op: op, Path: path, Value: value}}).Execute() require.NoError(t, err) // secret hashes shouldn't change between these PUT calls diff --git a/cmd/cmd_create_client.go b/cmd/cmd_create_client.go index 69a17a9dd85..9abd85bb510 100644 --- a/cmd/cmd_create_client.go +++ b/cmd/cmd_create_client.go @@ -101,7 +101,7 @@ To encrypt an auto-generated OAuth2 Client Secret, use flags `+"`--pgp-key`"+`, secret := flagx.MustGetString(cmd, flagClientSecret) //nolint:bodyclose - client, _, err := m.V1Api.AdminCreateOAuth2Client(cmd.Context()).OAuth2Client(clientFromFlags(cmd)).Execute() + client, _, err := m.V0alpha2Api.AdminCreateOAuth2Client(cmd.Context()).OAuth2Client(clientFromFlags(cmd)).Execute() if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_create_jwks.go b/cmd/cmd_create_jwks.go index 466f3444c10..249cd708846 100644 --- a/cmd/cmd_create_jwks.go +++ b/cmd/cmd_create_jwks.go @@ -53,7 +53,7 @@ func NewCreateJWKSCmd(parent *cobra.Command) *cobra.Command { } //nolint:bodyclose - jwks, _, err := m.V1Api.AdminCreateJsonWebKeySet(context.Background(), args[0]).AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ + jwks, _, err := m.V0alpha2Api.AdminCreateJsonWebKeySet(context.Background(), args[0]).AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ Alg: flagx.MustGetString(cmd, alg), Kid: kid, Use: flagx.MustGetString(cmd, use), diff --git a/cmd/cmd_delete_client.go b/cmd/cmd_delete_client.go index 1fef5a22288..02a7739e698 100644 --- a/cmd/cmd_delete_client.go +++ b/cmd/cmd_delete_client.go @@ -52,7 +52,7 @@ To delete OAuth 2.0 Clients with the owner of "foo@bar.com", run: ) for _, c := range args { - _, err := m.V1Api.AdminDeleteOAuth2Client(cmd.Context(), c).Execute() //nolint:bodyclose + _, err := m.V0alpha2Api.AdminDeleteOAuth2Client(cmd.Context(), c).Execute() //nolint:bodyclose if err != nil { failed[c] = cmdx.PrintOpenAPIError(cmd, err) continue diff --git a/cmd/cmd_delete_jwks.go b/cmd/cmd_delete_jwks.go index 447a7893463..52f7d362664 100644 --- a/cmd/cmd_delete_jwks.go +++ b/cmd/cmd_delete_jwks.go @@ -49,7 +49,7 @@ func NewDeleteJWKSCommand(root *cobra.Command) *cobra.Command { ) for _, c := range args { - _, err = m.V1Api.AdminDeleteJsonWebKeySet(context.Background(), c).Execute() //nolint:bodyclose + _, err = m.V0alpha2Api.AdminDeleteJsonWebKeySet(context.Background(), c).Execute() //nolint:bodyclose if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_delete_tokens.go b/cmd/cmd_delete_tokens.go index 0012ffddd30..0ba812d923c 100644 --- a/cmd/cmd_delete_tokens.go +++ b/cmd/cmd_delete_tokens.go @@ -42,7 +42,7 @@ func NewDeleteAccessTokensCmd(parent *cobra.Command) *cobra.Command { } clientID := args[0] - _, err = client.V1Api.AdminDeleteOAuth2Token(cmd.Context()).ClientId(clientID).Execute() //nolint:bodyclose + _, err = client.V0alpha2Api.AdminDeleteOAuth2Token(cmd.Context()).ClientId(clientID).Execute() //nolint:bodyclose if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_get_client.go b/cmd/cmd_get_client.go index d208a7b5bdb..a52ff9a4f76 100644 --- a/cmd/cmd_get_client.go +++ b/cmd/cmd_get_client.go @@ -47,7 +47,7 @@ func NewGetClientsCmd(root *cobra.Command) *cobra.Command { clients := make([]hydra.OAuth2Client, 0, len(args)) for _, id := range args { - client, _, err := m.V1Api.AdminGetOAuth2Client(cmd.Context(), id).Execute() //nolint:bodyclose + client, _, err := m.V0alpha2Api.AdminGetOAuth2Client(cmd.Context(), id).Execute() //nolint:bodyclose if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_get_jwks.go b/cmd/cmd_get_jwks.go index b288d457b43..c0267033d85 100644 --- a/cmd/cmd_get_jwks.go +++ b/cmd/cmd_get_jwks.go @@ -46,7 +46,7 @@ func NewGetJWKSCmd(root *cobra.Command) *cobra.Command { var sets outputJSONWebKeyCollection for _, set := range args { - key, _, err := m.V1Api.AdminGetJsonWebKeySet(cmd.Context(), set).Execute() //nolint:bodyclose + key, _, err := m.V0alpha2Api.AdminGetJsonWebKeySet(cmd.Context(), set).Execute() //nolint:bodyclose if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_import_client.go b/cmd/cmd_import_client.go index 220693c9576..3348ac32a95 100644 --- a/cmd/cmd_import_client.go +++ b/cmd/cmd_import_client.go @@ -117,7 +117,7 @@ Please be aware that this command does not update existing clients. If the clien for src, cc := range clients { for _, c := range cc { - result, _, err := m.V1Api.AdminCreateOAuth2Client(cmd.Context()).OAuth2Client(c).Execute() //nolint:bodyclose + result, _, err := m.V0alpha2Api.AdminCreateOAuth2Client(cmd.Context()).OAuth2Client(c).Execute() //nolint:bodyclose if err != nil { failed[src] = cmdx.PrintOpenAPIError(cmd, err) continue diff --git a/cmd/cmd_import_jwk.go b/cmd/cmd_import_jwk.go index 331b870d40e..03321ed5353 100644 --- a/cmd/cmd_import_jwk.go +++ b/cmd/cmd_import_jwk.go @@ -125,7 +125,7 @@ the imported keys will be added to that set. Otherwise, a new set will be create failed := make(map[string]error) for src, kk := range keys { for _, k := range kk { - result, _, err := m.V1Api.AdminUpdateJsonWebKey(cmd.Context(), k.Kid, set).JsonWebKey(k).Execute() //nolint:bodyclose + result, _, err := m.V0alpha2Api.AdminUpdateJsonWebKey(cmd.Context(), k.Kid, set).JsonWebKey(k).Execute() //nolint:bodyclose if err != nil { failed[src] = cmdx.PrintOpenAPIError(cmd, err) continue diff --git a/cmd/cmd_introspect_token.go b/cmd/cmd_introspect_token.go index 8f4b3eb4e6d..2076b2c5c4b 100644 --- a/cmd/cmd_introspect_token.go +++ b/cmd/cmd_introspect_token.go @@ -43,7 +43,7 @@ func NewIntrospectTokenCmd(parent *cobra.Command) *cobra.Command { return err } - result, _, err := client.V1Api.AdminIntrospectOAuth2Token(cmd.Context()). + result, _, err := client.V0alpha2Api.AdminIntrospectOAuth2Token(cmd.Context()). Token(args[0]). Scope(strings.Join(flagx.MustGetStringSlice(cmd, "scope"), " ")).Execute() //nolint:bodyclose if err != nil { diff --git a/cmd/cmd_list_clients.go b/cmd/cmd_list_clients.go index cf8e42b9520..97d1ee06393 100644 --- a/cmd/cmd_list_clients.go +++ b/cmd/cmd_list_clients.go @@ -27,7 +27,7 @@ func NewListClientsCmd(root *cobra.Command) *cobra.Command { return err } - list, resp, err := m.V1Api.AdminListOAuth2Clients(cmd.Context()).PageSize(int64(pageSize)).PageToken(pageToken).Execute() + list, resp, err := m.V0alpha2Api.AdminListOAuth2Clients(cmd.Context()).PageSize(int64(pageSize)).PageToken(pageToken).Execute() if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/cmd/cmd_revoke_token.go b/cmd/cmd_revoke_token.go index e0b6af61544..a17b468a0b7 100644 --- a/cmd/cmd_revoke_token.go +++ b/cmd/cmd_revoke_token.go @@ -55,7 +55,7 @@ Please provide a Client ID and Client Secret using flags --client-id and --clien } token := args[0] - _, err = client.V1Api.RevokeOAuth2Token( + _, err = client.V0alpha2Api.RevokeOAuth2Token( context.WithValue(cmd.Context(), hydra.ContextBasicAuth, hydra.BasicAuth{ UserName: clientID, Password: clientSecret, diff --git a/cmd/cmd_update_client.go b/cmd/cmd_update_client.go index 5f497922009..4548adaae56 100644 --- a/cmd/cmd_update_client.go +++ b/cmd/cmd_update_client.go @@ -40,7 +40,7 @@ To encrypt an auto-generated OAuth2 Client Secret, use flags `+"`--pgp-key`"+`, id := args[0] cc := clientFromFlags(cmd) - client, _, err := m.V1Api.AdminUpdateOAuth2Client(context.Background(), id).OAuth2Client(cc).Execute() //nolint:bodyclose + client, _, err := m.V0alpha2Api.AdminUpdateOAuth2Client(context.Background(), id).OAuth2Client(cc).Execute() //nolint:bodyclose if err != nil { return cmdx.PrintOpenAPIError(cmd, err) } diff --git a/consent/handler.go b/consent/handler.go index 25a2ade28f7..748edb8869d 100644 --- a/consent/handler.go +++ b/consent/handler.go @@ -99,7 +99,7 @@ type adminRevokeOAuth2ConsentSessions struct { All bool `json:"all"` } -// swagger:route DELETE /admin/oauth2/auth/sessions/consent v1 adminRevokeOAuth2ConsentSessions +// swagger:route DELETE /admin/oauth2/auth/sessions/consent v0alpha2 adminRevokeOAuth2ConsentSessions // // Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client // @@ -156,7 +156,7 @@ type adminListOAuth2SubjectConsentSessions struct { Subject string `json:"subject"` } -// swagger:route GET /admin/oauth2/auth/sessions/consent v1 adminListOAuth2SubjectConsentSessions +// swagger:route GET /admin/oauth2/auth/sessions/consent v0alpha2 adminListOAuth2SubjectConsentSessions // // List OAuth 2.0 Consent Sessions of a Subject // @@ -224,7 +224,7 @@ type adminRevokeOAuth2LoginSessions struct { Subject string `json:"subject"` } -// swagger:route DELETE /admin/oauth2/auth/sessions/login v1 adminRevokeOAuth2LoginSessions +// swagger:route DELETE /admin/oauth2/auth/sessions/login v0alpha2 adminRevokeOAuth2LoginSessions // // Invalidates All OAuth 2.0 Login Sessions of a Certain User // @@ -265,7 +265,7 @@ type adminGetOAuth2LoginRequest struct { Challenge string `json:"login_challenge"` } -// swagger:route GET /admin/oauth2/auth/requests/login v1 adminGetOAuth2LoginRequest +// swagger:route GET /admin/oauth2/auth/requests/login v0alpha2 adminGetOAuth2LoginRequest // // Get an OAuth 2.0 Login Request // @@ -327,7 +327,7 @@ type adminAcceptOAuth2LoginRequest struct { Body HandledLoginRequest } -// swagger:route PUT /admin/oauth2/auth/requests/login/accept v1 adminAcceptOAuth2LoginRequest +// swagger:route PUT /admin/oauth2/auth/requests/login/accept v0alpha2 adminAcceptOAuth2LoginRequest // // Accept an OAuth 2.0 Login Request // @@ -427,7 +427,7 @@ type adminRejectOAuth2LoginRequest struct { Body RequestDeniedError } -// swagger:route PUT /admin/oauth2/auth/requests/login/reject v1 adminRejectOAuth2LoginRequest +// swagger:route PUT /admin/oauth2/auth/requests/login/reject v0alpha2 adminRejectOAuth2LoginRequest // // Reject an OAuth 2.0 Login Request // @@ -509,7 +509,7 @@ type adminGetOAuth2ConsentRequest struct { Challenge string `json:"consent_challenge"` } -// swagger:route GET /admin/oauth2/auth/requests/consent v1 adminGetOAuth2ConsentRequest +// swagger:route GET /admin/oauth2/auth/requests/consent v0alpha2 adminGetOAuth2ConsentRequest // // Get OAuth 2.0 Consent Request Information // @@ -580,7 +580,7 @@ type adminAcceptOAuth2ConsentRequest struct { Body AcceptOAuth2ConsentRequest } -// swagger:route PUT /admin/oauth2/auth/requests/consent/accept v1 adminAcceptOAuth2ConsentRequest +// swagger:route PUT /admin/oauth2/auth/requests/consent/accept v0alpha2 adminAcceptOAuth2ConsentRequest // // Accept an OAuth 2.0 Consent Request // @@ -669,7 +669,7 @@ type adminRejectOAuth2ConsentRequest struct { Body RequestDeniedError } -// swagger:route PUT /admin/oauth2/auth/requests/consent/reject v1 adminRejectOAuth2ConsentRequest +// swagger:route PUT /admin/oauth2/auth/requests/consent/reject v0alpha2 adminRejectOAuth2ConsentRequest // // Reject an OAuth 2.0 Consent Request // @@ -755,7 +755,7 @@ type adminAcceptOAuth2LogoutRequest struct { Challenge string `json:"logout_challenge"` } -// swagger:route PUT /admin/oauth2/auth/requests/logout/accept v1 adminAcceptOAuth2LogoutRequest +// swagger:route PUT /admin/oauth2/auth/requests/logout/accept v0alpha2 adminAcceptOAuth2LogoutRequest // // Accept an OAuth 2.0 Logout Request // @@ -798,7 +798,7 @@ type adminRejectOAuth2LogoutRequest struct { Body RequestDeniedError } -// swagger:route PUT /admin/oauth2/auth/requests/logout/reject v1 adminRejectOAuth2LogoutRequest +// swagger:route PUT /admin/oauth2/auth/requests/logout/reject v0alpha2 adminRejectOAuth2LogoutRequest // // Reject an OAuth 2.0 Logout Request // @@ -836,7 +836,7 @@ type adminGetOAuth2LogoutRequest struct { Challenge string `json:"logout_challenge"` } -// swagger:route GET /admin/oauth2/auth/requests/logout v1 adminGetOAuth2LogoutRequest +// swagger:route GET /admin/oauth2/auth/requests/logout v0alpha2 adminGetOAuth2LogoutRequest // // Get an OAuth 2.0 Logout Request // diff --git a/consent/sdk_test.go b/consent/sdk_test.go index dd3b0d81f6e..00f0f6407a2 100644 --- a/consent/sdk_test.go +++ b/consent/sdk_test.go @@ -118,69 +118,69 @@ func TestSDK(t *testing.T) { lur2 := MockLogoutRequest("testsdk-2", false, network) require.NoError(t, m.CreateLogoutRequest(context.Background(), lur2)) - crGot, _, err := sdk.V1Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "1")).Execute() + crGot, _, err := sdk.V0alpha2Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "1")).Execute() require.NoError(t, err) compareSDKConsentRequest(t, cr1, *crGot) - crGot, _, err = sdk.V1Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() + crGot, _, err = sdk.V0alpha2Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() require.NoError(t, err) compareSDKConsentRequest(t, cr2, *crGot) - arGot, _, err := sdk.V1Api.AdminGetOAuth2LoginRequest(ctx).LoginChallenge(makeID("challenge", network, "ar-1")).Execute() + arGot, _, err := sdk.V0alpha2Api.AdminGetOAuth2LoginRequest(ctx).LoginChallenge(makeID("challenge", network, "ar-1")).Execute() require.NoError(t, err) compareSDKLoginRequest(t, ar1, *arGot) - arGot, _, err = sdk.V1Api.AdminGetOAuth2LoginRequest(ctx).LoginChallenge(makeID("challenge", network, "ar-2")).Execute() + arGot, _, err = sdk.V0alpha2Api.AdminGetOAuth2LoginRequest(ctx).LoginChallenge(makeID("challenge", network, "ar-2")).Execute() require.NoError(t, err) compareSDKLoginRequest(t, ar2, *arGot) - _, err = sdk.V1Api.AdminRevokeOAuth2LoginSessions(ctx).Subject("subject1").Execute() + _, err = sdk.V0alpha2Api.AdminRevokeOAuth2LoginSessions(ctx).Subject("subject1").Execute() require.NoError(t, err) - _, err = sdk.V1Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject1").Execute() + _, err = sdk.V0alpha2Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject1").Execute() require.Error(t, err) - _, err = sdk.V1Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject(cr4.Subject).Client(cr4.Client.GetID()).Execute() + _, err = sdk.V0alpha2Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject(cr4.Subject).Client(cr4.Client.GetID()).Execute() require.NoError(t, err) - _, err = sdk.V1Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject1").All(true).Execute() + _, err = sdk.V0alpha2Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject1").All(true).Execute() require.NoError(t, err) - _, _, err = sdk.V1Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "1")).Execute() + _, _, err = sdk.V0alpha2Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "1")).Execute() require.Error(t, err) - crGot, _, err = sdk.V1Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() + crGot, _, err = sdk.V0alpha2Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() require.NoError(t, err) compareSDKConsentRequest(t, cr2, *crGot) - _, err = sdk.V1Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject2").Client("fk-client-2").Execute() + _, err = sdk.V0alpha2Api.AdminRevokeOAuth2ConsentSessions(ctx).Subject("subject2").Client("fk-client-2").Execute() require.NoError(t, err) - _, _, err = sdk.V1Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() + _, _, err = sdk.V0alpha2Api.AdminGetOAuth2ConsentRequest(ctx).ConsentChallenge(makeID("challenge", network, "2")).Execute() require.Error(t, err) - csGot, _, err := sdk.V1Api.AdminListOAuth2SubjectConsentSessions(ctx).Subject("subject3").Execute() + csGot, _, err := sdk.V0alpha2Api.AdminListOAuth2SubjectConsentSessions(ctx).Subject("subject3").Execute() require.NoError(t, err) assert.Equal(t, 1, len(csGot)) cs := csGot[0] assert.Equal(t, makeID("challenge", network, "3"), cs.ConsentRequest.Challenge) - csGot, _, err = sdk.V1Api.AdminListOAuth2SubjectConsentSessions(ctx).Subject("subject2").Execute() + csGot, _, err = sdk.V0alpha2Api.AdminListOAuth2SubjectConsentSessions(ctx).Subject("subject2").Execute() require.NoError(t, err) assert.Equal(t, 0, len(csGot)) - luGot, _, err := sdk.V1Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(makeID("challenge", network, "testsdk-1")).Execute() + luGot, _, err := sdk.V0alpha2Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(makeID("challenge", network, "testsdk-1")).Execute() require.NoError(t, err) compareSDKLogoutRequest(t, lur1, luGot) - luaGot, _, err := sdk.V1Api.AdminAcceptOAuth2LogoutRequest(ctx).LogoutChallenge(makeID("challenge", network, "testsdk-1")).Execute() + luaGot, _, err := sdk.V0alpha2Api.AdminAcceptOAuth2LogoutRequest(ctx).LogoutChallenge(makeID("challenge", network, "testsdk-1")).Execute() require.NoError(t, err) assert.EqualValues(t, "https://www.ory.sh/oauth2/sessions/logout?logout_verifier="+makeID("verifier", network, "testsdk-1"), luaGot.RedirectTo) - _, err = sdk.V1Api.AdminRejectOAuth2LogoutRequest(ctx).LogoutChallenge(lur2.ID).Execute() + _, err = sdk.V0alpha2Api.AdminRejectOAuth2LogoutRequest(ctx).LogoutChallenge(lur2.ID).Execute() require.NoError(t, err) - _, _, err = sdk.V1Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(lur2.ID).Execute() + _, _, err = sdk.V0alpha2Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(lur2.ID).Execute() require.Error(t, err) } diff --git a/consent/strategy_default_test.go b/consent/strategy_default_test.go index 4280449e3c9..c5aaf90864e 100644 --- a/consent/strategy_default_test.go +++ b/consent/strategy_default_test.go @@ -50,11 +50,11 @@ import ( func checkAndAcceptLoginHandler(t *testing.T, apiClient *hydra.APIClient, subject string, cb func(*testing.T, *hydra.OAuth2LoginRequest, error) hydra.AcceptOAuth2LoginRequest) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - res, _, err := apiClient.V1Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() + res, _, err := apiClient.V0alpha2Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() payload := cb(t, res, err) payload.Subject = subject - v, _, err := apiClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()). + v, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(payload). Execute() @@ -66,10 +66,10 @@ func checkAndAcceptLoginHandler(t *testing.T, apiClient *hydra.APIClient, subjec func checkAndAcceptConsentHandler(t *testing.T, apiClient *hydra.APIClient, cb func(*testing.T, *hydra.OAuth2ConsentRequest, error) hydra.AcceptOAuth2ConsentRequest) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - res, _, err := apiClient.V1Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() + res, _, err := apiClient.V0alpha2Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() payload := cb(t, res, err) - v, _, err := apiClient.V1Api.AdminAcceptOAuth2ConsentRequest(context.Background()). + v, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). AcceptOAuth2ConsentRequest(payload). Execute() @@ -131,18 +131,18 @@ func genIDToken(t *testing.T, reg driver.Registry, c jwtgo.MapClaims) string { func checkAndDuplicateAcceptLoginHandler(t *testing.T, apiClient *hydra.APIClient, subject string, cb func(*testing.T, *hydra.OAuth2LoginRequest, error) hydra.AcceptOAuth2LoginRequest) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - res, _, err := apiClient.V1Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() + res, _, err := apiClient.V0alpha2Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() payload := cb(t, res, err) payload.Subject = subject - v, _, err := apiClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()). + v, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(payload). Execute() require.NoError(t, err) require.NotEmpty(t, v.RedirectTo) - v2, _, err := apiClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()). + v2, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(payload). Execute() @@ -154,22 +154,22 @@ func checkAndDuplicateAcceptLoginHandler(t *testing.T, apiClient *hydra.APIClien func checkAndDuplicateAcceptConsentHandler(t *testing.T, apiClient *hydra.APIClient, cb func(*testing.T, *hydra.OAuth2ConsentRequest, error) hydra.AcceptOAuth2ConsentRequest) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - res, _, err := apiClient.V1Api.AdminGetOAuth2ConsentRequest(context.Background()). + res, _, err := apiClient.V0alpha2Api.AdminGetOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). Execute() payload := cb(t, res, err) - v, _, err := apiClient.V1Api.AdminAcceptOAuth2ConsentRequest(context.Background()). + v, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). AcceptOAuth2ConsentRequest(payload). Execute() require.NoError(t, err) require.NotEmpty(t, v.RedirectTo) - res2, _, err := apiClient.V1Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() + res2, _, err := apiClient.V0alpha2Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() payload2 := cb(t, res2, err) - v2, _, err := apiClient.V1Api.AdminAcceptOAuth2ConsentRequest(context.Background()). + v2, _, err := apiClient.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). AcceptOAuth2ConsentRequest(payload2). Execute() diff --git a/consent/strategy_logout_test.go b/consent/strategy_logout_test.go index 35bddad017d..12983a7a39a 100644 --- a/consent/strategy_logout_test.go +++ b/consent/strategy_logout_test.go @@ -134,12 +134,12 @@ func TestLogoutFlows(t *testing.T) { defer wg.Done() } - res, _, err := adminApi.V1Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(r.URL.Query().Get("logout_challenge")).Execute() + res, _, err := adminApi.V0alpha2Api.AdminGetOAuth2LogoutRequest(ctx).LogoutChallenge(r.URL.Query().Get("logout_challenge")).Execute() if cb != nil { cb(t, res, err) } - v, _, err := adminApi.V1Api.AdminAcceptOAuth2LogoutRequest(ctx).LogoutChallenge(r.URL.Query().Get("logout_challenge")).Execute() + v, _, err := adminApi.V0alpha2Api.AdminAcceptOAuth2LogoutRequest(ctx).LogoutChallenge(r.URL.Query().Get("logout_challenge")).Execute() require.NoError(t, err) require.NotEmpty(t, v.RedirectTo) http.Redirect(w, r, v.RedirectTo, http.StatusFound) diff --git a/consent/strategy_oauth_test.go b/consent/strategy_oauth_test.go index ec024a7db6b..ea9210d8669 100644 --- a/consent/strategy_oauth_test.go +++ b/consent/strategy_oauth_test.go @@ -142,7 +142,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { t.Run("case=should fail because the request was redirected but the login endpoint rejected the request", func(t *testing.T) { testhelpers.NewLoginConsentUI(t, reg.Config(), func(w http.ResponseWriter, r *http.Request) { - vr, _, err := adminClient.V1Api.AdminRejectOAuth2LoginRequest(context.Background()). + vr, _, err := adminClient.V0alpha2Api.AdminRejectOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). RejectOAuth2Request(hydra.RejectOAuth2Request{ Error: pointerx.String(fosite.ErrInteractionRequired.ErrorField), @@ -172,7 +172,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { testhelpers.NewLoginConsentUI(t, reg.Config(), acceptLoginHandler(t, "aeneas-rekkas", nil), func(w http.ResponseWriter, r *http.Request) { - vr, _, err := adminClient.V1Api.AdminRejectOAuth2ConsentRequest(context.Background()). + vr, _, err := adminClient.V0alpha2Api.AdminRejectOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). RejectOAuth2Request(hydra.RejectOAuth2Request{ Error: pointerx.String(fosite.ErrInteractionRequired.ErrorField), @@ -382,7 +382,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { testhelpers.NewLoginConsentUI(t, reg.Config(), func(w http.ResponseWriter, r *http.Request) { - _, res, err := adminClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()). + _, res, err := adminClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(hydra.AcceptOAuth2LoginRequest{ Subject: "not-aeneas-rekkas", diff --git a/internal/httpclient-next/docs/UpdateOAuth2ClientLifespans.md b/internal/httpclient-next/docs/UpdateOAuth2ClientLifespans.md deleted file mode 100644 index 881a56ec37f..00000000000 --- a/internal/httpclient-next/docs/UpdateOAuth2ClientLifespans.md +++ /dev/null @@ -1,387 +0,0 @@ -# UpdateOAuth2ClientLifespans - -## Properties - -| Name | Type | Description | Notes | -| ---------------------------------------------- | --------------------- | ----------------------------------------------------------------- | ---------- | -| **AuthorizationCodeGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **AuthorizationCodeGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **AuthorizationCodeGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **ClientCredentialsGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [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] | -| **JwtBearerGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **PasswordGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **PasswordGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **RefreshTokenGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **RefreshTokenGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | -| **RefreshTokenGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | - -## Methods - -### NewUpdateOAuth2ClientLifespans - -`func NewUpdateOAuth2ClientLifespans() *UpdateOAuth2ClientLifespans` - -NewUpdateOAuth2ClientLifespans instantiates a new UpdateOAuth2ClientLifespans -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 - -### NewUpdateOAuth2ClientLifespansWithDefaults - -`func NewUpdateOAuth2ClientLifespansWithDefaults() *UpdateOAuth2ClientLifespans` - -NewUpdateOAuth2ClientLifespansWithDefaults instantiates a new -UpdateOAuth2ClientLifespans 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 - -### GetAuthorizationCodeGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantAccessTokenLifespan() string` - -GetAuthorizationCodeGrantAccessTokenLifespan returns the -AuthorizationCodeGrantAccessTokenLifespan field if non-nil, zero value -otherwise. - -### GetAuthorizationCodeGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool)` - -GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the -AuthorizationCodeGrantAccessTokenLifespan field if it's non-nil, zero value -otherwise and a boolean to check if the value has been set. - -### SetAuthorizationCodeGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantAccessTokenLifespan(v string)` - -SetAuthorizationCodeGrantAccessTokenLifespan sets -AuthorizationCodeGrantAccessTokenLifespan field to given value. - -### HasAuthorizationCodeGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantAccessTokenLifespan() bool` - -HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has -been set. - -### GetAuthorizationCodeGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantIdTokenLifespan() string` - -GetAuthorizationCodeGrantIdTokenLifespan returns the -AuthorizationCodeGrantIdTokenLifespan field if non-nil, zero value otherwise. - -### GetAuthorizationCodeGrantIdTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool)` - -GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the -AuthorizationCodeGrantIdTokenLifespan field if it's non-nil, zero value -otherwise and a boolean to check if the value has been set. - -### SetAuthorizationCodeGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantIdTokenLifespan(v string)` - -SetAuthorizationCodeGrantIdTokenLifespan sets -AuthorizationCodeGrantIdTokenLifespan field to given value. - -### HasAuthorizationCodeGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantIdTokenLifespan() bool` - -HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been -set. - -### GetAuthorizationCodeGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantRefreshTokenLifespan() string` - -GetAuthorizationCodeGrantRefreshTokenLifespan returns the -AuthorizationCodeGrantRefreshTokenLifespan field if non-nil, zero value -otherwise. - -### GetAuthorizationCodeGrantRefreshTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool)` - -GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the -AuthorizationCodeGrantRefreshTokenLifespan field if it's non-nil, zero value -otherwise and a boolean to check if the value has been set. - -### SetAuthorizationCodeGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantRefreshTokenLifespan(v string)` - -SetAuthorizationCodeGrantRefreshTokenLifespan sets -AuthorizationCodeGrantRefreshTokenLifespan field to given value. - -### HasAuthorizationCodeGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantRefreshTokenLifespan() bool` - -HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has -been set. - -### GetClientCredentialsGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetClientCredentialsGrantAccessTokenLifespan() string` - -GetClientCredentialsGrantAccessTokenLifespan returns the -ClientCredentialsGrantAccessTokenLifespan field if non-nil, zero value -otherwise. - -### GetClientCredentialsGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool)` - -GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the -ClientCredentialsGrantAccessTokenLifespan field if it's non-nil, zero value -otherwise and a boolean to check if the value has been set. - -### SetClientCredentialsGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetClientCredentialsGrantAccessTokenLifespan(v string)` - -SetClientCredentialsGrantAccessTokenLifespan sets -ClientCredentialsGrantAccessTokenLifespan field to given value. - -### HasClientCredentialsGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasClientCredentialsGrantAccessTokenLifespan() bool` - -HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has -been set. - -### GetImplicitGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantAccessTokenLifespan() string` - -GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan -field if non-nil, zero value otherwise. - -### GetImplicitGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantAccessTokenLifespanOk() (*string, bool)` - -GetImplicitGrantAccessTokenLifespanOk returns a tuple with the -ImplicitGrantAccessTokenLifespan field if it's non-nil, zero value otherwise and -a boolean to check if the value has been set. - -### SetImplicitGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetImplicitGrantAccessTokenLifespan(v string)` - -SetImplicitGrantAccessTokenLifespan sets ImplicitGrantAccessTokenLifespan field -to given value. - -### HasImplicitGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasImplicitGrantAccessTokenLifespan() bool` - -HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. - -### GetImplicitGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantIdTokenLifespan() string` - -GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field -if non-nil, zero value otherwise. - -### GetImplicitGrantIdTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantIdTokenLifespanOk() (*string, bool)` - -GetImplicitGrantIdTokenLifespanOk returns a tuple with the -ImplicitGrantIdTokenLifespan field if it's non-nil, zero value otherwise and a -boolean to check if the value has been set. - -### SetImplicitGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetImplicitGrantIdTokenLifespan(v string)` - -SetImplicitGrantIdTokenLifespan sets ImplicitGrantIdTokenLifespan field to given -value. - -### HasImplicitGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasImplicitGrantIdTokenLifespan() bool` - -HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. - -### GetJwtBearerGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetJwtBearerGrantAccessTokenLifespan() string` - -GetJwtBearerGrantAccessTokenLifespan returns the -JwtBearerGrantAccessTokenLifespan field if non-nil, zero value otherwise. - -### GetJwtBearerGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool)` - -GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the -JwtBearerGrantAccessTokenLifespan field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwtBearerGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetJwtBearerGrantAccessTokenLifespan(v string)` - -SetJwtBearerGrantAccessTokenLifespan sets JwtBearerGrantAccessTokenLifespan -field to given value. - -### HasJwtBearerGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasJwtBearerGrantAccessTokenLifespan() bool` - -HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. - -### GetPasswordGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantAccessTokenLifespan() string` - -GetPasswordGrantAccessTokenLifespan returns the PasswordGrantAccessTokenLifespan -field if non-nil, zero value otherwise. - -### GetPasswordGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantAccessTokenLifespanOk() (*string, bool)` - -GetPasswordGrantAccessTokenLifespanOk returns a tuple with the -PasswordGrantAccessTokenLifespan field if it's non-nil, zero value otherwise and -a boolean to check if the value has been set. - -### SetPasswordGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetPasswordGrantAccessTokenLifespan(v string)` - -SetPasswordGrantAccessTokenLifespan sets PasswordGrantAccessTokenLifespan field -to given value. - -### HasPasswordGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasPasswordGrantAccessTokenLifespan() bool` - -HasPasswordGrantAccessTokenLifespan returns a boolean if a field has been set. - -### GetPasswordGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantRefreshTokenLifespan() string` - -GetPasswordGrantRefreshTokenLifespan returns the -PasswordGrantRefreshTokenLifespan field if non-nil, zero value otherwise. - -### GetPasswordGrantRefreshTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantRefreshTokenLifespanOk() (*string, bool)` - -GetPasswordGrantRefreshTokenLifespanOk returns a tuple with the -PasswordGrantRefreshTokenLifespan field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetPasswordGrantRefreshTokenLifespan(v string)` - -SetPasswordGrantRefreshTokenLifespan sets PasswordGrantRefreshTokenLifespan -field to given value. - -### HasPasswordGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasPasswordGrantRefreshTokenLifespan() bool` - -HasPasswordGrantRefreshTokenLifespan returns a boolean if a field has been set. - -### GetRefreshTokenGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantAccessTokenLifespan() string` - -GetRefreshTokenGrantAccessTokenLifespan returns the -RefreshTokenGrantAccessTokenLifespan field if non-nil, zero value otherwise. - -### GetRefreshTokenGrantAccessTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool)` - -GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the -RefreshTokenGrantAccessTokenLifespan field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefreshTokenGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantAccessTokenLifespan(v string)` - -SetRefreshTokenGrantAccessTokenLifespan sets -RefreshTokenGrantAccessTokenLifespan field to given value. - -### HasRefreshTokenGrantAccessTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantAccessTokenLifespan() bool` - -HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been -set. - -### GetRefreshTokenGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantIdTokenLifespan() string` - -GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan -field if non-nil, zero value otherwise. - -### GetRefreshTokenGrantIdTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool)` - -GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the -RefreshTokenGrantIdTokenLifespan field if it's non-nil, zero value otherwise and -a boolean to check if the value has been set. - -### SetRefreshTokenGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantIdTokenLifespan(v string)` - -SetRefreshTokenGrantIdTokenLifespan sets RefreshTokenGrantIdTokenLifespan field -to given value. - -### HasRefreshTokenGrantIdTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantIdTokenLifespan() bool` - -HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. - -### GetRefreshTokenGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantRefreshTokenLifespan() string` - -GetRefreshTokenGrantRefreshTokenLifespan returns the -RefreshTokenGrantRefreshTokenLifespan field if non-nil, zero value otherwise. - -### GetRefreshTokenGrantRefreshTokenLifespanOk - -`func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool)` - -GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the -RefreshTokenGrantRefreshTokenLifespan field if it's non-nil, zero value -otherwise and a boolean to check if the value has been set. - -### SetRefreshTokenGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantRefreshTokenLifespan(v string)` - -SetRefreshTokenGrantRefreshTokenLifespan sets -RefreshTokenGrantRefreshTokenLifespan field to given value. - -### HasRefreshTokenGrantRefreshTokenLifespan - -`func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantRefreshTokenLifespan() bool` - -HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been -set. - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) diff --git a/internal/httpclient-next/model_update_o_auth2_client_lifespans.go b/internal/httpclient-next/model_update_o_auth2_client_lifespans.go deleted file mode 100644 index 89c0d8b4f2f..00000000000 --- a/internal/httpclient-next/model_update_o_auth2_client_lifespans.go +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// UpdateOAuth2ClientLifespans The OIDC Hybrid grant type inherits token lifespan configuration from the implicit grant. -type UpdateOAuth2ClientLifespans struct { - // Specify a time duration in milliseconds, seconds, minutes, hours. - AuthorizationCodeGrantAccessTokenLifespan *string `json:"authorization_code_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - AuthorizationCodeGrantIdTokenLifespan *string `json:"authorization_code_grant_id_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - AuthorizationCodeGrantRefreshTokenLifespan *string `json:"authorization_code_grant_refresh_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - ClientCredentialsGrantAccessTokenLifespan *string `json:"client_credentials_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - ImplicitGrantAccessTokenLifespan *string `json:"implicit_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - ImplicitGrantIdTokenLifespan *string `json:"implicit_grant_id_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - JwtBearerGrantAccessTokenLifespan *string `json:"jwt_bearer_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - PasswordGrantAccessTokenLifespan *string `json:"password_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - PasswordGrantRefreshTokenLifespan *string `json:"password_grant_refresh_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - RefreshTokenGrantAccessTokenLifespan *string `json:"refresh_token_grant_access_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - RefreshTokenGrantIdTokenLifespan *string `json:"refresh_token_grant_id_token_lifespan,omitempty"` - // Specify a time duration in milliseconds, seconds, minutes, hours. - RefreshTokenGrantRefreshTokenLifespan *string `json:"refresh_token_grant_refresh_token_lifespan,omitempty"` -} - -// NewUpdateOAuth2ClientLifespans instantiates a new UpdateOAuth2ClientLifespans 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 -func NewUpdateOAuth2ClientLifespans() *UpdateOAuth2ClientLifespans { - this := UpdateOAuth2ClientLifespans{} - return &this -} - -// NewUpdateOAuth2ClientLifespansWithDefaults instantiates a new UpdateOAuth2ClientLifespans 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 -func NewUpdateOAuth2ClientLifespansWithDefaults() *UpdateOAuth2ClientLifespans { - this := UpdateOAuth2ClientLifespans{} - return &this -} - -// GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantAccessTokenLifespan() string { - if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.AuthorizationCodeGrantAccessTokenLifespan -} - -// GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { - return nil, false - } - return o.AuthorizationCodeGrantAccessTokenLifespan, true -} - -// HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantAccessTokenLifespan() bool { - if o != nil && o.AuthorizationCodeGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetAuthorizationCodeGrantAccessTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantAccessTokenLifespan(v string) { - o.AuthorizationCodeGrantAccessTokenLifespan = &v -} - -// GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantIdTokenLifespan() string { - if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { - var ret string - return ret - } - return *o.AuthorizationCodeGrantIdTokenLifespan -} - -// GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool) { - if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { - return nil, false - } - return o.AuthorizationCodeGrantIdTokenLifespan, true -} - -// HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantIdTokenLifespan() bool { - if o != nil && o.AuthorizationCodeGrantIdTokenLifespan != nil { - return true - } - - return false -} - -// SetAuthorizationCodeGrantIdTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantIdTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantIdTokenLifespan(v string) { - o.AuthorizationCodeGrantIdTokenLifespan = &v -} - -// GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantRefreshTokenLifespan() string { - if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { - var ret string - return ret - } - return *o.AuthorizationCodeGrantRefreshTokenLifespan -} - -// GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool) { - if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { - return nil, false - } - return o.AuthorizationCodeGrantRefreshTokenLifespan, true -} - -// HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasAuthorizationCodeGrantRefreshTokenLifespan() bool { - if o != nil && o.AuthorizationCodeGrantRefreshTokenLifespan != nil { - return true - } - - return false -} - -// SetAuthorizationCodeGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantRefreshTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetAuthorizationCodeGrantRefreshTokenLifespan(v string) { - o.AuthorizationCodeGrantRefreshTokenLifespan = &v -} - -// GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetClientCredentialsGrantAccessTokenLifespan() string { - if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.ClientCredentialsGrantAccessTokenLifespan -} - -// GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { - return nil, false - } - return o.ClientCredentialsGrantAccessTokenLifespan, true -} - -// HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasClientCredentialsGrantAccessTokenLifespan() bool { - if o != nil && o.ClientCredentialsGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetClientCredentialsGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ClientCredentialsGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetClientCredentialsGrantAccessTokenLifespan(v string) { - o.ClientCredentialsGrantAccessTokenLifespan = &v -} - -// GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantAccessTokenLifespan() string { - if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.ImplicitGrantAccessTokenLifespan -} - -// GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { - return nil, false - } - return o.ImplicitGrantAccessTokenLifespan, true -} - -// HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasImplicitGrantAccessTokenLifespan() bool { - if o != nil && o.ImplicitGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetImplicitGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetImplicitGrantAccessTokenLifespan(v string) { - o.ImplicitGrantAccessTokenLifespan = &v -} - -// GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantIdTokenLifespan() string { - if o == nil || o.ImplicitGrantIdTokenLifespan == nil { - var ret string - return ret - } - return *o.ImplicitGrantIdTokenLifespan -} - -// GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetImplicitGrantIdTokenLifespanOk() (*string, bool) { - if o == nil || o.ImplicitGrantIdTokenLifespan == nil { - return nil, false - } - return o.ImplicitGrantIdTokenLifespan, true -} - -// HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasImplicitGrantIdTokenLifespan() bool { - if o != nil && o.ImplicitGrantIdTokenLifespan != nil { - return true - } - - return false -} - -// SetImplicitGrantIdTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantIdTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetImplicitGrantIdTokenLifespan(v string) { - o.ImplicitGrantIdTokenLifespan = &v -} - -// GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetJwtBearerGrantAccessTokenLifespan() string { - if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.JwtBearerGrantAccessTokenLifespan -} - -// GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { - return nil, false - } - return o.JwtBearerGrantAccessTokenLifespan, true -} - -// HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasJwtBearerGrantAccessTokenLifespan() bool { - if o != nil && o.JwtBearerGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetJwtBearerGrantAccessTokenLifespan gets a reference to the given string and assigns it to the JwtBearerGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetJwtBearerGrantAccessTokenLifespan(v string) { - o.JwtBearerGrantAccessTokenLifespan = &v -} - -// GetPasswordGrantAccessTokenLifespan returns the PasswordGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantAccessTokenLifespan() string { - if o == nil || o.PasswordGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.PasswordGrantAccessTokenLifespan -} - -// GetPasswordGrantAccessTokenLifespanOk returns a tuple with the PasswordGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.PasswordGrantAccessTokenLifespan == nil { - return nil, false - } - return o.PasswordGrantAccessTokenLifespan, true -} - -// HasPasswordGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasPasswordGrantAccessTokenLifespan() bool { - if o != nil && o.PasswordGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetPasswordGrantAccessTokenLifespan gets a reference to the given string and assigns it to the PasswordGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetPasswordGrantAccessTokenLifespan(v string) { - o.PasswordGrantAccessTokenLifespan = &v -} - -// GetPasswordGrantRefreshTokenLifespan returns the PasswordGrantRefreshTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantRefreshTokenLifespan() string { - if o == nil || o.PasswordGrantRefreshTokenLifespan == nil { - var ret string - return ret - } - return *o.PasswordGrantRefreshTokenLifespan -} - -// GetPasswordGrantRefreshTokenLifespanOk returns a tuple with the PasswordGrantRefreshTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetPasswordGrantRefreshTokenLifespanOk() (*string, bool) { - if o == nil || o.PasswordGrantRefreshTokenLifespan == nil { - return nil, false - } - return o.PasswordGrantRefreshTokenLifespan, true -} - -// HasPasswordGrantRefreshTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasPasswordGrantRefreshTokenLifespan() bool { - if o != nil && o.PasswordGrantRefreshTokenLifespan != nil { - return true - } - - return false -} - -// SetPasswordGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the PasswordGrantRefreshTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetPasswordGrantRefreshTokenLifespan(v string) { - o.PasswordGrantRefreshTokenLifespan = &v -} - -// GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantAccessTokenLifespan() string { - if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { - var ret string - return ret - } - return *o.RefreshTokenGrantAccessTokenLifespan -} - -// GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool) { - if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { - return nil, false - } - return o.RefreshTokenGrantAccessTokenLifespan, true -} - -// HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantAccessTokenLifespan() bool { - if o != nil && o.RefreshTokenGrantAccessTokenLifespan != nil { - return true - } - - return false -} - -// SetRefreshTokenGrantAccessTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantAccessTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantAccessTokenLifespan(v string) { - o.RefreshTokenGrantAccessTokenLifespan = &v -} - -// GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantIdTokenLifespan() string { - if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { - var ret string - return ret - } - return *o.RefreshTokenGrantIdTokenLifespan -} - -// GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool) { - if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { - return nil, false - } - return o.RefreshTokenGrantIdTokenLifespan, true -} - -// HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantIdTokenLifespan() bool { - if o != nil && o.RefreshTokenGrantIdTokenLifespan != nil { - return true - } - - return false -} - -// SetRefreshTokenGrantIdTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantIdTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantIdTokenLifespan(v string) { - o.RefreshTokenGrantIdTokenLifespan = &v -} - -// GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field value if set, zero value otherwise. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantRefreshTokenLifespan() string { - if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { - var ret string - return ret - } - return *o.RefreshTokenGrantRefreshTokenLifespan -} - -// GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateOAuth2ClientLifespans) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool) { - if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { - return nil, false - } - return o.RefreshTokenGrantRefreshTokenLifespan, true -} - -// HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set. -func (o *UpdateOAuth2ClientLifespans) HasRefreshTokenGrantRefreshTokenLifespan() bool { - if o != nil && o.RefreshTokenGrantRefreshTokenLifespan != nil { - return true - } - - return false -} - -// SetRefreshTokenGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantRefreshTokenLifespan field. -func (o *UpdateOAuth2ClientLifespans) SetRefreshTokenGrantRefreshTokenLifespan(v string) { - o.RefreshTokenGrantRefreshTokenLifespan = &v -} - -func (o UpdateOAuth2ClientLifespans) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AuthorizationCodeGrantAccessTokenLifespan != nil { - toSerialize["authorization_code_grant_access_token_lifespan"] = o.AuthorizationCodeGrantAccessTokenLifespan - } - if o.AuthorizationCodeGrantIdTokenLifespan != nil { - toSerialize["authorization_code_grant_id_token_lifespan"] = o.AuthorizationCodeGrantIdTokenLifespan - } - if o.AuthorizationCodeGrantRefreshTokenLifespan != nil { - toSerialize["authorization_code_grant_refresh_token_lifespan"] = o.AuthorizationCodeGrantRefreshTokenLifespan - } - if o.ClientCredentialsGrantAccessTokenLifespan != nil { - toSerialize["client_credentials_grant_access_token_lifespan"] = o.ClientCredentialsGrantAccessTokenLifespan - } - if o.ImplicitGrantAccessTokenLifespan != nil { - toSerialize["implicit_grant_access_token_lifespan"] = o.ImplicitGrantAccessTokenLifespan - } - if o.ImplicitGrantIdTokenLifespan != nil { - toSerialize["implicit_grant_id_token_lifespan"] = o.ImplicitGrantIdTokenLifespan - } - if o.JwtBearerGrantAccessTokenLifespan != nil { - toSerialize["jwt_bearer_grant_access_token_lifespan"] = o.JwtBearerGrantAccessTokenLifespan - } - if o.PasswordGrantAccessTokenLifespan != nil { - toSerialize["password_grant_access_token_lifespan"] = o.PasswordGrantAccessTokenLifespan - } - if o.PasswordGrantRefreshTokenLifespan != nil { - toSerialize["password_grant_refresh_token_lifespan"] = o.PasswordGrantRefreshTokenLifespan - } - if o.RefreshTokenGrantAccessTokenLifespan != nil { - toSerialize["refresh_token_grant_access_token_lifespan"] = o.RefreshTokenGrantAccessTokenLifespan - } - if o.RefreshTokenGrantIdTokenLifespan != nil { - toSerialize["refresh_token_grant_id_token_lifespan"] = o.RefreshTokenGrantIdTokenLifespan - } - if o.RefreshTokenGrantRefreshTokenLifespan != nil { - toSerialize["refresh_token_grant_refresh_token_lifespan"] = o.RefreshTokenGrantRefreshTokenLifespan - } - return json.Marshal(toSerialize) -} - -type NullableUpdateOAuth2ClientLifespans struct { - value *UpdateOAuth2ClientLifespans - isSet bool -} - -func (v NullableUpdateOAuth2ClientLifespans) Get() *UpdateOAuth2ClientLifespans { - return v.value -} - -func (v *NullableUpdateOAuth2ClientLifespans) Set(val *UpdateOAuth2ClientLifespans) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateOAuth2ClientLifespans) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateOAuth2ClientLifespans) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateOAuth2ClientLifespans(val *UpdateOAuth2ClientLifespans) *NullableUpdateOAuth2ClientLifespans { - return &NullableUpdateOAuth2ClientLifespans{value: val, isSet: true} -} - -func (v NullableUpdateOAuth2ClientLifespans) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateOAuth2ClientLifespans) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index 2c91dfa422e..70e0523a823 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -1,10 +1,11 @@ .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml api_admin.go api_metadata.go -api_v1.go +api_v0alpha2.go client.go configuration.go docs/AcceptOAuth2ConsentRequest.md @@ -13,13 +14,16 @@ docs/AcceptOAuth2LoginRequest.md docs/AdminApi.md docs/AdminCreateJsonWebKeySetBody.md docs/AdminTrustOAuth2JwtGrantIssuerBody.md +docs/DefaultSession.md docs/GenericError.md docs/GetVersion200Response.md docs/HandledOAuth2ConsentRequest.md docs/HandledOAuth2LoginRequest.md docs/HandledOAuth2LogoutRequest.md +docs/Headers.md docs/HealthNotReadyStatus.md docs/HealthStatus.md +docs/IDTokenClaims.md docs/IntrospectedOAuth2Token.md docs/IsReady200Response.md docs/IsReady503Response.md @@ -27,6 +31,7 @@ docs/JsonPatch.md docs/JsonWebKey.md docs/JsonWebKeySet.md docs/MetadataApi.md +docs/OAuth2AccessRequest.md docs/OAuth2ApiError.md docs/OAuth2Client.md docs/OAuth2ConsentRequest.md @@ -42,13 +47,14 @@ docs/PreviousOAuth2ConsentSession.md docs/RefreshTokenHookRequest.md docs/RefreshTokenHookResponse.md docs/RejectOAuth2Request.md +docs/Session.md docs/SuccessfulOAuth2RequestResponse.md docs/TokenPagination.md docs/TokenPaginationHeaders.md docs/TrustedOAuth2JwtGrantIssuer.md docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/UpdateOAuth2ClientLifespans.md -docs/V1Api.md +docs/V0alpha2Api.md docs/Version.md git_push.sh go.mod @@ -58,19 +64,23 @@ model_accept_o_auth2_consent_request_session.go model_accept_o_auth2_login_request.go model_admin_create_json_web_key_set_body.go model_admin_trust_o_auth2_jwt_grant_issuer_body.go +model_default_session.go model_generic_error.go model_get_version_200_response.go model_handled_o_auth2_consent_request.go model_handled_o_auth2_login_request.go model_handled_o_auth2_logout_request.go +model_headers.go model_health_not_ready_status.go model_health_status.go +model_id_token_claims.go model_introspected_o_auth2_token.go model_is_ready_200_response.go model_is_ready_503_response.go model_json_patch.go model_json_web_key.go model_json_web_key_set.go +model_o_auth2_access_request.go model_o_auth2_api_error.go model_o_auth2_client.go model_o_auth2_consent_request.go @@ -86,6 +96,7 @@ model_previous_o_auth2_consent_session.go model_refresh_token_hook_request.go model_refresh_token_hook_response.go model_reject_o_auth2_request.go +model_session.go model_successful_o_auth2_request_response.go model_token_pagination.go model_token_pagination_headers.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index c5438bcd6f0..513c4edd76d 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -87,54 +87,54 @@ ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVari All URIs are relative to _http://localhost_ -| Class | Method | HTTP request | Description | -| ------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| _AdminApi_ | [**UpdateOAuth2ClientLifespans**](docs/AdminApi.md#updateoauth2clientlifespans) | **Put** /admin/clients/{id}/lifespans | -| _MetadataApi_ | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. | -| _MetadataApi_ | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status | -| _MetadataApi_ | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status | -| _V1Api_ | [**AdminAcceptOAuth2ConsentRequest**](docs/V1Api.md#adminacceptoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/accept | Accept an OAuth 2.0 Consent Request | -| _V1Api_ | [**AdminAcceptOAuth2LoginRequest**](docs/V1Api.md#adminacceptoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/accept | Accept an OAuth 2.0 Login Request | -| _V1Api_ | [**AdminAcceptOAuth2LogoutRequest**](docs/V1Api.md#adminacceptoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/accept | Accept an OAuth 2.0 Logout Request | -| _V1Api_ | [**AdminCreateJsonWebKeySet**](docs/V1Api.md#admincreatejsonwebkeyset) | **Post** /admin/keys/{set} | Generate a New JSON Web Key | -| _V1Api_ | [**AdminCreateOAuth2Client**](docs/V1Api.md#admincreateoauth2client) | **Post** /admin/clients | Create an OAuth 2.0 Client | -| _V1Api_ | [**AdminDeleteJsonWebKey**](docs/V1Api.md#admindeletejsonwebkey) | **Delete** /admin/keys/{set}/{kid} | Delete a JSON Web Key | -| _V1Api_ | [**AdminDeleteJsonWebKeySet**](docs/V1Api.md#admindeletejsonwebkeyset) | **Delete** /admin/keys/{set} | Delete a JSON Web Key Set | -| _V1Api_ | [**AdminDeleteOAuth2Client**](docs/V1Api.md#admindeleteoauth2client) | **Delete** /admin/clients/{id} | Deletes an OAuth 2.0 Client | -| _V1Api_ | [**AdminDeleteOAuth2Token**](docs/V1Api.md#admindeleteoauth2token) | **Delete** /admin/oauth2/tokens | Delete OAuth2 Access Tokens from a Client | -| _V1Api_ | [**AdminDeleteTrustedOAuth2JwtGrantIssuer**](docs/V1Api.md#admindeletetrustedoauth2jwtgrantissuer) | **Delete** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| _V1Api_ | [**AdminGetJsonWebKey**](docs/V1Api.md#admingetjsonwebkey) | **Get** /admin/keys/{set}/{kid} | Fetch a JSON Web Key | -| _V1Api_ | [**AdminGetJsonWebKeySet**](docs/V1Api.md#admingetjsonwebkeyset) | **Get** /admin/keys/{set} | Retrieve a JSON Web Key Set | -| _V1Api_ | [**AdminGetOAuth2Client**](docs/V1Api.md#admingetoauth2client) | **Get** /admin/clients/{id} | Get an OAuth 2.0 Client | -| _V1Api_ | [**AdminGetOAuth2ConsentRequest**](docs/V1Api.md#admingetoauth2consentrequest) | **Get** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request Information | -| _V1Api_ | [**AdminGetOAuth2LoginRequest**](docs/V1Api.md#admingetoauth2loginrequest) | **Get** /admin/oauth2/auth/requests/login | Get an OAuth 2.0 Login Request | -| _V1Api_ | [**AdminGetOAuth2LogoutRequest**](docs/V1Api.md#admingetoauth2logoutrequest) | **Get** /admin/oauth2/auth/requests/logout | Get an OAuth 2.0 Logout Request | -| _V1Api_ | [**AdminGetTrustedOAuth2JwtGrantIssuer**](docs/V1Api.md#admingettrustedoauth2jwtgrantissuer) | **Get** /admin/trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| _V1Api_ | [**AdminIntrospectOAuth2Token**](docs/V1Api.md#adminintrospectoauth2token) | **Post** /admin/oauth2/introspect | Introspect OAuth2 Access or Refresh Tokens | -| _V1Api_ | [**AdminListOAuth2Clients**](docs/V1Api.md#adminlistoauth2clients) | **Get** /admin/clients | List OAuth 2.0 Clients | -| _V1Api_ | [**AdminListOAuth2SubjectConsentSessions**](docs/V1Api.md#adminlistoauth2subjectconsentsessions) | **Get** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | -| _V1Api_ | [**AdminListTrustedOAuth2JwtGrantIssuers**](docs/V1Api.md#adminlisttrustedoauth2jwtgrantissuers) | **Get** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | -| _V1Api_ | [**AdminPatchOAuth2Client**](docs/V1Api.md#adminpatchoauth2client) | **Patch** /admin/clients/{id} | Patch an OAuth 2.0 Client | -| _V1Api_ | [**AdminRejectOAuth2ConsentRequest**](docs/V1Api.md#adminrejectoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/reject | Reject an OAuth 2.0 Consent Request | -| _V1Api_ | [**AdminRejectOAuth2LoginRequest**](docs/V1Api.md#adminrejectoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject an OAuth 2.0 Login Request | -| _V1Api_ | [**AdminRejectOAuth2LogoutRequest**](docs/V1Api.md#adminrejectoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject an OAuth 2.0 Logout Request | -| _V1Api_ | [**AdminRevokeOAuth2ConsentSessions**](docs/V1Api.md#adminrevokeoauth2consentsessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client | -| _V1Api_ | [**AdminRevokeOAuth2LoginSessions**](docs/V1Api.md#adminrevokeoauth2loginsessions) | **Delete** /admin/oauth2/auth/sessions/login | Invalidates All OAuth 2.0 Login Sessions of a Certain User | -| _V1Api_ | [**AdminTrustOAuth2JwtGrantIssuer**](docs/V1Api.md#admintrustoauth2jwtgrantissuer) | **Post** /admin/trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | -| _V1Api_ | [**AdminUpdateJsonWebKey**](docs/V1Api.md#adminupdatejsonwebkey) | **Put** /admin/keys/{set}/{kid} | Update a JSON Web Key | -| _V1Api_ | [**AdminUpdateJsonWebKeySet**](docs/V1Api.md#adminupdatejsonwebkeyset) | **Put** /admin/keys/{set} | Update a JSON Web Key Set | -| _V1Api_ | [**AdminUpdateOAuth2Client**](docs/V1Api.md#adminupdateoauth2client) | **Put** /admin/clients/{id} | Update an OAuth 2.0 Client | -| _V1Api_ | [**DiscoverJsonWebKeys**](docs/V1Api.md#discoverjsonwebkeys) | **Get** /.well-known/jwks.json | Discover JSON Web Keys | -| _V1Api_ | [**DiscoverOidcConfiguration**](docs/V1Api.md#discoveroidcconfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery | -| _V1Api_ | [**DynamicClientRegistrationCreateOAuth2Client**](docs/V1Api.md#dynamicclientregistrationcreateoauth2client) | **Post** /oauth2/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| _V1Api_ | [**DynamicClientRegistrationDeleteOAuth2Client**](docs/V1Api.md#dynamicclientregistrationdeleteoauth2client) | **Delete** /oauth2/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| _V1Api_ | [**DynamicClientRegistrationGetOAuth2Client**](docs/V1Api.md#dynamicclientregistrationgetoauth2client) | **Get** /oauth2/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| _V1Api_ | [**DynamicClientRegistrationUpdateOAuth2Client**](docs/V1Api.md#dynamicclientregistrationupdateoauth2client) | **Put** /oauth2/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| _V1Api_ | [**GetOidcUserInfo**](docs/V1Api.md#getoidcuserinfo) | **Get** /userinfo | OpenID Connect Userinfo | -| _V1Api_ | [**PerformOAuth2AuthorizationFlow**](docs/V1Api.md#performoauth2authorizationflow) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | -| _V1Api_ | [**PerformOAuth2TokenFlow**](docs/V1Api.md#performoauth2tokenflow) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint | -| _V1Api_ | [**PerformOidcFrontOrBackChannelLogout**](docs/V1Api.md#performoidcfrontorbackchannellogout) | **Get** /oauth2/sessions/logout | OpenID Connect Front- or Back-channel Enabled Logout | -| _V1Api_ | [**RevokeOAuth2Token**](docs/V1Api.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke an OAuth2 Access or Refresh Token | +| Class | Method | HTTP request | Description | +| ------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| _AdminApi_ | [**UpdateOAuth2ClientLifespans**](docs/AdminApi.md#updateoauth2clientlifespans) | **Put** /admin/clients/{id}/lifespans | +| _MetadataApi_ | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. | +| _MetadataApi_ | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status | +| _MetadataApi_ | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status | +| _V0alpha2Api_ | [**AdminAcceptOAuth2ConsentRequest**](docs/V0alpha2Api.md#adminacceptoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/accept | Accept an OAuth 2.0 Consent Request | +| _V0alpha2Api_ | [**AdminAcceptOAuth2LoginRequest**](docs/V0alpha2Api.md#adminacceptoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/accept | Accept an OAuth 2.0 Login Request | +| _V0alpha2Api_ | [**AdminAcceptOAuth2LogoutRequest**](docs/V0alpha2Api.md#adminacceptoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/accept | Accept an OAuth 2.0 Logout Request | +| _V0alpha2Api_ | [**AdminCreateJsonWebKeySet**](docs/V0alpha2Api.md#admincreatejsonwebkeyset) | **Post** /admin/keys/{set} | Generate a New JSON Web Key | +| _V0alpha2Api_ | [**AdminCreateOAuth2Client**](docs/V0alpha2Api.md#admincreateoauth2client) | **Post** /admin/clients | Create an OAuth 2.0 Client | +| _V0alpha2Api_ | [**AdminDeleteJsonWebKey**](docs/V0alpha2Api.md#admindeletejsonwebkey) | **Delete** /admin/keys/{set}/{kid} | Delete a JSON Web Key | +| _V0alpha2Api_ | [**AdminDeleteJsonWebKeySet**](docs/V0alpha2Api.md#admindeletejsonwebkeyset) | **Delete** /admin/keys/{set} | Delete a JSON Web Key Set | +| _V0alpha2Api_ | [**AdminDeleteOAuth2Client**](docs/V0alpha2Api.md#admindeleteoauth2client) | **Delete** /admin/clients/{id} | Deletes an OAuth 2.0 Client | +| _V0alpha2Api_ | [**AdminDeleteOAuth2Token**](docs/V0alpha2Api.md#admindeleteoauth2token) | **Delete** /admin/oauth2/tokens | Delete OAuth2 Access Tokens from a Client | +| _V0alpha2Api_ | [**AdminDeleteTrustedOAuth2JwtGrantIssuer**](docs/V0alpha2Api.md#admindeletetrustedoauth2jwtgrantissuer) | **Delete** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | +| _V0alpha2Api_ | [**AdminGetJsonWebKey**](docs/V0alpha2Api.md#admingetjsonwebkey) | **Get** /admin/keys/{set}/{kid} | Fetch a JSON Web Key | +| _V0alpha2Api_ | [**AdminGetJsonWebKeySet**](docs/V0alpha2Api.md#admingetjsonwebkeyset) | **Get** /admin/keys/{set} | Retrieve a JSON Web Key Set | +| _V0alpha2Api_ | [**AdminGetOAuth2Client**](docs/V0alpha2Api.md#admingetoauth2client) | **Get** /admin/clients/{id} | Get an OAuth 2.0 Client | +| _V0alpha2Api_ | [**AdminGetOAuth2ConsentRequest**](docs/V0alpha2Api.md#admingetoauth2consentrequest) | **Get** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request Information | +| _V0alpha2Api_ | [**AdminGetOAuth2LoginRequest**](docs/V0alpha2Api.md#admingetoauth2loginrequest) | **Get** /admin/oauth2/auth/requests/login | Get an OAuth 2.0 Login Request | +| _V0alpha2Api_ | [**AdminGetOAuth2LogoutRequest**](docs/V0alpha2Api.md#admingetoauth2logoutrequest) | **Get** /admin/oauth2/auth/requests/logout | Get an OAuth 2.0 Logout Request | +| _V0alpha2Api_ | [**AdminGetTrustedOAuth2JwtGrantIssuer**](docs/V0alpha2Api.md#admingettrustedoauth2jwtgrantissuer) | **Get** /admin/trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | +| _V0alpha2Api_ | [**AdminIntrospectOAuth2Token**](docs/V0alpha2Api.md#adminintrospectoauth2token) | **Post** /admin/oauth2/introspect | Introspect OAuth2 Access or Refresh Tokens | +| _V0alpha2Api_ | [**AdminListOAuth2Clients**](docs/V0alpha2Api.md#adminlistoauth2clients) | **Get** /admin/clients | List OAuth 2.0 Clients | +| _V0alpha2Api_ | [**AdminListOAuth2SubjectConsentSessions**](docs/V0alpha2Api.md#adminlistoauth2subjectconsentsessions) | **Get** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | +| _V0alpha2Api_ | [**AdminListTrustedOAuth2JwtGrantIssuers**](docs/V0alpha2Api.md#adminlisttrustedoauth2jwtgrantissuers) | **Get** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | +| _V0alpha2Api_ | [**AdminPatchOAuth2Client**](docs/V0alpha2Api.md#adminpatchoauth2client) | **Patch** /admin/clients/{id} | Patch an OAuth 2.0 Client | +| _V0alpha2Api_ | [**AdminRejectOAuth2ConsentRequest**](docs/V0alpha2Api.md#adminrejectoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/reject | Reject an OAuth 2.0 Consent Request | +| _V0alpha2Api_ | [**AdminRejectOAuth2LoginRequest**](docs/V0alpha2Api.md#adminrejectoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject an OAuth 2.0 Login Request | +| _V0alpha2Api_ | [**AdminRejectOAuth2LogoutRequest**](docs/V0alpha2Api.md#adminrejectoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject an OAuth 2.0 Logout Request | +| _V0alpha2Api_ | [**AdminRevokeOAuth2ConsentSessions**](docs/V0alpha2Api.md#adminrevokeoauth2consentsessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client | +| _V0alpha2Api_ | [**AdminRevokeOAuth2LoginSessions**](docs/V0alpha2Api.md#adminrevokeoauth2loginsessions) | **Delete** /admin/oauth2/auth/sessions/login | Invalidates All OAuth 2.0 Login Sessions of a Certain User | +| _V0alpha2Api_ | [**AdminTrustOAuth2JwtGrantIssuer**](docs/V0alpha2Api.md#admintrustoauth2jwtgrantissuer) | **Post** /admin/trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | +| _V0alpha2Api_ | [**AdminUpdateJsonWebKey**](docs/V0alpha2Api.md#adminupdatejsonwebkey) | **Put** /admin/keys/{set}/{kid} | Update a JSON Web Key | +| _V0alpha2Api_ | [**AdminUpdateJsonWebKeySet**](docs/V0alpha2Api.md#adminupdatejsonwebkeyset) | **Put** /admin/keys/{set} | Update a JSON Web Key Set | +| _V0alpha2Api_ | [**AdminUpdateOAuth2Client**](docs/V0alpha2Api.md#adminupdateoauth2client) | **Put** /admin/clients/{id} | Update an OAuth 2.0 Client | +| _V0alpha2Api_ | [**DiscoverJsonWebKeys**](docs/V0alpha2Api.md#discoverjsonwebkeys) | **Get** /.well-known/jwks.json | Discover JSON Web Keys | +| _V0alpha2Api_ | [**DiscoverOidcConfiguration**](docs/V0alpha2Api.md#discoveroidcconfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery | +| _V0alpha2Api_ | [**DynamicClientRegistrationCreateOAuth2Client**](docs/V0alpha2Api.md#dynamicclientregistrationcreateoauth2client) | **Post** /oauth2/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| _V0alpha2Api_ | [**DynamicClientRegistrationDeleteOAuth2Client**](docs/V0alpha2Api.md#dynamicclientregistrationdeleteoauth2client) | **Delete** /oauth2/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| _V0alpha2Api_ | [**DynamicClientRegistrationGetOAuth2Client**](docs/V0alpha2Api.md#dynamicclientregistrationgetoauth2client) | **Get** /oauth2/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| _V0alpha2Api_ | [**DynamicClientRegistrationUpdateOAuth2Client**](docs/V0alpha2Api.md#dynamicclientregistrationupdateoauth2client) | **Put** /oauth2/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| _V0alpha2Api_ | [**GetOidcUserInfo**](docs/V0alpha2Api.md#getoidcuserinfo) | **Get** /userinfo | OpenID Connect Userinfo | +| _V0alpha2Api_ | [**PerformOAuth2AuthorizationFlow**](docs/V0alpha2Api.md#performoauth2authorizationflow) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | +| _V0alpha2Api_ | [**PerformOAuth2TokenFlow**](docs/V0alpha2Api.md#performoauth2tokenflow) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint | +| _V0alpha2Api_ | [**PerformOidcFrontOrBackChannelLogout**](docs/V0alpha2Api.md#performoidcfrontorbackchannellogout) | **Get** /oauth2/sessions/logout | OpenID Connect Front- or Back-channel Enabled Logout | +| _V0alpha2Api_ | [**RevokeOAuth2Token**](docs/V0alpha2Api.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke an OAuth2 Access or Refresh Token | ## Documentation For Models @@ -143,19 +143,23 @@ All URIs are relative to _http://localhost_ - [AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) - [AdminCreateJsonWebKeySetBody](docs/AdminCreateJsonWebKeySetBody.md) - [AdminTrustOAuth2JwtGrantIssuerBody](docs/AdminTrustOAuth2JwtGrantIssuerBody.md) +- [DefaultSession](docs/DefaultSession.md) - [GenericError](docs/GenericError.md) - [GetVersion200Response](docs/GetVersion200Response.md) - [HandledOAuth2ConsentRequest](docs/HandledOAuth2ConsentRequest.md) - [HandledOAuth2LoginRequest](docs/HandledOAuth2LoginRequest.md) - [HandledOAuth2LogoutRequest](docs/HandledOAuth2LogoutRequest.md) +- [Headers](docs/Headers.md) - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [HealthStatus](docs/HealthStatus.md) +- [IDTokenClaims](docs/IDTokenClaims.md) - [IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) - [IsReady200Response](docs/IsReady200Response.md) - [IsReady503Response](docs/IsReady503Response.md) - [JsonPatch](docs/JsonPatch.md) - [JsonWebKey](docs/JsonWebKey.md) - [JsonWebKeySet](docs/JsonWebKeySet.md) +- [OAuth2AccessRequest](docs/OAuth2AccessRequest.md) - [OAuth2ApiError](docs/OAuth2ApiError.md) - [OAuth2Client](docs/OAuth2Client.md) - [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) @@ -171,6 +175,7 @@ All URIs are relative to _http://localhost_ - [RefreshTokenHookRequest](docs/RefreshTokenHookRequest.md) - [RefreshTokenHookResponse](docs/RefreshTokenHookResponse.md) - [RejectOAuth2Request](docs/RejectOAuth2Request.md) +- [Session](docs/Session.md) - [SuccessfulOAuth2RequestResponse](docs/SuccessfulOAuth2RequestResponse.md) - [TokenPagination](docs/TokenPagination.md) - [TokenPaginationHeaders](docs/TokenPaginationHeaders.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index fba25f78476..735f19b43c7 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -36,7 +36,7 @@ paths: description: oAuth2ApiError summary: Discover JSON Web Keys tags: - - v1 + - v0alpha2 /.well-known/openid-configuration: get: description: "The well known endpoint an be used to retrieve information @@ -68,7 +68,7 @@ paths: description: oAuth2ApiError summary: OpenID Connect Discovery tags: - - v1 + - v0alpha2 /admin/clients: get: description: "This endpoint lists all clients in the database, and never @@ -157,7 +157,7 @@ paths: description: genericError summary: List OAuth 2.0 Clients tags: - - v1 + - v0alpha2 post: description: "Create a new OAuth 2.0 client. If you pass `client_secret` the\ @@ -193,7 +193,7 @@ paths: description: genericError summary: Create an OAuth 2.0 Client tags: - - v1 + - v0alpha2 /admin/clients/{id}: delete: description: "Delete an existing OAuth 2.0 Client by its ID.\n\nOAuth 2.0 @@ -229,7 +229,7 @@ paths: description: genericError summary: Deletes an OAuth 2.0 Client tags: - - v1 + - v0alpha2 get: description: "Get an OAuth 2.0 client by its ID. This endpoint never returns\ @@ -263,7 +263,7 @@ paths: description: genericError summary: Get an OAuth 2.0 Client tags: - - v1 + - v0alpha2 patch: description: "Patch an existing OAuth 2.0 Client. If you pass `client_secret`\n\ @@ -308,7 +308,7 @@ paths: description: genericError summary: Patch an OAuth 2.0 Client tags: - - v1 + - v0alpha2 put: description: "Update an existing OAuth 2.0 Client. If you pass `client_secret`\ @@ -353,7 +353,7 @@ paths: description: genericError summary: Update an OAuth 2.0 Client tags: - - v1 + - v0alpha2 /admin/clients/{id}/lifespans: put: description: |- @@ -430,7 +430,7 @@ paths: description: oAuth2ApiError summary: Delete a JSON Web Key Set tags: - - v1 + - v0alpha2 get: description: "This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.\n\ @@ -470,7 +470,7 @@ paths: description: oAuth2ApiError summary: Retrieve a JSON Web Key Set tags: - - v1 + - v0alpha2 post: description: "This endpoint is capable of generating JSON Web Key Sets for you.\ @@ -523,7 +523,7 @@ paths: description: oAuth2ApiError summary: Generate a New JSON Web Key tags: - - v1 + - v0alpha2 put: description: "Use this method if you do not want to let Hydra generate the JWKs\ @@ -569,7 +569,7 @@ paths: description: oAuth2ApiError summary: Update a JSON Web Key Set tags: - - v1 + - v0alpha2 /admin/keys/{set}/{kid}: delete: description: "Use this endpoint to delete a single JSON Web Key.\n\nA JSON @@ -617,7 +617,7 @@ paths: description: oAuth2ApiError summary: Delete a JSON Web Key tags: - - v1 + - v0alpha2 get: description: This endpoint returns a singular JSON Web Key. It is identified by the @@ -655,7 +655,7 @@ paths: description: oAuth2ApiError summary: Fetch a JSON Web Key tags: - - v1 + - v0alpha2 put: description: "Use this method if you do not want to let Hydra generate the JWKs\ @@ -709,7 +709,7 @@ paths: description: oAuth2ApiError summary: Update a JSON Web Key tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/consent: get: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -767,7 +767,7 @@ paths: description: oAuth2ApiError summary: Get OAuth 2.0 Consent Request Information tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/consent/accept: put: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -836,7 +836,7 @@ paths: description: oAuth2ApiError summary: Accept an OAuth 2.0 Consent Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/consent/reject: put: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -902,7 +902,7 @@ paths: description: oAuth2ApiError summary: Reject an OAuth 2.0 Consent Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/login: get: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -954,7 +954,7 @@ paths: description: oAuth2ApiError summary: Get an OAuth 2.0 Login Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/login/accept: put: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -1016,7 +1016,7 @@ paths: description: oAuth2ApiError summary: Accept an OAuth 2.0 Login Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/login/reject: put: description: "When an authorization code, hybrid, or implicit OAuth 2.0 @@ -1074,7 +1074,7 @@ paths: description: oAuth2ApiError summary: Reject an OAuth 2.0 Login Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/logout: get: description: Use this endpoint to fetch a logout request. @@ -1108,7 +1108,7 @@ paths: description: oAuth2ApiError summary: Get an OAuth 2.0 Logout Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/logout/accept: put: description: "When a user or an application requests ORY Hydra to log out @@ -1142,7 +1142,7 @@ paths: description: oAuth2ApiError summary: Accept an OAuth 2.0 Logout Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/requests/logout/reject: put: description: "When a user or an application requests ORY Hydra to log out @@ -1184,7 +1184,7 @@ paths: description: oAuth2ApiError summary: Reject an OAuth 2.0 Logout Request tags: - - v1 + - v0alpha2 /admin/oauth2/auth/sessions/consent: delete: description: |- @@ -1237,7 +1237,7 @@ paths: Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client tags: - - v1 + - v0alpha2 get: description: "This endpoint lists all subject's granted consent sessions, including\ @@ -1300,7 +1300,7 @@ paths: description: oAuth2ApiError summary: List OAuth 2.0 Consent Sessions of a Subject tags: - - v1 + - v0alpha2 /admin/oauth2/auth/sessions/login: delete: description: "This endpoint invalidates a subject's authentication @@ -1334,7 +1334,7 @@ paths: description: oAuth2ApiError summary: Invalidates All OAuth 2.0 Login Sessions of a Certain User tags: - - v1 + - v0alpha2 /admin/oauth2/introspect: post: description: "The introspection endpoint allows to check if a token (both @@ -1368,7 +1368,7 @@ paths: description: oAuth2ApiError summary: Introspect OAuth2 Access or Refresh Tokens tags: - - v1 + - v0alpha2 /admin/oauth2/tokens: delete: description: @@ -1397,7 +1397,7 @@ paths: description: oAuth2ApiError summary: Delete OAuth2 Access Tokens from a Client tags: - - v1 + - v0alpha2 /admin/trust/grants/jwt-bearer/issuers: get: description: @@ -1465,7 +1465,7 @@ paths: description: genericError summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers tags: - - v1 + - v0alpha2 post: description: "Use this endpoint to establish a trust relationship for a JWT\ @@ -1495,7 +1495,7 @@ paths: description: genericError summary: Trust an OAuth2 JWT Bearer Grant Type Issuer tags: - - v1 + - v0alpha2 /admin/trust/grants/jwt-bearer/issuers/{id}: delete: description: "Use this endpoint to delete trusted JWT Bearer Grant Type @@ -1531,7 +1531,7 @@ paths: description: genericError summary: Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - - v1 + - v0alpha2 get: description: |- Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you @@ -1561,7 +1561,7 @@ paths: description: genericError summary: Get a Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - - v1 + - v0alpha2 /health/alive: get: description: "This endpoint returns a HTTP 200 status code when Ory Hydra @@ -1649,7 +1649,7 @@ paths: description: oAuth2ApiError summary: The OAuth 2.0 Authorize Endpoint tags: - - v1 + - v0alpha2 /oauth2/register: post: description: |- @@ -1689,7 +1689,7 @@ paths: Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol tags: - - v1 + - v0alpha2 /oauth2/register/{id}: delete: description: "This endpoint behaves like the administrative counterpart @@ -1743,7 +1743,7 @@ paths: Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol tags: - - v1 + - v0alpha2 get: description: "This endpoint behaves like the administrative counterpart (`getOAuth2Client`)\ @@ -1797,7 +1797,7 @@ paths: Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol tags: - - v1 + - v0alpha2 put: description: "This endpoint behaves like the administrative counterpart (`updateOAuth2Client`)\ @@ -1864,7 +1864,7 @@ paths: Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol tags: - - v1 + - v0alpha2 /oauth2/revoke: post: description: "Revoking a token (both access and refresh) means that the @@ -1901,7 +1901,7 @@ paths: - oauth2: [] summary: Revoke an OAuth2 Access or Refresh Token tags: - - v1 + - v0alpha2 /oauth2/sessions/logout: get: description: |- @@ -1920,7 +1920,7 @@ paths: 201." summary: OpenID Connect Front- or Back-channel Enabled Logout tags: - - v1 + - v0alpha2 /oauth2/token: post: description: "The client makes a request to the token endpoint by sending @@ -1960,7 +1960,7 @@ paths: - oauth2: [] summary: The OAuth 2.0 Token Endpoint tags: - - v1 + - v0alpha2 /userinfo: get: description: "This endpoint returns the payload of the ID Token, including @@ -1992,7 +1992,7 @@ paths: - oauth2: [] summary: OpenID Connect Userinfo tags: - - v1 + - v0alpha2 /version: get: description: "This endpoint returns the version of Ory Hydra.\n\nIf the @@ -2030,6 +2030,72 @@ components: deleted.\ \ The HTTP status code for empty responses is\ntypically 201." 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,\ @@ -2059,6 +2125,37 @@ components: format: uuid4 nullable: true type: string + 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 StringSliceJSONFormat: items: type: string @@ -2863,6 +2960,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 oAuth2ApiError: description: An API error caused by Ory's OAuth 2.0 APIs. example: @@ -4571,6 +4693,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 diff --git a/internal/httpclient/api_v1.go b/internal/httpclient/api_v0alpha2.go similarity index 92% rename from internal/httpclient/api_v1.go rename to internal/httpclient/api_v0alpha2.go index 61f539966ec..58daa85a001 100644 --- a/internal/httpclient/api_v1.go +++ b/internal/httpclient/api_v0alpha2.go @@ -20,12 +20,12 @@ import ( "strings" ) -// V1ApiService V1Api service -type V1ApiService service +// V0alpha2ApiService V0alpha2Api service +type V0alpha2ApiService service type ApiAdminAcceptOAuth2ConsentRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService consentChallenge *string acceptOAuth2ConsentRequest *AcceptOAuth2ConsentRequest } @@ -67,7 +67,7 @@ The response contains a redirect URL which the consent provider should redirect @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminAcceptOAuth2ConsentRequestRequest */ -func (a *V1ApiService) AdminAcceptOAuth2ConsentRequest(ctx context.Context) ApiAdminAcceptOAuth2ConsentRequestRequest { +func (a *V0alpha2ApiService) AdminAcceptOAuth2ConsentRequest(ctx context.Context) ApiAdminAcceptOAuth2ConsentRequestRequest { return ApiAdminAcceptOAuth2ConsentRequestRequest{ ApiService: a, ctx: ctx, @@ -76,7 +76,7 @@ func (a *V1ApiService) AdminAcceptOAuth2ConsentRequest(ctx context.Context) ApiA // Execute executes the request // @return SuccessfulOAuth2RequestResponse -func (a *V1ApiService) AdminAcceptOAuth2ConsentRequestExecute(r ApiAdminAcceptOAuth2ConsentRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { +func (a *V0alpha2ApiService) AdminAcceptOAuth2ConsentRequestExecute(r ApiAdminAcceptOAuth2ConsentRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -84,7 +84,7 @@ func (a *V1ApiService) AdminAcceptOAuth2ConsentRequestExecute(r ApiAdminAcceptOA localVarReturnValue *SuccessfulOAuth2RequestResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminAcceptOAuth2ConsentRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminAcceptOAuth2ConsentRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -164,7 +164,7 @@ func (a *V1ApiService) AdminAcceptOAuth2ConsentRequestExecute(r ApiAdminAcceptOA type ApiAdminAcceptOAuth2LoginRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService loginChallenge *string acceptOAuth2LoginRequest *AcceptOAuth2LoginRequest } @@ -203,7 +203,7 @@ The response contains a redirect URL which the login provider should redirect th @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminAcceptOAuth2LoginRequestRequest */ -func (a *V1ApiService) AdminAcceptOAuth2LoginRequest(ctx context.Context) ApiAdminAcceptOAuth2LoginRequestRequest { +func (a *V0alpha2ApiService) AdminAcceptOAuth2LoginRequest(ctx context.Context) ApiAdminAcceptOAuth2LoginRequestRequest { return ApiAdminAcceptOAuth2LoginRequestRequest{ ApiService: a, ctx: ctx, @@ -212,7 +212,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LoginRequest(ctx context.Context) ApiAdm // Execute executes the request // @return SuccessfulOAuth2RequestResponse -func (a *V1ApiService) AdminAcceptOAuth2LoginRequestExecute(r ApiAdminAcceptOAuth2LoginRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { +func (a *V0alpha2ApiService) AdminAcceptOAuth2LoginRequestExecute(r ApiAdminAcceptOAuth2LoginRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -220,7 +220,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LoginRequestExecute(r ApiAdminAcceptOAut localVarReturnValue *SuccessfulOAuth2RequestResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminAcceptOAuth2LoginRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminAcceptOAuth2LoginRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -300,7 +300,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LoginRequestExecute(r ApiAdminAcceptOAut type ApiAdminAcceptOAuth2LogoutRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService logoutChallenge *string } @@ -323,7 +323,7 @@ The response contains a redirect URL which the consent provider should redirect @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminAcceptOAuth2LogoutRequestRequest */ -func (a *V1ApiService) AdminAcceptOAuth2LogoutRequest(ctx context.Context) ApiAdminAcceptOAuth2LogoutRequestRequest { +func (a *V0alpha2ApiService) AdminAcceptOAuth2LogoutRequest(ctx context.Context) ApiAdminAcceptOAuth2LogoutRequestRequest { return ApiAdminAcceptOAuth2LogoutRequestRequest{ ApiService: a, ctx: ctx, @@ -332,7 +332,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LogoutRequest(ctx context.Context) ApiAd // Execute executes the request // @return SuccessfulOAuth2RequestResponse -func (a *V1ApiService) AdminAcceptOAuth2LogoutRequestExecute(r ApiAdminAcceptOAuth2LogoutRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { +func (a *V0alpha2ApiService) AdminAcceptOAuth2LogoutRequestExecute(r ApiAdminAcceptOAuth2LogoutRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -340,7 +340,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LogoutRequestExecute(r ApiAdminAcceptOAu localVarReturnValue *SuccessfulOAuth2RequestResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminAcceptOAuth2LogoutRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminAcceptOAuth2LogoutRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -418,7 +418,7 @@ func (a *V1ApiService) AdminAcceptOAuth2LogoutRequestExecute(r ApiAdminAcceptOAu type ApiAdminCreateJsonWebKeySetRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string adminCreateJsonWebKeySetBody *AdminCreateJsonWebKeySetBody } @@ -443,7 +443,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param set The JSON Web Key Set @return ApiAdminCreateJsonWebKeySetRequest */ -func (a *V1ApiService) AdminCreateJsonWebKeySet(ctx context.Context, set string) ApiAdminCreateJsonWebKeySetRequest { +func (a *V0alpha2ApiService) AdminCreateJsonWebKeySet(ctx context.Context, set string) ApiAdminCreateJsonWebKeySetRequest { return ApiAdminCreateJsonWebKeySetRequest{ ApiService: a, ctx: ctx, @@ -453,7 +453,7 @@ func (a *V1ApiService) AdminCreateJsonWebKeySet(ctx context.Context, set string) // Execute executes the request // @return JsonWebKeySet -func (a *V1ApiService) AdminCreateJsonWebKeySetExecute(r ApiAdminCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { +func (a *V0alpha2ApiService) AdminCreateJsonWebKeySetExecute(r ApiAdminCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -461,7 +461,7 @@ func (a *V1ApiService) AdminCreateJsonWebKeySetExecute(r ApiAdminCreateJsonWebKe localVarReturnValue *JsonWebKeySet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminCreateJsonWebKeySet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminCreateJsonWebKeySet") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -541,7 +541,7 @@ func (a *V1ApiService) AdminCreateJsonWebKeySetExecute(r ApiAdminCreateJsonWebKe type ApiAdminCreateOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService oAuth2Client *OAuth2Client } @@ -566,7 +566,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminCreateOAuth2ClientRequest */ -func (a *V1ApiService) AdminCreateOAuth2Client(ctx context.Context) ApiAdminCreateOAuth2ClientRequest { +func (a *V0alpha2ApiService) AdminCreateOAuth2Client(ctx context.Context) ApiAdminCreateOAuth2ClientRequest { return ApiAdminCreateOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -575,7 +575,7 @@ func (a *V1ApiService) AdminCreateOAuth2Client(ctx context.Context) ApiAdminCrea // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) AdminCreateOAuth2ClientExecute(r ApiAdminCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) AdminCreateOAuth2ClientExecute(r ApiAdminCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -583,7 +583,7 @@ func (a *V1ApiService) AdminCreateOAuth2ClientExecute(r ApiAdminCreateOAuth2Clie localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminCreateOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminCreateOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -662,7 +662,7 @@ func (a *V1ApiService) AdminCreateOAuth2ClientExecute(r ApiAdminCreateOAuth2Clie type ApiAdminDeleteJsonWebKeyRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string kid string } @@ -683,7 +683,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param kid The JSON Web Key ID (kid) @return ApiAdminDeleteJsonWebKeyRequest */ -func (a *V1ApiService) AdminDeleteJsonWebKey(ctx context.Context, set string, kid string) ApiAdminDeleteJsonWebKeyRequest { +func (a *V0alpha2ApiService) AdminDeleteJsonWebKey(ctx context.Context, set string, kid string) ApiAdminDeleteJsonWebKeyRequest { return ApiAdminDeleteJsonWebKeyRequest{ ApiService: a, ctx: ctx, @@ -693,14 +693,14 @@ func (a *V1ApiService) AdminDeleteJsonWebKey(ctx context.Context, set string, ki } // Execute executes the request -func (a *V1ApiService) AdminDeleteJsonWebKeyExecute(r ApiAdminDeleteJsonWebKeyRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminDeleteJsonWebKeyExecute(r ApiAdminDeleteJsonWebKeyRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminDeleteJsonWebKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminDeleteJsonWebKey") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -767,7 +767,7 @@ func (a *V1ApiService) AdminDeleteJsonWebKeyExecute(r ApiAdminDeleteJsonWebKeyRe type ApiAdminDeleteJsonWebKeySetRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string } @@ -786,7 +786,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param set The JSON Web Key Set @return ApiAdminDeleteJsonWebKeySetRequest */ -func (a *V1ApiService) AdminDeleteJsonWebKeySet(ctx context.Context, set string) ApiAdminDeleteJsonWebKeySetRequest { +func (a *V0alpha2ApiService) AdminDeleteJsonWebKeySet(ctx context.Context, set string) ApiAdminDeleteJsonWebKeySetRequest { return ApiAdminDeleteJsonWebKeySetRequest{ ApiService: a, ctx: ctx, @@ -795,14 +795,14 @@ func (a *V1ApiService) AdminDeleteJsonWebKeySet(ctx context.Context, set string) } // Execute executes the request -func (a *V1ApiService) AdminDeleteJsonWebKeySetExecute(r ApiAdminDeleteJsonWebKeySetRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminDeleteJsonWebKeySetExecute(r ApiAdminDeleteJsonWebKeySetRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminDeleteJsonWebKeySet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminDeleteJsonWebKeySet") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -868,7 +868,7 @@ func (a *V1ApiService) AdminDeleteJsonWebKeySetExecute(r ApiAdminDeleteJsonWebKe type ApiAdminDeleteOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -890,7 +890,7 @@ Make sure that this endpoint is well protected and only callable by first-party @param id The id of the OAuth 2.0 Client. @return ApiAdminDeleteOAuth2ClientRequest */ -func (a *V1ApiService) AdminDeleteOAuth2Client(ctx context.Context, id string) ApiAdminDeleteOAuth2ClientRequest { +func (a *V0alpha2ApiService) AdminDeleteOAuth2Client(ctx context.Context, id string) ApiAdminDeleteOAuth2ClientRequest { return ApiAdminDeleteOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -899,14 +899,14 @@ func (a *V1ApiService) AdminDeleteOAuth2Client(ctx context.Context, id string) A } // Execute executes the request -func (a *V1ApiService) AdminDeleteOAuth2ClientExecute(r ApiAdminDeleteOAuth2ClientRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminDeleteOAuth2ClientExecute(r ApiAdminDeleteOAuth2ClientRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminDeleteOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminDeleteOAuth2Client") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -972,7 +972,7 @@ func (a *V1ApiService) AdminDeleteOAuth2ClientExecute(r ApiAdminDeleteOAuth2Clie type ApiAdminDeleteOAuth2TokenRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService clientId *string } @@ -993,7 +993,7 @@ This endpoint deletes OAuth2 access tokens issued for a client from the database @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminDeleteOAuth2TokenRequest */ -func (a *V1ApiService) AdminDeleteOAuth2Token(ctx context.Context) ApiAdminDeleteOAuth2TokenRequest { +func (a *V0alpha2ApiService) AdminDeleteOAuth2Token(ctx context.Context) ApiAdminDeleteOAuth2TokenRequest { return ApiAdminDeleteOAuth2TokenRequest{ ApiService: a, ctx: ctx, @@ -1001,14 +1001,14 @@ func (a *V1ApiService) AdminDeleteOAuth2Token(ctx context.Context) ApiAdminDelet } // Execute executes the request -func (a *V1ApiService) AdminDeleteOAuth2TokenExecute(r ApiAdminDeleteOAuth2TokenRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminDeleteOAuth2TokenExecute(r ApiAdminDeleteOAuth2TokenRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminDeleteOAuth2Token") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminDeleteOAuth2Token") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1077,7 +1077,7 @@ func (a *V1ApiService) AdminDeleteOAuth2TokenExecute(r ApiAdminDeleteOAuth2Token type ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -1098,7 +1098,7 @@ for OAuth 2.0 Client Authentication and Authorization Grant. @param id The id of the desired grant @return ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest */ -func (a *V1ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest { +func (a *V0alpha2ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest { return ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest{ ApiService: a, ctx: ctx, @@ -1107,14 +1107,14 @@ func (a *V1ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuer(ctx context.Contex } // Execute executes the request -func (a *V1ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminDeleteTrustedOAuth2JwtGrantIssuerRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminDeleteTrustedOAuth2JwtGrantIssuer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminDeleteTrustedOAuth2JwtGrantIssuer") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1180,7 +1180,7 @@ func (a *V1ApiService) AdminDeleteTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminD type ApiAdminGetJsonWebKeyRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string kid string } @@ -1199,7 +1199,7 @@ This endpoint returns a singular JSON Web Key. It is identified by the set and t @param kid The JSON Web Key ID (kid) @return ApiAdminGetJsonWebKeyRequest */ -func (a *V1ApiService) AdminGetJsonWebKey(ctx context.Context, set string, kid string) ApiAdminGetJsonWebKeyRequest { +func (a *V0alpha2ApiService) AdminGetJsonWebKey(ctx context.Context, set string, kid string) ApiAdminGetJsonWebKeyRequest { return ApiAdminGetJsonWebKeyRequest{ ApiService: a, ctx: ctx, @@ -1210,7 +1210,7 @@ func (a *V1ApiService) AdminGetJsonWebKey(ctx context.Context, set string, kid s // Execute executes the request // @return JsonWebKeySet -func (a *V1ApiService) AdminGetJsonWebKeyExecute(r ApiAdminGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetJsonWebKeyExecute(r ApiAdminGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1218,7 +1218,7 @@ func (a *V1ApiService) AdminGetJsonWebKeyExecute(r ApiAdminGetJsonWebKeyRequest) localVarReturnValue *JsonWebKeySet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetJsonWebKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetJsonWebKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1294,7 +1294,7 @@ func (a *V1ApiService) AdminGetJsonWebKeyExecute(r ApiAdminGetJsonWebKeyRequest) type ApiAdminGetJsonWebKeySetRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string } @@ -1313,7 +1313,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param set The JSON Web Key Set @return ApiAdminGetJsonWebKeySetRequest */ -func (a *V1ApiService) AdminGetJsonWebKeySet(ctx context.Context, set string) ApiAdminGetJsonWebKeySetRequest { +func (a *V0alpha2ApiService) AdminGetJsonWebKeySet(ctx context.Context, set string) ApiAdminGetJsonWebKeySetRequest { return ApiAdminGetJsonWebKeySetRequest{ ApiService: a, ctx: ctx, @@ -1323,7 +1323,7 @@ func (a *V1ApiService) AdminGetJsonWebKeySet(ctx context.Context, set string) Ap // Execute executes the request // @return JsonWebKeySet -func (a *V1ApiService) AdminGetJsonWebKeySetExecute(r ApiAdminGetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetJsonWebKeySetExecute(r ApiAdminGetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1331,7 +1331,7 @@ func (a *V1ApiService) AdminGetJsonWebKeySetExecute(r ApiAdminGetJsonWebKeySetRe localVarReturnValue *JsonWebKeySet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetJsonWebKeySet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetJsonWebKeySet") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1406,7 +1406,7 @@ func (a *V1ApiService) AdminGetJsonWebKeySetExecute(r ApiAdminGetJsonWebKeySetRe type ApiAdminGetOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -1426,7 +1426,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiAdminGetOAuth2ClientRequest */ -func (a *V1ApiService) AdminGetOAuth2Client(ctx context.Context, id string) ApiAdminGetOAuth2ClientRequest { +func (a *V0alpha2ApiService) AdminGetOAuth2Client(ctx context.Context, id string) ApiAdminGetOAuth2ClientRequest { return ApiAdminGetOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -1436,7 +1436,7 @@ func (a *V1ApiService) AdminGetOAuth2Client(ctx context.Context, id string) ApiA // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) AdminGetOAuth2ClientExecute(r ApiAdminGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetOAuth2ClientExecute(r ApiAdminGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1444,7 +1444,7 @@ func (a *V1ApiService) AdminGetOAuth2ClientExecute(r ApiAdminGetOAuth2ClientRequ localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1519,7 +1519,7 @@ func (a *V1ApiService) AdminGetOAuth2ClientExecute(r ApiAdminGetOAuth2ClientRequ type ApiAdminGetOAuth2ConsentRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService consentChallenge *string } @@ -1549,7 +1549,7 @@ or rejected the request. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminGetOAuth2ConsentRequestRequest */ -func (a *V1ApiService) AdminGetOAuth2ConsentRequest(ctx context.Context) ApiAdminGetOAuth2ConsentRequestRequest { +func (a *V0alpha2ApiService) AdminGetOAuth2ConsentRequest(ctx context.Context) ApiAdminGetOAuth2ConsentRequestRequest { return ApiAdminGetOAuth2ConsentRequestRequest{ ApiService: a, ctx: ctx, @@ -1558,7 +1558,7 @@ func (a *V1ApiService) AdminGetOAuth2ConsentRequest(ctx context.Context) ApiAdmi // Execute executes the request // @return OAuth2ConsentRequest -func (a *V1ApiService) AdminGetOAuth2ConsentRequestExecute(r ApiAdminGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetOAuth2ConsentRequestExecute(r ApiAdminGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1566,7 +1566,7 @@ func (a *V1ApiService) AdminGetOAuth2ConsentRequestExecute(r ApiAdminGetOAuth2Co localVarReturnValue *OAuth2ConsentRequest ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetOAuth2ConsentRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetOAuth2ConsentRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1654,7 +1654,7 @@ func (a *V1ApiService) AdminGetOAuth2ConsentRequestExecute(r ApiAdminGetOAuth2Co type ApiAdminGetOAuth2LoginRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService loginChallenge *string } @@ -1681,7 +1681,7 @@ provider uses that challenge to fetch information on the OAuth2 request and then @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminGetOAuth2LoginRequestRequest */ -func (a *V1ApiService) AdminGetOAuth2LoginRequest(ctx context.Context) ApiAdminGetOAuth2LoginRequestRequest { +func (a *V0alpha2ApiService) AdminGetOAuth2LoginRequest(ctx context.Context) ApiAdminGetOAuth2LoginRequestRequest { return ApiAdminGetOAuth2LoginRequestRequest{ ApiService: a, ctx: ctx, @@ -1690,7 +1690,7 @@ func (a *V1ApiService) AdminGetOAuth2LoginRequest(ctx context.Context) ApiAdminG // Execute executes the request // @return OAuth2LoginRequest -func (a *V1ApiService) AdminGetOAuth2LoginRequestExecute(r ApiAdminGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetOAuth2LoginRequestExecute(r ApiAdminGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1698,7 +1698,7 @@ func (a *V1ApiService) AdminGetOAuth2LoginRequestExecute(r ApiAdminGetOAuth2Logi localVarReturnValue *OAuth2LoginRequest ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetOAuth2LoginRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetOAuth2LoginRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1786,7 +1786,7 @@ func (a *V1ApiService) AdminGetOAuth2LoginRequestExecute(r ApiAdminGetOAuth2Logi type ApiAdminGetOAuth2LogoutRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService logoutChallenge *string } @@ -1807,7 +1807,7 @@ Use this endpoint to fetch a logout request. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminGetOAuth2LogoutRequestRequest */ -func (a *V1ApiService) AdminGetOAuth2LogoutRequest(ctx context.Context) ApiAdminGetOAuth2LogoutRequestRequest { +func (a *V0alpha2ApiService) AdminGetOAuth2LogoutRequest(ctx context.Context) ApiAdminGetOAuth2LogoutRequestRequest { return ApiAdminGetOAuth2LogoutRequestRequest{ ApiService: a, ctx: ctx, @@ -1816,7 +1816,7 @@ func (a *V1ApiService) AdminGetOAuth2LogoutRequest(ctx context.Context) ApiAdmin // Execute executes the request // @return OAuth2LogoutRequest -func (a *V1ApiService) AdminGetOAuth2LogoutRequestExecute(r ApiAdminGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetOAuth2LogoutRequestExecute(r ApiAdminGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1824,7 +1824,7 @@ func (a *V1ApiService) AdminGetOAuth2LogoutRequestExecute(r ApiAdminGetOAuth2Log localVarReturnValue *OAuth2LogoutRequest ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetOAuth2LogoutRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetOAuth2LogoutRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1912,7 +1912,7 @@ func (a *V1ApiService) AdminGetOAuth2LogoutRequestExecute(r ApiAdminGetOAuth2Log type ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -1930,7 +1930,7 @@ created the trust relationship. @param id The id of the desired grant @return ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest */ -func (a *V1ApiService) AdminGetTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest { +func (a *V0alpha2ApiService) AdminGetTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest { return ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest{ ApiService: a, ctx: ctx, @@ -1940,7 +1940,7 @@ func (a *V1ApiService) AdminGetTrustedOAuth2JwtGrantIssuer(ctx context.Context, // Execute executes the request // @return TrustedOAuth2JwtGrantIssuer -func (a *V1ApiService) AdminGetTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { +func (a *V0alpha2ApiService) AdminGetTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminGetTrustedOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1948,7 +1948,7 @@ func (a *V1ApiService) AdminGetTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminGetT localVarReturnValue *TrustedOAuth2JwtGrantIssuer ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminGetTrustedOAuth2JwtGrantIssuer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminGetTrustedOAuth2JwtGrantIssuer") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2023,7 +2023,7 @@ func (a *V1ApiService) AdminGetTrustedOAuth2JwtGrantIssuerExecute(r ApiAdminGetT type ApiAdminIntrospectOAuth2TokenRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService token *string scope *string } @@ -2056,7 +2056,7 @@ For more information [read this blog post](https://www.oauth.com/oauth2-servers/ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminIntrospectOAuth2TokenRequest */ -func (a *V1ApiService) AdminIntrospectOAuth2Token(ctx context.Context) ApiAdminIntrospectOAuth2TokenRequest { +func (a *V0alpha2ApiService) AdminIntrospectOAuth2Token(ctx context.Context) ApiAdminIntrospectOAuth2TokenRequest { return ApiAdminIntrospectOAuth2TokenRequest{ ApiService: a, ctx: ctx, @@ -2065,7 +2065,7 @@ func (a *V1ApiService) AdminIntrospectOAuth2Token(ctx context.Context) ApiAdminI // Execute executes the request // @return IntrospectedOAuth2Token -func (a *V1ApiService) AdminIntrospectOAuth2TokenExecute(r ApiAdminIntrospectOAuth2TokenRequest) (*IntrospectedOAuth2Token, *http.Response, error) { +func (a *V0alpha2ApiService) AdminIntrospectOAuth2TokenExecute(r ApiAdminIntrospectOAuth2TokenRequest) (*IntrospectedOAuth2Token, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -2073,7 +2073,7 @@ func (a *V1ApiService) AdminIntrospectOAuth2TokenExecute(r ApiAdminIntrospectOAu localVarReturnValue *IntrospectedOAuth2Token ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminIntrospectOAuth2Token") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminIntrospectOAuth2Token") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2154,7 +2154,7 @@ func (a *V1ApiService) AdminIntrospectOAuth2TokenExecute(r ApiAdminIntrospectOAu type ApiAdminListOAuth2ClientsRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService pageSize *int64 pageToken *string clientName *string @@ -2207,7 +2207,7 @@ be included in this header, and will be separated by a comma. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminListOAuth2ClientsRequest */ -func (a *V1ApiService) AdminListOAuth2Clients(ctx context.Context) ApiAdminListOAuth2ClientsRequest { +func (a *V0alpha2ApiService) AdminListOAuth2Clients(ctx context.Context) ApiAdminListOAuth2ClientsRequest { return ApiAdminListOAuth2ClientsRequest{ ApiService: a, ctx: ctx, @@ -2216,7 +2216,7 @@ func (a *V1ApiService) AdminListOAuth2Clients(ctx context.Context) ApiAdminListO // Execute executes the request // @return []OAuth2Client -func (a *V1ApiService) AdminListOAuth2ClientsExecute(r ApiAdminListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) AdminListOAuth2ClientsExecute(r ApiAdminListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2224,7 +2224,7 @@ func (a *V1ApiService) AdminListOAuth2ClientsExecute(r ApiAdminListOAuth2Clients localVarReturnValue []OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminListOAuth2Clients") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminListOAuth2Clients") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2310,7 +2310,7 @@ func (a *V1ApiService) AdminListOAuth2ClientsExecute(r ApiAdminListOAuth2Clients type ApiAdminListOAuth2SubjectConsentSessionsRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService subject *string link *string xTotalCount *string @@ -2351,7 +2351,7 @@ Multiple links can be included in this header, and will be separated by a comma. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminListOAuth2SubjectConsentSessionsRequest */ -func (a *V1ApiService) AdminListOAuth2SubjectConsentSessions(ctx context.Context) ApiAdminListOAuth2SubjectConsentSessionsRequest { +func (a *V0alpha2ApiService) AdminListOAuth2SubjectConsentSessions(ctx context.Context) ApiAdminListOAuth2SubjectConsentSessionsRequest { return ApiAdminListOAuth2SubjectConsentSessionsRequest{ ApiService: a, ctx: ctx, @@ -2360,7 +2360,7 @@ func (a *V1ApiService) AdminListOAuth2SubjectConsentSessions(ctx context.Context // Execute executes the request // @return []PreviousOAuth2ConsentSession -func (a *V1ApiService) AdminListOAuth2SubjectConsentSessionsExecute(r ApiAdminListOAuth2SubjectConsentSessionsRequest) ([]PreviousOAuth2ConsentSession, *http.Response, error) { +func (a *V0alpha2ApiService) AdminListOAuth2SubjectConsentSessionsExecute(r ApiAdminListOAuth2SubjectConsentSessionsRequest) ([]PreviousOAuth2ConsentSession, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2368,7 +2368,7 @@ func (a *V1ApiService) AdminListOAuth2SubjectConsentSessionsExecute(r ApiAdminLi localVarReturnValue []PreviousOAuth2ConsentSession ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminListOAuth2SubjectConsentSessions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminListOAuth2SubjectConsentSessions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2452,7 +2452,7 @@ func (a *V1ApiService) AdminListOAuth2SubjectConsentSessionsExecute(r ApiAdminLi type ApiAdminListTrustedOAuth2JwtGrantIssuersRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService maxItems *int64 defaultItems *int64 issuer *string @@ -2500,7 +2500,7 @@ Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminListTrustedOAuth2JwtGrantIssuersRequest */ -func (a *V1ApiService) AdminListTrustedOAuth2JwtGrantIssuers(ctx context.Context) ApiAdminListTrustedOAuth2JwtGrantIssuersRequest { +func (a *V0alpha2ApiService) AdminListTrustedOAuth2JwtGrantIssuers(ctx context.Context) ApiAdminListTrustedOAuth2JwtGrantIssuersRequest { return ApiAdminListTrustedOAuth2JwtGrantIssuersRequest{ ApiService: a, ctx: ctx, @@ -2509,7 +2509,7 @@ func (a *V1ApiService) AdminListTrustedOAuth2JwtGrantIssuers(ctx context.Context // Execute executes the request // @return []TrustedOAuth2JwtGrantIssuer -func (a *V1ApiService) AdminListTrustedOAuth2JwtGrantIssuersExecute(r ApiAdminListTrustedOAuth2JwtGrantIssuersRequest) ([]TrustedOAuth2JwtGrantIssuer, *http.Response, error) { +func (a *V0alpha2ApiService) AdminListTrustedOAuth2JwtGrantIssuersExecute(r ApiAdminListTrustedOAuth2JwtGrantIssuersRequest) ([]TrustedOAuth2JwtGrantIssuer, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2517,7 +2517,7 @@ func (a *V1ApiService) AdminListTrustedOAuth2JwtGrantIssuersExecute(r ApiAdminLi localVarReturnValue []TrustedOAuth2JwtGrantIssuer ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminListTrustedOAuth2JwtGrantIssuers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminListTrustedOAuth2JwtGrantIssuers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2606,7 +2606,7 @@ func (a *V1ApiService) AdminListTrustedOAuth2JwtGrantIssuersExecute(r ApiAdminLi type ApiAdminPatchOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string jsonPatch *[]JsonPatch } @@ -2634,7 +2634,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiAdminPatchOAuth2ClientRequest */ -func (a *V1ApiService) AdminPatchOAuth2Client(ctx context.Context, id string) ApiAdminPatchOAuth2ClientRequest { +func (a *V0alpha2ApiService) AdminPatchOAuth2Client(ctx context.Context, id string) ApiAdminPatchOAuth2ClientRequest { return ApiAdminPatchOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -2644,7 +2644,7 @@ func (a *V1ApiService) AdminPatchOAuth2Client(ctx context.Context, id string) Ap // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) AdminPatchOAuth2ClientExecute(r ApiAdminPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) AdminPatchOAuth2ClientExecute(r ApiAdminPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} @@ -2652,7 +2652,7 @@ func (a *V1ApiService) AdminPatchOAuth2ClientExecute(r ApiAdminPatchOAuth2Client localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminPatchOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminPatchOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2732,7 +2732,7 @@ func (a *V1ApiService) AdminPatchOAuth2ClientExecute(r ApiAdminPatchOAuth2Client type ApiAdminRejectOAuth2ConsentRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService consentChallenge *string rejectOAuth2Request *RejectOAuth2Request } @@ -2773,7 +2773,7 @@ The response contains a redirect URL which the consent provider should redirect @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminRejectOAuth2ConsentRequestRequest */ -func (a *V1ApiService) AdminRejectOAuth2ConsentRequest(ctx context.Context) ApiAdminRejectOAuth2ConsentRequestRequest { +func (a *V0alpha2ApiService) AdminRejectOAuth2ConsentRequest(ctx context.Context) ApiAdminRejectOAuth2ConsentRequestRequest { return ApiAdminRejectOAuth2ConsentRequestRequest{ ApiService: a, ctx: ctx, @@ -2782,7 +2782,7 @@ func (a *V1ApiService) AdminRejectOAuth2ConsentRequest(ctx context.Context) ApiA // Execute executes the request // @return SuccessfulOAuth2RequestResponse -func (a *V1ApiService) AdminRejectOAuth2ConsentRequestExecute(r ApiAdminRejectOAuth2ConsentRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { +func (a *V0alpha2ApiService) AdminRejectOAuth2ConsentRequestExecute(r ApiAdminRejectOAuth2ConsentRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -2790,7 +2790,7 @@ func (a *V1ApiService) AdminRejectOAuth2ConsentRequestExecute(r ApiAdminRejectOA localVarReturnValue *SuccessfulOAuth2RequestResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminRejectOAuth2ConsentRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminRejectOAuth2ConsentRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2870,7 +2870,7 @@ func (a *V1ApiService) AdminRejectOAuth2ConsentRequestExecute(r ApiAdminRejectOA type ApiAdminRejectOAuth2LoginRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService loginChallenge *string rejectOAuth2Request *RejectOAuth2Request } @@ -2908,7 +2908,7 @@ The response contains a redirect URL which the login provider should redirect th @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminRejectOAuth2LoginRequestRequest */ -func (a *V1ApiService) AdminRejectOAuth2LoginRequest(ctx context.Context) ApiAdminRejectOAuth2LoginRequestRequest { +func (a *V0alpha2ApiService) AdminRejectOAuth2LoginRequest(ctx context.Context) ApiAdminRejectOAuth2LoginRequestRequest { return ApiAdminRejectOAuth2LoginRequestRequest{ ApiService: a, ctx: ctx, @@ -2917,7 +2917,7 @@ func (a *V1ApiService) AdminRejectOAuth2LoginRequest(ctx context.Context) ApiAdm // Execute executes the request // @return SuccessfulOAuth2RequestResponse -func (a *V1ApiService) AdminRejectOAuth2LoginRequestExecute(r ApiAdminRejectOAuth2LoginRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { +func (a *V0alpha2ApiService) AdminRejectOAuth2LoginRequestExecute(r ApiAdminRejectOAuth2LoginRequestRequest) (*SuccessfulOAuth2RequestResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -2925,7 +2925,7 @@ func (a *V1ApiService) AdminRejectOAuth2LoginRequestExecute(r ApiAdminRejectOAut localVarReturnValue *SuccessfulOAuth2RequestResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminRejectOAuth2LoginRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminRejectOAuth2LoginRequest") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3005,7 +3005,7 @@ func (a *V1ApiService) AdminRejectOAuth2LoginRequestExecute(r ApiAdminRejectOAut type ApiAdminRejectOAuth2LogoutRequestRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService logoutChallenge *string rejectOAuth2Request *RejectOAuth2Request } @@ -3035,7 +3035,7 @@ The response is empty as the logout provider has to chose what action to perform @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminRejectOAuth2LogoutRequestRequest */ -func (a *V1ApiService) AdminRejectOAuth2LogoutRequest(ctx context.Context) ApiAdminRejectOAuth2LogoutRequestRequest { +func (a *V0alpha2ApiService) AdminRejectOAuth2LogoutRequest(ctx context.Context) ApiAdminRejectOAuth2LogoutRequestRequest { return ApiAdminRejectOAuth2LogoutRequestRequest{ ApiService: a, ctx: ctx, @@ -3043,14 +3043,14 @@ func (a *V1ApiService) AdminRejectOAuth2LogoutRequest(ctx context.Context) ApiAd } // Execute executes the request -func (a *V1ApiService) AdminRejectOAuth2LogoutRequestExecute(r ApiAdminRejectOAuth2LogoutRequestRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminRejectOAuth2LogoutRequestExecute(r ApiAdminRejectOAuth2LogoutRequestRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminRejectOAuth2LogoutRequest") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminRejectOAuth2LogoutRequest") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -3121,7 +3121,7 @@ func (a *V1ApiService) AdminRejectOAuth2LogoutRequestExecute(r ApiAdminRejectOAu type ApiAdminRevokeOAuth2ConsentSessionsRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService subject *string client *string all *bool @@ -3158,7 +3158,7 @@ associated OAuth 2.0 Access Tokens. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminRevokeOAuth2ConsentSessionsRequest */ -func (a *V1ApiService) AdminRevokeOAuth2ConsentSessions(ctx context.Context) ApiAdminRevokeOAuth2ConsentSessionsRequest { +func (a *V0alpha2ApiService) AdminRevokeOAuth2ConsentSessions(ctx context.Context) ApiAdminRevokeOAuth2ConsentSessionsRequest { return ApiAdminRevokeOAuth2ConsentSessionsRequest{ ApiService: a, ctx: ctx, @@ -3166,14 +3166,14 @@ func (a *V1ApiService) AdminRevokeOAuth2ConsentSessions(ctx context.Context) Api } // Execute executes the request -func (a *V1ApiService) AdminRevokeOAuth2ConsentSessionsExecute(r ApiAdminRevokeOAuth2ConsentSessionsRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminRevokeOAuth2ConsentSessionsExecute(r ApiAdminRevokeOAuth2ConsentSessionsRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminRevokeOAuth2ConsentSessions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminRevokeOAuth2ConsentSessions") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -3248,7 +3248,7 @@ func (a *V1ApiService) AdminRevokeOAuth2ConsentSessionsExecute(r ApiAdminRevokeO type ApiAdminRevokeOAuth2LoginSessionsRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService subject *string } @@ -3272,7 +3272,7 @@ Front- or Back-channel logout. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminRevokeOAuth2LoginSessionsRequest */ -func (a *V1ApiService) AdminRevokeOAuth2LoginSessions(ctx context.Context) ApiAdminRevokeOAuth2LoginSessionsRequest { +func (a *V0alpha2ApiService) AdminRevokeOAuth2LoginSessions(ctx context.Context) ApiAdminRevokeOAuth2LoginSessionsRequest { return ApiAdminRevokeOAuth2LoginSessionsRequest{ ApiService: a, ctx: ctx, @@ -3280,14 +3280,14 @@ func (a *V1ApiService) AdminRevokeOAuth2LoginSessions(ctx context.Context) ApiAd } // Execute executes the request -func (a *V1ApiService) AdminRevokeOAuth2LoginSessionsExecute(r ApiAdminRevokeOAuth2LoginSessionsRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) AdminRevokeOAuth2LoginSessionsExecute(r ApiAdminRevokeOAuth2LoginSessionsRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminRevokeOAuth2LoginSessions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminRevokeOAuth2LoginSessions") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -3356,7 +3356,7 @@ func (a *V1ApiService) AdminRevokeOAuth2LoginSessionsExecute(r ApiAdminRevokeOAu type ApiAdminTrustOAuth2JwtGrantIssuerRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService adminTrustOAuth2JwtGrantIssuerBody *AdminTrustOAuth2JwtGrantIssuerBody } @@ -3379,7 +3379,7 @@ and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiAdminTrustOAuth2JwtGrantIssuerRequest */ -func (a *V1ApiService) AdminTrustOAuth2JwtGrantIssuer(ctx context.Context) ApiAdminTrustOAuth2JwtGrantIssuerRequest { +func (a *V0alpha2ApiService) AdminTrustOAuth2JwtGrantIssuer(ctx context.Context) ApiAdminTrustOAuth2JwtGrantIssuerRequest { return ApiAdminTrustOAuth2JwtGrantIssuerRequest{ ApiService: a, ctx: ctx, @@ -3388,7 +3388,7 @@ func (a *V1ApiService) AdminTrustOAuth2JwtGrantIssuer(ctx context.Context) ApiAd // Execute executes the request // @return TrustedOAuth2JwtGrantIssuer -func (a *V1ApiService) AdminTrustOAuth2JwtGrantIssuerExecute(r ApiAdminTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { +func (a *V0alpha2ApiService) AdminTrustOAuth2JwtGrantIssuerExecute(r ApiAdminTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -3396,7 +3396,7 @@ func (a *V1ApiService) AdminTrustOAuth2JwtGrantIssuerExecute(r ApiAdminTrustOAut localVarReturnValue *TrustedOAuth2JwtGrantIssuer ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminTrustOAuth2JwtGrantIssuer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminTrustOAuth2JwtGrantIssuer") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3472,7 +3472,7 @@ func (a *V1ApiService) AdminTrustOAuth2JwtGrantIssuerExecute(r ApiAdminTrustOAut type ApiAdminUpdateJsonWebKeyRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string kid string jsonWebKey *JsonWebKey @@ -3499,7 +3499,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param kid The JSON Web Key ID (kid) @return ApiAdminUpdateJsonWebKeyRequest */ -func (a *V1ApiService) AdminUpdateJsonWebKey(ctx context.Context, set string, kid string) ApiAdminUpdateJsonWebKeyRequest { +func (a *V0alpha2ApiService) AdminUpdateJsonWebKey(ctx context.Context, set string, kid string) ApiAdminUpdateJsonWebKeyRequest { return ApiAdminUpdateJsonWebKeyRequest{ ApiService: a, ctx: ctx, @@ -3510,7 +3510,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKey(ctx context.Context, set string, ki // Execute executes the request // @return JsonWebKey -func (a *V1ApiService) AdminUpdateJsonWebKeyExecute(r ApiAdminUpdateJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) { +func (a *V0alpha2ApiService) AdminUpdateJsonWebKeyExecute(r ApiAdminUpdateJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -3518,7 +3518,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKeyExecute(r ApiAdminUpdateJsonWebKeyRe localVarReturnValue *JsonWebKey ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminUpdateJsonWebKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminUpdateJsonWebKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3596,7 +3596,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKeyExecute(r ApiAdminUpdateJsonWebKeyRe type ApiAdminUpdateJsonWebKeySetRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService set string jsonWebKeySet *JsonWebKeySet } @@ -3621,7 +3621,7 @@ A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that @param set The JSON Web Key Set @return ApiAdminUpdateJsonWebKeySetRequest */ -func (a *V1ApiService) AdminUpdateJsonWebKeySet(ctx context.Context, set string) ApiAdminUpdateJsonWebKeySetRequest { +func (a *V0alpha2ApiService) AdminUpdateJsonWebKeySet(ctx context.Context, set string) ApiAdminUpdateJsonWebKeySetRequest { return ApiAdminUpdateJsonWebKeySetRequest{ ApiService: a, ctx: ctx, @@ -3631,7 +3631,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKeySet(ctx context.Context, set string) // Execute executes the request // @return JsonWebKeySet -func (a *V1ApiService) AdminUpdateJsonWebKeySetExecute(r ApiAdminUpdateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { +func (a *V0alpha2ApiService) AdminUpdateJsonWebKeySetExecute(r ApiAdminUpdateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -3639,7 +3639,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKeySetExecute(r ApiAdminUpdateJsonWebKe localVarReturnValue *JsonWebKeySet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminUpdateJsonWebKeySet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminUpdateJsonWebKeySet") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3716,7 +3716,7 @@ func (a *V1ApiService) AdminUpdateJsonWebKeySetExecute(r ApiAdminUpdateJsonWebKe type ApiAdminUpdateOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string oAuth2Client *OAuth2Client } @@ -3743,7 +3743,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiAdminUpdateOAuth2ClientRequest */ -func (a *V1ApiService) AdminUpdateOAuth2Client(ctx context.Context, id string) ApiAdminUpdateOAuth2ClientRequest { +func (a *V0alpha2ApiService) AdminUpdateOAuth2Client(ctx context.Context, id string) ApiAdminUpdateOAuth2ClientRequest { return ApiAdminUpdateOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -3753,7 +3753,7 @@ func (a *V1ApiService) AdminUpdateOAuth2Client(ctx context.Context, id string) A // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) AdminUpdateOAuth2ClientExecute(r ApiAdminUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) AdminUpdateOAuth2ClientExecute(r ApiAdminUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -3761,7 +3761,7 @@ func (a *V1ApiService) AdminUpdateOAuth2ClientExecute(r ApiAdminUpdateOAuth2Clie localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.AdminUpdateOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.AdminUpdateOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3841,7 +3841,7 @@ func (a *V1ApiService) AdminUpdateOAuth2ClientExecute(r ApiAdminUpdateOAuth2Clie type ApiDiscoverJsonWebKeysRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService } func (r ApiDiscoverJsonWebKeysRequest) Execute() (*JsonWebKeySet, *http.Response, error) { @@ -3858,7 +3858,7 @@ if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client l @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiDiscoverJsonWebKeysRequest */ -func (a *V1ApiService) DiscoverJsonWebKeys(ctx context.Context) ApiDiscoverJsonWebKeysRequest { +func (a *V0alpha2ApiService) DiscoverJsonWebKeys(ctx context.Context) ApiDiscoverJsonWebKeysRequest { return ApiDiscoverJsonWebKeysRequest{ ApiService: a, ctx: ctx, @@ -3867,7 +3867,7 @@ func (a *V1ApiService) DiscoverJsonWebKeys(ctx context.Context) ApiDiscoverJsonW // Execute executes the request // @return JsonWebKeySet -func (a *V1ApiService) DiscoverJsonWebKeysExecute(r ApiDiscoverJsonWebKeysRequest) (*JsonWebKeySet, *http.Response, error) { +func (a *V0alpha2ApiService) DiscoverJsonWebKeysExecute(r ApiDiscoverJsonWebKeysRequest) (*JsonWebKeySet, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -3875,7 +3875,7 @@ func (a *V1ApiService) DiscoverJsonWebKeysExecute(r ApiDiscoverJsonWebKeysReques localVarReturnValue *JsonWebKeySet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DiscoverJsonWebKeys") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DiscoverJsonWebKeys") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -3949,7 +3949,7 @@ func (a *V1ApiService) DiscoverJsonWebKeysExecute(r ApiDiscoverJsonWebKeysReques type ApiDiscoverOidcConfigurationRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService } func (r ApiDiscoverOidcConfigurationRequest) Execute() (*OidcConfiguration, *http.Response, error) { @@ -3969,7 +3969,7 @@ For a full list of clients go here: https://openid.net/developers/certified/ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiDiscoverOidcConfigurationRequest */ -func (a *V1ApiService) DiscoverOidcConfiguration(ctx context.Context) ApiDiscoverOidcConfigurationRequest { +func (a *V0alpha2ApiService) DiscoverOidcConfiguration(ctx context.Context) ApiDiscoverOidcConfigurationRequest { return ApiDiscoverOidcConfigurationRequest{ ApiService: a, ctx: ctx, @@ -3978,7 +3978,7 @@ func (a *V1ApiService) DiscoverOidcConfiguration(ctx context.Context) ApiDiscove // Execute executes the request // @return OidcConfiguration -func (a *V1ApiService) DiscoverOidcConfigurationExecute(r ApiDiscoverOidcConfigurationRequest) (*OidcConfiguration, *http.Response, error) { +func (a *V0alpha2ApiService) DiscoverOidcConfigurationExecute(r ApiDiscoverOidcConfigurationRequest) (*OidcConfiguration, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -3986,7 +3986,7 @@ func (a *V1ApiService) DiscoverOidcConfigurationExecute(r ApiDiscoverOidcConfigu localVarReturnValue *OidcConfiguration ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DiscoverOidcConfiguration") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DiscoverOidcConfiguration") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4060,7 +4060,7 @@ func (a *V1ApiService) DiscoverOidcConfigurationExecute(r ApiDiscoverOidcConfigu type ApiDynamicClientRegistrationCreateOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService oAuth2Client *OAuth2Client } @@ -4091,7 +4091,7 @@ Write the secret down and keep it somewhere safe. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiDynamicClientRegistrationCreateOAuth2ClientRequest */ -func (a *V1ApiService) DynamicClientRegistrationCreateOAuth2Client(ctx context.Context) ApiDynamicClientRegistrationCreateOAuth2ClientRequest { +func (a *V0alpha2ApiService) DynamicClientRegistrationCreateOAuth2Client(ctx context.Context) ApiDynamicClientRegistrationCreateOAuth2ClientRequest { return ApiDynamicClientRegistrationCreateOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -4100,7 +4100,7 @@ func (a *V1ApiService) DynamicClientRegistrationCreateOAuth2Client(ctx context.C // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) DynamicClientRegistrationCreateOAuth2ClientExecute(r ApiDynamicClientRegistrationCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) DynamicClientRegistrationCreateOAuth2ClientExecute(r ApiDynamicClientRegistrationCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -4108,7 +4108,7 @@ func (a *V1ApiService) DynamicClientRegistrationCreateOAuth2ClientExecute(r ApiD localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DynamicClientRegistrationCreateOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DynamicClientRegistrationCreateOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4187,7 +4187,7 @@ func (a *V1ApiService) DynamicClientRegistrationCreateOAuth2ClientExecute(r ApiD type ApiDynamicClientRegistrationDeleteOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -4214,7 +4214,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiDynamicClientRegistrationDeleteOAuth2ClientRequest */ -func (a *V1ApiService) DynamicClientRegistrationDeleteOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationDeleteOAuth2ClientRequest { +func (a *V0alpha2ApiService) DynamicClientRegistrationDeleteOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationDeleteOAuth2ClientRequest { return ApiDynamicClientRegistrationDeleteOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -4223,14 +4223,14 @@ func (a *V1ApiService) DynamicClientRegistrationDeleteOAuth2Client(ctx context.C } // Execute executes the request -func (a *V1ApiService) DynamicClientRegistrationDeleteOAuth2ClientExecute(r ApiDynamicClientRegistrationDeleteOAuth2ClientRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) DynamicClientRegistrationDeleteOAuth2ClientExecute(r ApiDynamicClientRegistrationDeleteOAuth2ClientRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DynamicClientRegistrationDeleteOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DynamicClientRegistrationDeleteOAuth2Client") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -4296,7 +4296,7 @@ func (a *V1ApiService) DynamicClientRegistrationDeleteOAuth2ClientExecute(r ApiD type ApiDynamicClientRegistrationGetOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string } @@ -4323,7 +4323,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiDynamicClientRegistrationGetOAuth2ClientRequest */ -func (a *V1ApiService) DynamicClientRegistrationGetOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationGetOAuth2ClientRequest { +func (a *V0alpha2ApiService) DynamicClientRegistrationGetOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationGetOAuth2ClientRequest { return ApiDynamicClientRegistrationGetOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -4333,7 +4333,7 @@ func (a *V1ApiService) DynamicClientRegistrationGetOAuth2Client(ctx context.Cont // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) DynamicClientRegistrationGetOAuth2ClientExecute(r ApiDynamicClientRegistrationGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) DynamicClientRegistrationGetOAuth2ClientExecute(r ApiDynamicClientRegistrationGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -4341,7 +4341,7 @@ func (a *V1ApiService) DynamicClientRegistrationGetOAuth2ClientExecute(r ApiDyna localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DynamicClientRegistrationGetOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DynamicClientRegistrationGetOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4416,7 +4416,7 @@ func (a *V1ApiService) DynamicClientRegistrationGetOAuth2ClientExecute(r ApiDyna type ApiDynamicClientRegistrationUpdateOAuth2ClientRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService id string oAuth2Client *OAuth2Client } @@ -4452,7 +4452,7 @@ generated for applications which want to consume your OAuth 2.0 or OpenID Connec @param id The id of the OAuth 2.0 Client. @return ApiDynamicClientRegistrationUpdateOAuth2ClientRequest */ -func (a *V1ApiService) DynamicClientRegistrationUpdateOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationUpdateOAuth2ClientRequest { +func (a *V0alpha2ApiService) DynamicClientRegistrationUpdateOAuth2Client(ctx context.Context, id string) ApiDynamicClientRegistrationUpdateOAuth2ClientRequest { return ApiDynamicClientRegistrationUpdateOAuth2ClientRequest{ ApiService: a, ctx: ctx, @@ -4462,7 +4462,7 @@ func (a *V1ApiService) DynamicClientRegistrationUpdateOAuth2Client(ctx context.C // Execute executes the request // @return OAuth2Client -func (a *V1ApiService) DynamicClientRegistrationUpdateOAuth2ClientExecute(r ApiDynamicClientRegistrationUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { +func (a *V0alpha2ApiService) DynamicClientRegistrationUpdateOAuth2ClientExecute(r ApiDynamicClientRegistrationUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -4470,7 +4470,7 @@ func (a *V1ApiService) DynamicClientRegistrationUpdateOAuth2ClientExecute(r ApiD localVarReturnValue *OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.DynamicClientRegistrationUpdateOAuth2Client") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.DynamicClientRegistrationUpdateOAuth2Client") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4550,7 +4550,7 @@ func (a *V1ApiService) DynamicClientRegistrationUpdateOAuth2ClientExecute(r ApiD type ApiGetOidcUserInfoRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService } func (r ApiGetOidcUserInfoRequest) Execute() (*OidcUserInfo, *http.Response, error) { @@ -4572,7 +4572,7 @@ for more details about header format. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetOidcUserInfoRequest */ -func (a *V1ApiService) GetOidcUserInfo(ctx context.Context) ApiGetOidcUserInfoRequest { +func (a *V0alpha2ApiService) GetOidcUserInfo(ctx context.Context) ApiGetOidcUserInfoRequest { return ApiGetOidcUserInfoRequest{ ApiService: a, ctx: ctx, @@ -4581,7 +4581,7 @@ func (a *V1ApiService) GetOidcUserInfo(ctx context.Context) ApiGetOidcUserInfoRe // Execute executes the request // @return OidcUserInfo -func (a *V1ApiService) GetOidcUserInfoExecute(r ApiGetOidcUserInfoRequest) (*OidcUserInfo, *http.Response, error) { +func (a *V0alpha2ApiService) GetOidcUserInfoExecute(r ApiGetOidcUserInfoRequest) (*OidcUserInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -4589,7 +4589,7 @@ func (a *V1ApiService) GetOidcUserInfoExecute(r ApiGetOidcUserInfoRequest) (*Oid localVarReturnValue *OidcUserInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.GetOidcUserInfo") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.GetOidcUserInfo") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4663,7 +4663,7 @@ func (a *V1ApiService) GetOidcUserInfoExecute(r ApiGetOidcUserInfoRequest) (*Oid type ApiPerformOAuth2AuthorizationFlowRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService } func (r ApiPerformOAuth2AuthorizationFlowRequest) Execute() (*OAuth2ApiError, *http.Response, error) { @@ -4681,7 +4681,7 @@ To learn more about this flow please refer to the specification: https://tools.i @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPerformOAuth2AuthorizationFlowRequest */ -func (a *V1ApiService) PerformOAuth2AuthorizationFlow(ctx context.Context) ApiPerformOAuth2AuthorizationFlowRequest { +func (a *V0alpha2ApiService) PerformOAuth2AuthorizationFlow(ctx context.Context) ApiPerformOAuth2AuthorizationFlowRequest { return ApiPerformOAuth2AuthorizationFlowRequest{ ApiService: a, ctx: ctx, @@ -4690,7 +4690,7 @@ func (a *V1ApiService) PerformOAuth2AuthorizationFlow(ctx context.Context) ApiPe // Execute executes the request // @return OAuth2ApiError -func (a *V1ApiService) PerformOAuth2AuthorizationFlowExecute(r ApiPerformOAuth2AuthorizationFlowRequest) (*OAuth2ApiError, *http.Response, error) { +func (a *V0alpha2ApiService) PerformOAuth2AuthorizationFlowExecute(r ApiPerformOAuth2AuthorizationFlowRequest) (*OAuth2ApiError, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -4698,7 +4698,7 @@ func (a *V1ApiService) PerformOAuth2AuthorizationFlowExecute(r ApiPerformOAuth2A localVarReturnValue *OAuth2ApiError ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.PerformOAuth2AuthorizationFlow") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.PerformOAuth2AuthorizationFlow") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4772,7 +4772,7 @@ func (a *V1ApiService) PerformOAuth2AuthorizationFlowExecute(r ApiPerformOAuth2A type ApiPerformOAuth2TokenFlowRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService grantType *string clientId *string code *string @@ -4824,7 +4824,7 @@ request entity-body. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPerformOAuth2TokenFlowRequest */ -func (a *V1ApiService) PerformOAuth2TokenFlow(ctx context.Context) ApiPerformOAuth2TokenFlowRequest { +func (a *V0alpha2ApiService) PerformOAuth2TokenFlow(ctx context.Context) ApiPerformOAuth2TokenFlowRequest { return ApiPerformOAuth2TokenFlowRequest{ ApiService: a, ctx: ctx, @@ -4833,7 +4833,7 @@ func (a *V1ApiService) PerformOAuth2TokenFlow(ctx context.Context) ApiPerformOAu // Execute executes the request // @return OAuth2TokenResponse -func (a *V1ApiService) PerformOAuth2TokenFlowExecute(r ApiPerformOAuth2TokenFlowRequest) (*OAuth2TokenResponse, *http.Response, error) { +func (a *V0alpha2ApiService) PerformOAuth2TokenFlowExecute(r ApiPerformOAuth2TokenFlowRequest) (*OAuth2TokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -4841,7 +4841,7 @@ func (a *V1ApiService) PerformOAuth2TokenFlowExecute(r ApiPerformOAuth2TokenFlow localVarReturnValue *OAuth2TokenResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.PerformOAuth2TokenFlow") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.PerformOAuth2TokenFlow") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -4931,7 +4931,7 @@ func (a *V1ApiService) PerformOAuth2TokenFlowExecute(r ApiPerformOAuth2TokenFlow type ApiPerformOidcFrontOrBackChannelLogoutRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService } func (r ApiPerformOidcFrontOrBackChannelLogoutRequest) Execute() (*http.Response, error) { @@ -4951,7 +4951,7 @@ Back-channel logout is performed asynchronously and does not affect logout flow. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiPerformOidcFrontOrBackChannelLogoutRequest */ -func (a *V1ApiService) PerformOidcFrontOrBackChannelLogout(ctx context.Context) ApiPerformOidcFrontOrBackChannelLogoutRequest { +func (a *V0alpha2ApiService) PerformOidcFrontOrBackChannelLogout(ctx context.Context) ApiPerformOidcFrontOrBackChannelLogoutRequest { return ApiPerformOidcFrontOrBackChannelLogoutRequest{ ApiService: a, ctx: ctx, @@ -4959,14 +4959,14 @@ func (a *V1ApiService) PerformOidcFrontOrBackChannelLogout(ctx context.Context) } // Execute executes the request -func (a *V1ApiService) PerformOidcFrontOrBackChannelLogoutExecute(r ApiPerformOidcFrontOrBackChannelLogoutRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) PerformOidcFrontOrBackChannelLogoutExecute(r ApiPerformOidcFrontOrBackChannelLogoutRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.PerformOidcFrontOrBackChannelLogout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.PerformOidcFrontOrBackChannelLogout") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -5024,7 +5024,7 @@ func (a *V1ApiService) PerformOidcFrontOrBackChannelLogoutExecute(r ApiPerformOi type ApiRevokeOAuth2TokenRequest struct { ctx context.Context - ApiService *V1ApiService + ApiService *V0alpha2ApiService token *string } @@ -5048,7 +5048,7 @@ the client the token was generated for. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiRevokeOAuth2TokenRequest */ -func (a *V1ApiService) RevokeOAuth2Token(ctx context.Context) ApiRevokeOAuth2TokenRequest { +func (a *V0alpha2ApiService) RevokeOAuth2Token(ctx context.Context) ApiRevokeOAuth2TokenRequest { return ApiRevokeOAuth2TokenRequest{ ApiService: a, ctx: ctx, @@ -5056,14 +5056,14 @@ func (a *V1ApiService) RevokeOAuth2Token(ctx context.Context) ApiRevokeOAuth2Tok } // Execute executes the request -func (a *V1ApiService) RevokeOAuth2TokenExecute(r ApiRevokeOAuth2TokenRequest) (*http.Response, error) { +func (a *V0alpha2ApiService) RevokeOAuth2TokenExecute(r ApiRevokeOAuth2TokenRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V1ApiService.RevokeOAuth2Token") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "V0alpha2ApiService.RevokeOAuth2Token") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go index 5c412506197..3fe275afffd 100644 --- a/internal/httpclient/client.go +++ b/internal/httpclient/client.go @@ -54,7 +54,7 @@ type APIClient struct { MetadataApi *MetadataApiService - V1Api *V1ApiService + V0alpha2Api *V0alpha2ApiService } type service struct { @@ -75,7 +75,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AdminApi = (*AdminApiService)(&c.common) c.MetadataApi = (*MetadataApiService)(&c.common) - c.V1Api = (*V1ApiService)(&c.common) + c.V0alpha2Api = (*V0alpha2ApiService)(&c.common) return c } diff --git a/internal/httpclient/client/admin/update_o_auth2_client_lifespans_parameters.go b/internal/httpclient/client/admin/update_o_auth2_client_lifespans_parameters.go deleted file mode 100644 index 474004728e3..00000000000 --- a/internal/httpclient/client/admin/update_o_auth2_client_lifespans_parameters.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package admin - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ory/hydra/internal/httpclient/models" -) - -// NewUpdateOAuth2ClientLifespansParams creates a new UpdateOAuth2ClientLifespansParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateOAuth2ClientLifespansParams() *UpdateOAuth2ClientLifespansParams { - return &UpdateOAuth2ClientLifespansParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateOAuth2ClientLifespansParamsWithTimeout creates a new UpdateOAuth2ClientLifespansParams object -// with the ability to set a timeout on a request. -func NewUpdateOAuth2ClientLifespansParamsWithTimeout(timeout time.Duration) *UpdateOAuth2ClientLifespansParams { - return &UpdateOAuth2ClientLifespansParams{ - timeout: timeout, - } -} - -// NewUpdateOAuth2ClientLifespansParamsWithContext creates a new UpdateOAuth2ClientLifespansParams object -// with the ability to set a context for a request. -func NewUpdateOAuth2ClientLifespansParamsWithContext(ctx context.Context) *UpdateOAuth2ClientLifespansParams { - return &UpdateOAuth2ClientLifespansParams{ - Context: ctx, - } -} - -// NewUpdateOAuth2ClientLifespansParamsWithHTTPClient creates a new UpdateOAuth2ClientLifespansParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateOAuth2ClientLifespansParamsWithHTTPClient(client *http.Client) *UpdateOAuth2ClientLifespansParams { - return &UpdateOAuth2ClientLifespansParams{ - HTTPClient: client, - } -} - -/* UpdateOAuth2ClientLifespansParams contains all the parameters to send to the API endpoint - for the update o auth2 client lifespans operation. - - Typically these are written to a http.Request. -*/ -type UpdateOAuth2ClientLifespansParams struct { - - // Body. - Body *models.UpdateOAuth2ClientLifespans - - /* ID. - - The id of the OAuth 2.0 Client. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update o auth2 client lifespans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOAuth2ClientLifespansParams) WithDefaults() *UpdateOAuth2ClientLifespansParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update o auth2 client lifespans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOAuth2ClientLifespansParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) WithTimeout(timeout time.Duration) *UpdateOAuth2ClientLifespansParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) WithContext(ctx context.Context) *UpdateOAuth2ClientLifespansParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) WithHTTPClient(client *http.Client) *UpdateOAuth2ClientLifespansParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) WithBody(body *models.UpdateOAuth2ClientLifespans) *UpdateOAuth2ClientLifespansParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) SetBody(body *models.UpdateOAuth2ClientLifespans) { - o.Body = body -} - -// WithID adds the id to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) WithID(id string) *UpdateOAuth2ClientLifespansParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update o auth2 client lifespans params -func (o *UpdateOAuth2ClientLifespansParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateOAuth2ClientLifespansParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/internal/httpclient/client/admin/update_o_auth2_client_lifespans_responses.go b/internal/httpclient/client/admin/update_o_auth2_client_lifespans_responses.go deleted file mode 100644 index 1fddf08122a..00000000000 --- a/internal/httpclient/client/admin/update_o_auth2_client_lifespans_responses.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package admin - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ory/hydra/internal/httpclient/models" -) - -// UpdateOAuth2ClientLifespansReader is a Reader for the UpdateOAuth2ClientLifespans structure. -type UpdateOAuth2ClientLifespansReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateOAuth2ClientLifespansReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateOAuth2ClientLifespansOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateOAuth2ClientLifespansDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdateOAuth2ClientLifespansOK creates a UpdateOAuth2ClientLifespansOK with default headers values -func NewUpdateOAuth2ClientLifespansOK() *UpdateOAuth2ClientLifespansOK { - return &UpdateOAuth2ClientLifespansOK{} -} - -/* UpdateOAuth2ClientLifespansOK describes a response with status code 200, with default header values. - -oAuth2Client -*/ -type UpdateOAuth2ClientLifespansOK struct { - Payload *models.OAuth2Client -} - -func (o *UpdateOAuth2ClientLifespansOK) Error() string { - return fmt.Sprintf("[PUT /clients/{id}/lifespans][%d] updateOAuth2ClientLifespansOK %+v", 200, o.Payload) -} -func (o *UpdateOAuth2ClientLifespansOK) GetPayload() *models.OAuth2Client { - return o.Payload -} - -func (o *UpdateOAuth2ClientLifespansOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.OAuth2Client) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOAuth2ClientLifespansDefault creates a UpdateOAuth2ClientLifespansDefault with default headers values -func NewUpdateOAuth2ClientLifespansDefault(code int) *UpdateOAuth2ClientLifespansDefault { - return &UpdateOAuth2ClientLifespansDefault{ - _statusCode: code, - } -} - -/* UpdateOAuth2ClientLifespansDefault describes a response with status code -1, with default header values. - -jsonError -*/ -type UpdateOAuth2ClientLifespansDefault struct { - _statusCode int - - Payload *models.JSONError -} - -// Code gets the status code for the update o auth2 client lifespans default response -func (o *UpdateOAuth2ClientLifespansDefault) Code() int { - return o._statusCode -} - -func (o *UpdateOAuth2ClientLifespansDefault) Error() string { - return fmt.Sprintf("[PUT /clients/{id}/lifespans][%d] UpdateOAuth2ClientLifespans default %+v", o._statusCode, o.Payload) -} -func (o *UpdateOAuth2ClientLifespansDefault) GetPayload() *models.JSONError { - return o.Payload -} - -func (o *UpdateOAuth2ClientLifespansDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.JSONError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/internal/httpclient-next/docs/DefaultSession.md b/internal/httpclient/docs/DefaultSession.md similarity index 100% rename from internal/httpclient-next/docs/DefaultSession.md rename to internal/httpclient/docs/DefaultSession.md diff --git a/internal/httpclient-next/docs/Headers.md b/internal/httpclient/docs/Headers.md similarity index 71% rename from internal/httpclient-next/docs/Headers.md rename to internal/httpclient/docs/Headers.md index d4f02a6b7b2..d1b86a1e140 100644 --- a/internal/httpclient-next/docs/Headers.md +++ b/internal/httpclient/docs/Headers.md @@ -2,9 +2,9 @@ ## Properties -| Name | Type | Description | Notes | -| --------- | ------------------------------------------------ | ----------- | ---------- | -| **Extra** | Pointer to **map[string]map[string]interface{}** | | [optional] | +| Name | Type | Description | Notes | +| --------- | ------------------------------------- | ----------- | ---------- | +| **Extra** | Pointer to **map[string]interface{}** | | [optional] | ## Methods @@ -27,20 +27,20 @@ guarantee that properties required by API are set ### GetExtra -`func (o *Headers) GetExtra() map[string]map[string]interface{}` +`func (o *Headers) GetExtra() map[string]interface{}` GetExtra returns the Extra field if non-nil, zero value otherwise. ### GetExtraOk -`func (o *Headers) GetExtraOk() (*map[string]map[string]interface{}, bool)` +`func (o *Headers) GetExtraOk() (*map[string]interface{}, bool)` GetExtraOk returns a tuple with the Extra field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExtra -`func (o *Headers) SetExtra(v map[string]map[string]interface{})` +`func (o *Headers) SetExtra(v map[string]interface{})` SetExtra sets Extra field to given value. diff --git a/internal/httpclient-next/docs/IDTokenClaims.md b/internal/httpclient/docs/IDTokenClaims.md similarity index 82% rename from internal/httpclient-next/docs/IDTokenClaims.md rename to internal/httpclient/docs/IDTokenClaims.md index fcc8b4bc7ab..f93d812259c 100644 --- a/internal/httpclient-next/docs/IDTokenClaims.md +++ b/internal/httpclient/docs/IDTokenClaims.md @@ -2,22 +2,22 @@ ## Properties -| Name | Type | Description | Notes | -| ------------ | ------------------------------------------------ | ----------- | ---------- | -| **Acr** | Pointer to **string** | | [optional] | -| **Amr** | Pointer to **[]string** | | [optional] | -| **AtHash** | Pointer to **string** | | [optional] | -| **Aud** | Pointer to **[]string** | | [optional] | -| **AuthTime** | Pointer to **time.Time** | | [optional] | -| **CHash** | Pointer to **string** | | [optional] | -| **Exp** | Pointer to **time.Time** | | [optional] | -| **Ext** | Pointer to **map[string]map[string]interface{}** | | [optional] | -| **Iat** | Pointer to **time.Time** | | [optional] | -| **Iss** | Pointer to **string** | | [optional] | -| **Jti** | Pointer to **string** | | [optional] | -| **Nonce** | Pointer to **string** | | [optional] | -| **Rat** | Pointer to **time.Time** | | [optional] | -| **Sub** | Pointer to **string** | | [optional] | +| Name | Type | Description | Notes | +| ------------ | ------------------------------------- | ----------- | ---------- | +| **Acr** | Pointer to **string** | | [optional] | +| **Amr** | Pointer to **[]string** | | [optional] | +| **AtHash** | Pointer to **string** | | [optional] | +| **Aud** | Pointer to **[]string** | | [optional] | +| **AuthTime** | Pointer to **time.Time** | | [optional] | +| **CHash** | Pointer to **string** | | [optional] | +| **Exp** | Pointer to **time.Time** | | [optional] | +| **Ext** | Pointer to **map[string]interface{}** | | [optional] | +| **Iat** | Pointer to **time.Time** | | [optional] | +| **Iss** | Pointer to **string** | | [optional] | +| **Jti** | Pointer to **string** | | [optional] | +| **Nonce** | Pointer to **string** | | [optional] | +| **Rat** | Pointer to **time.Time** | | [optional] | +| **Sub** | Pointer to **string** | | [optional] | ## Methods @@ -215,20 +215,20 @@ HasExp returns a boolean if a field has been set. ### GetExt -`func (o *IDTokenClaims) GetExt() map[string]map[string]interface{}` +`func (o *IDTokenClaims) GetExt() map[string]interface{}` GetExt returns the Ext field if non-nil, zero value otherwise. ### GetExtOk -`func (o *IDTokenClaims) GetExtOk() (*map[string]map[string]interface{}, bool)` +`func (o *IDTokenClaims) GetExtOk() (*map[string]interface{}, bool)` GetExtOk returns a tuple with the Ext field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExt -`func (o *IDTokenClaims) SetExt(v map[string]map[string]interface{})` +`func (o *IDTokenClaims) SetExt(v map[string]interface{})` SetExt sets Ext field to given value. diff --git a/internal/httpclient-next/docs/OAuth2AccessRequest.md b/internal/httpclient/docs/OAuth2AccessRequest.md similarity index 100% rename from internal/httpclient-next/docs/OAuth2AccessRequest.md rename to internal/httpclient/docs/OAuth2AccessRequest.md diff --git a/internal/httpclient/docs/RefreshTokenHookRequest.md b/internal/httpclient/docs/RefreshTokenHookRequest.md index 6684940c29e..6ef539bb925 100644 --- a/internal/httpclient/docs/RefreshTokenHookRequest.md +++ b/internal/httpclient/docs/RefreshTokenHookRequest.md @@ -2,12 +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] | -| **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 @@ -106,6 +108,56 @@ SetGrantedScopes sets GrantedScopes field to given value. HasGrantedScopes returns a boolean if a field has been set. +### GetRequester + +`func (o *RefreshTokenHookRequest) GetRequester() OAuth2AccessRequest` + +GetRequester returns the Requester field if non-nil, zero value otherwise. + +### GetRequesterOk + +`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 OAuth2AccessRequest)` + +SetRequester sets Requester field to given value. + +### HasRequester + +`func (o *RefreshTokenHookRequest) HasRequester() bool` + +HasRequester returns a boolean if a field has been set. + +### GetSession + +`func (o *RefreshTokenHookRequest) GetSession() Session` + +GetSession returns the Session field if non-nil, zero value otherwise. + +### GetSessionOk + +`func (o *RefreshTokenHookRequest) GetSessionOk() (*Session, bool)` + +GetSessionOk returns a tuple with the Session field if it's non-nil, zero value +otherwise and a boolean to check if the value has been set. + +### SetSession + +`func (o *RefreshTokenHookRequest) SetSession(v Session)` + +SetSession sets Session field to given value. + +### HasSession + +`func (o *RefreshTokenHookRequest) HasSession() bool` + +HasSession returns a boolean if a field has been set. + ### GetSubject `func (o *RefreshTokenHookRequest) GetSubject() string` diff --git a/internal/httpclient-next/docs/Session.md b/internal/httpclient/docs/Session.md similarity index 96% rename from internal/httpclient-next/docs/Session.md rename to internal/httpclient/docs/Session.md index d36ac392041..f43b14024db 100644 --- a/internal/httpclient-next/docs/Session.md +++ b/internal/httpclient/docs/Session.md @@ -9,7 +9,7 @@ | **ConsentChallenge** | Pointer to **string** | | [optional] | | **ExcludeNotBeforeClaim** | Pointer to **bool** | | [optional] | | **ExpiresAt** | Pointer to [**map[string]time.Time**](time.Time.md) | | [optional] | -| **Extra** | Pointer to **map[string]map[string]interface{}** | | [optional] | +| **Extra** | Pointer to **map[string]interface{}** | | [optional] | | **Headers** | Pointer to [**Headers**](Headers.md) | | [optional] | | **IdTokenClaims** | Pointer to [**IDTokenClaims**](IDTokenClaims.md) | | [optional] | | **Kid** | Pointer to **string** | | [optional] | @@ -167,20 +167,20 @@ HasExpiresAt returns a boolean if a field has been set. ### GetExtra -`func (o *Session) GetExtra() map[string]map[string]interface{}` +`func (o *Session) GetExtra() map[string]interface{}` GetExtra returns the Extra field if non-nil, zero value otherwise. ### GetExtraOk -`func (o *Session) GetExtraOk() (*map[string]map[string]interface{}, bool)` +`func (o *Session) GetExtraOk() (*map[string]interface{}, bool)` GetExtraOk returns a tuple with the Extra field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExtra -`func (o *Session) SetExtra(v map[string]map[string]interface{})` +`func (o *Session) SetExtra(v map[string]interface{})` SetExtra sets Extra field to given value. diff --git a/internal/httpclient/docs/V1Api.md b/internal/httpclient/docs/V0alpha2Api.md similarity index 74% rename from internal/httpclient/docs/V1Api.md rename to internal/httpclient/docs/V0alpha2Api.md index 3599783f5ec..bc72d764776 100644 --- a/internal/httpclient/docs/V1Api.md +++ b/internal/httpclient/docs/V0alpha2Api.md @@ -1,51 +1,51 @@ -# \V1Api +# \V0alpha2Api All URIs are relative to _http://localhost_ -| Method | HTTP request | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| [**AdminAcceptOAuth2ConsentRequest**](V1Api.md#AdminAcceptOAuth2ConsentRequest) | **Put** /admin/oauth2/auth/requests/consent/accept | Accept an OAuth 2.0 Consent Request | -| [**AdminAcceptOAuth2LoginRequest**](V1Api.md#AdminAcceptOAuth2LoginRequest) | **Put** /admin/oauth2/auth/requests/login/accept | Accept an OAuth 2.0 Login Request | -| [**AdminAcceptOAuth2LogoutRequest**](V1Api.md#AdminAcceptOAuth2LogoutRequest) | **Put** /admin/oauth2/auth/requests/logout/accept | Accept an OAuth 2.0 Logout Request | -| [**AdminCreateJsonWebKeySet**](V1Api.md#AdminCreateJsonWebKeySet) | **Post** /admin/keys/{set} | Generate a New JSON Web Key | -| [**AdminCreateOAuth2Client**](V1Api.md#AdminCreateOAuth2Client) | **Post** /admin/clients | Create an OAuth 2.0 Client | -| [**AdminDeleteJsonWebKey**](V1Api.md#AdminDeleteJsonWebKey) | **Delete** /admin/keys/{set}/{kid} | Delete a JSON Web Key | -| [**AdminDeleteJsonWebKeySet**](V1Api.md#AdminDeleteJsonWebKeySet) | **Delete** /admin/keys/{set} | Delete a JSON Web Key Set | -| [**AdminDeleteOAuth2Client**](V1Api.md#AdminDeleteOAuth2Client) | **Delete** /admin/clients/{id} | Deletes an OAuth 2.0 Client | -| [**AdminDeleteOAuth2Token**](V1Api.md#AdminDeleteOAuth2Token) | **Delete** /admin/oauth2/tokens | Delete OAuth2 Access Tokens from a Client | -| [**AdminDeleteTrustedOAuth2JwtGrantIssuer**](V1Api.md#AdminDeleteTrustedOAuth2JwtGrantIssuer) | **Delete** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| [**AdminGetJsonWebKey**](V1Api.md#AdminGetJsonWebKey) | **Get** /admin/keys/{set}/{kid} | Fetch a JSON Web Key | -| [**AdminGetJsonWebKeySet**](V1Api.md#AdminGetJsonWebKeySet) | **Get** /admin/keys/{set} | Retrieve a JSON Web Key Set | -| [**AdminGetOAuth2Client**](V1Api.md#AdminGetOAuth2Client) | **Get** /admin/clients/{id} | Get an OAuth 2.0 Client | -| [**AdminGetOAuth2ConsentRequest**](V1Api.md#AdminGetOAuth2ConsentRequest) | **Get** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request Information | -| [**AdminGetOAuth2LoginRequest**](V1Api.md#AdminGetOAuth2LoginRequest) | **Get** /admin/oauth2/auth/requests/login | Get an OAuth 2.0 Login Request | -| [**AdminGetOAuth2LogoutRequest**](V1Api.md#AdminGetOAuth2LogoutRequest) | **Get** /admin/oauth2/auth/requests/logout | Get an OAuth 2.0 Logout Request | -| [**AdminGetTrustedOAuth2JwtGrantIssuer**](V1Api.md#AdminGetTrustedOAuth2JwtGrantIssuer) | **Get** /admin/trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| [**AdminIntrospectOAuth2Token**](V1Api.md#AdminIntrospectOAuth2Token) | **Post** /admin/oauth2/introspect | Introspect OAuth2 Access or Refresh Tokens | -| [**AdminListOAuth2Clients**](V1Api.md#AdminListOAuth2Clients) | **Get** /admin/clients | List OAuth 2.0 Clients | -| [**AdminListOAuth2SubjectConsentSessions**](V1Api.md#AdminListOAuth2SubjectConsentSessions) | **Get** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | -| [**AdminListTrustedOAuth2JwtGrantIssuers**](V1Api.md#AdminListTrustedOAuth2JwtGrantIssuers) | **Get** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | -| [**AdminPatchOAuth2Client**](V1Api.md#AdminPatchOAuth2Client) | **Patch** /admin/clients/{id} | Patch an OAuth 2.0 Client | -| [**AdminRejectOAuth2ConsentRequest**](V1Api.md#AdminRejectOAuth2ConsentRequest) | **Put** /admin/oauth2/auth/requests/consent/reject | Reject an OAuth 2.0 Consent Request | -| [**AdminRejectOAuth2LoginRequest**](V1Api.md#AdminRejectOAuth2LoginRequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject an OAuth 2.0 Login Request | -| [**AdminRejectOAuth2LogoutRequest**](V1Api.md#AdminRejectOAuth2LogoutRequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject an OAuth 2.0 Logout Request | -| [**AdminRevokeOAuth2ConsentSessions**](V1Api.md#AdminRevokeOAuth2ConsentSessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client | -| [**AdminRevokeOAuth2LoginSessions**](V1Api.md#AdminRevokeOAuth2LoginSessions) | **Delete** /admin/oauth2/auth/sessions/login | Invalidates All OAuth 2.0 Login Sessions of a Certain User | -| [**AdminTrustOAuth2JwtGrantIssuer**](V1Api.md#AdminTrustOAuth2JwtGrantIssuer) | **Post** /admin/trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | -| [**AdminUpdateJsonWebKey**](V1Api.md#AdminUpdateJsonWebKey) | **Put** /admin/keys/{set}/{kid} | Update a JSON Web Key | -| [**AdminUpdateJsonWebKeySet**](V1Api.md#AdminUpdateJsonWebKeySet) | **Put** /admin/keys/{set} | Update a JSON Web Key Set | -| [**AdminUpdateOAuth2Client**](V1Api.md#AdminUpdateOAuth2Client) | **Put** /admin/clients/{id} | Update an OAuth 2.0 Client | -| [**DiscoverJsonWebKeys**](V1Api.md#DiscoverJsonWebKeys) | **Get** /.well-known/jwks.json | Discover JSON Web Keys | -| [**DiscoverOidcConfiguration**](V1Api.md#DiscoverOidcConfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery | -| [**DynamicClientRegistrationCreateOAuth2Client**](V1Api.md#DynamicClientRegistrationCreateOAuth2Client) | **Post** /oauth2/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**DynamicClientRegistrationDeleteOAuth2Client**](V1Api.md#DynamicClientRegistrationDeleteOAuth2Client) | **Delete** /oauth2/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**DynamicClientRegistrationGetOAuth2Client**](V1Api.md#DynamicClientRegistrationGetOAuth2Client) | **Get** /oauth2/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**DynamicClientRegistrationUpdateOAuth2Client**](V1Api.md#DynamicClientRegistrationUpdateOAuth2Client) | **Put** /oauth2/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**GetOidcUserInfo**](V1Api.md#GetOidcUserInfo) | **Get** /userinfo | OpenID Connect Userinfo | -| [**PerformOAuth2AuthorizationFlow**](V1Api.md#PerformOAuth2AuthorizationFlow) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | -| [**PerformOAuth2TokenFlow**](V1Api.md#PerformOAuth2TokenFlow) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint | -| [**PerformOidcFrontOrBackChannelLogout**](V1Api.md#PerformOidcFrontOrBackChannelLogout) | **Get** /oauth2/sessions/logout | OpenID Connect Front- or Back-channel Enabled Logout | -| [**RevokeOAuth2Token**](V1Api.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | Revoke an OAuth2 Access or Refresh Token | +| Method | HTTP request | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| [**AdminAcceptOAuth2ConsentRequest**](V0alpha2Api.md#AdminAcceptOAuth2ConsentRequest) | **Put** /admin/oauth2/auth/requests/consent/accept | Accept an OAuth 2.0 Consent Request | +| [**AdminAcceptOAuth2LoginRequest**](V0alpha2Api.md#AdminAcceptOAuth2LoginRequest) | **Put** /admin/oauth2/auth/requests/login/accept | Accept an OAuth 2.0 Login Request | +| [**AdminAcceptOAuth2LogoutRequest**](V0alpha2Api.md#AdminAcceptOAuth2LogoutRequest) | **Put** /admin/oauth2/auth/requests/logout/accept | Accept an OAuth 2.0 Logout Request | +| [**AdminCreateJsonWebKeySet**](V0alpha2Api.md#AdminCreateJsonWebKeySet) | **Post** /admin/keys/{set} | Generate a New JSON Web Key | +| [**AdminCreateOAuth2Client**](V0alpha2Api.md#AdminCreateOAuth2Client) | **Post** /admin/clients | Create an OAuth 2.0 Client | +| [**AdminDeleteJsonWebKey**](V0alpha2Api.md#AdminDeleteJsonWebKey) | **Delete** /admin/keys/{set}/{kid} | Delete a JSON Web Key | +| [**AdminDeleteJsonWebKeySet**](V0alpha2Api.md#AdminDeleteJsonWebKeySet) | **Delete** /admin/keys/{set} | Delete a JSON Web Key Set | +| [**AdminDeleteOAuth2Client**](V0alpha2Api.md#AdminDeleteOAuth2Client) | **Delete** /admin/clients/{id} | Deletes an OAuth 2.0 Client | +| [**AdminDeleteOAuth2Token**](V0alpha2Api.md#AdminDeleteOAuth2Token) | **Delete** /admin/oauth2/tokens | Delete OAuth2 Access Tokens from a Client | +| [**AdminDeleteTrustedOAuth2JwtGrantIssuer**](V0alpha2Api.md#AdminDeleteTrustedOAuth2JwtGrantIssuer) | **Delete** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**AdminGetJsonWebKey**](V0alpha2Api.md#AdminGetJsonWebKey) | **Get** /admin/keys/{set}/{kid} | Fetch a JSON Web Key | +| [**AdminGetJsonWebKeySet**](V0alpha2Api.md#AdminGetJsonWebKeySet) | **Get** /admin/keys/{set} | Retrieve a JSON Web Key Set | +| [**AdminGetOAuth2Client**](V0alpha2Api.md#AdminGetOAuth2Client) | **Get** /admin/clients/{id} | Get an OAuth 2.0 Client | +| [**AdminGetOAuth2ConsentRequest**](V0alpha2Api.md#AdminGetOAuth2ConsentRequest) | **Get** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request Information | +| [**AdminGetOAuth2LoginRequest**](V0alpha2Api.md#AdminGetOAuth2LoginRequest) | **Get** /admin/oauth2/auth/requests/login | Get an OAuth 2.0 Login Request | +| [**AdminGetOAuth2LogoutRequest**](V0alpha2Api.md#AdminGetOAuth2LogoutRequest) | **Get** /admin/oauth2/auth/requests/logout | Get an OAuth 2.0 Logout Request | +| [**AdminGetTrustedOAuth2JwtGrantIssuer**](V0alpha2Api.md#AdminGetTrustedOAuth2JwtGrantIssuer) | **Get** /admin/trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**AdminIntrospectOAuth2Token**](V0alpha2Api.md#AdminIntrospectOAuth2Token) | **Post** /admin/oauth2/introspect | Introspect OAuth2 Access or Refresh Tokens | +| [**AdminListOAuth2Clients**](V0alpha2Api.md#AdminListOAuth2Clients) | **Get** /admin/clients | List OAuth 2.0 Clients | +| [**AdminListOAuth2SubjectConsentSessions**](V0alpha2Api.md#AdminListOAuth2SubjectConsentSessions) | **Get** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | +| [**AdminListTrustedOAuth2JwtGrantIssuers**](V0alpha2Api.md#AdminListTrustedOAuth2JwtGrantIssuers) | **Get** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | +| [**AdminPatchOAuth2Client**](V0alpha2Api.md#AdminPatchOAuth2Client) | **Patch** /admin/clients/{id} | Patch an OAuth 2.0 Client | +| [**AdminRejectOAuth2ConsentRequest**](V0alpha2Api.md#AdminRejectOAuth2ConsentRequest) | **Put** /admin/oauth2/auth/requests/consent/reject | Reject an OAuth 2.0 Consent Request | +| [**AdminRejectOAuth2LoginRequest**](V0alpha2Api.md#AdminRejectOAuth2LoginRequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject an OAuth 2.0 Login Request | +| [**AdminRejectOAuth2LogoutRequest**](V0alpha2Api.md#AdminRejectOAuth2LogoutRequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject an OAuth 2.0 Logout Request | +| [**AdminRevokeOAuth2ConsentSessions**](V0alpha2Api.md#AdminRevokeOAuth2ConsentSessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client | +| [**AdminRevokeOAuth2LoginSessions**](V0alpha2Api.md#AdminRevokeOAuth2LoginSessions) | **Delete** /admin/oauth2/auth/sessions/login | Invalidates All OAuth 2.0 Login Sessions of a Certain User | +| [**AdminTrustOAuth2JwtGrantIssuer**](V0alpha2Api.md#AdminTrustOAuth2JwtGrantIssuer) | **Post** /admin/trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | +| [**AdminUpdateJsonWebKey**](V0alpha2Api.md#AdminUpdateJsonWebKey) | **Put** /admin/keys/{set}/{kid} | Update a JSON Web Key | +| [**AdminUpdateJsonWebKeySet**](V0alpha2Api.md#AdminUpdateJsonWebKeySet) | **Put** /admin/keys/{set} | Update a JSON Web Key Set | +| [**AdminUpdateOAuth2Client**](V0alpha2Api.md#AdminUpdateOAuth2Client) | **Put** /admin/clients/{id} | Update an OAuth 2.0 Client | +| [**DiscoverJsonWebKeys**](V0alpha2Api.md#DiscoverJsonWebKeys) | **Get** /.well-known/jwks.json | Discover JSON Web Keys | +| [**DiscoverOidcConfiguration**](V0alpha2Api.md#DiscoverOidcConfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery | +| [**DynamicClientRegistrationCreateOAuth2Client**](V0alpha2Api.md#DynamicClientRegistrationCreateOAuth2Client) | **Post** /oauth2/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| [**DynamicClientRegistrationDeleteOAuth2Client**](V0alpha2Api.md#DynamicClientRegistrationDeleteOAuth2Client) | **Delete** /oauth2/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| [**DynamicClientRegistrationGetOAuth2Client**](V0alpha2Api.md#DynamicClientRegistrationGetOAuth2Client) | **Get** /oauth2/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| [**DynamicClientRegistrationUpdateOAuth2Client**](V0alpha2Api.md#DynamicClientRegistrationUpdateOAuth2Client) | **Put** /oauth2/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | +| [**GetOidcUserInfo**](V0alpha2Api.md#GetOidcUserInfo) | **Get** /userinfo | OpenID Connect Userinfo | +| [**PerformOAuth2AuthorizationFlow**](V0alpha2Api.md#PerformOAuth2AuthorizationFlow) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | +| [**PerformOAuth2TokenFlow**](V0alpha2Api.md#PerformOAuth2TokenFlow) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint | +| [**PerformOidcFrontOrBackChannelLogout**](V0alpha2Api.md#PerformOidcFrontOrBackChannelLogout) | **Get** /oauth2/sessions/logout | OpenID Connect Front- or Back-channel Enabled Logout | +| [**RevokeOAuth2Token**](V0alpha2Api.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | Revoke an OAuth2 Access or Refresh Token | ## AdminAcceptOAuth2ConsentRequest @@ -72,13 +72,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminAcceptOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminAcceptOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminAcceptOAuth2ConsentRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminAcceptOAuth2ConsentRequest`: SuccessfulOAuth2RequestResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminAcceptOAuth2ConsentRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminAcceptOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -137,13 +137,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminAcceptOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminAcceptOAuth2LoginRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminAcceptOAuth2LoginRequest`: SuccessfulOAuth2RequestResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminAcceptOAuth2LoginRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminAcceptOAuth2LoginRequest`: %v\n", resp) } ``` @@ -201,13 +201,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminAcceptOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminAcceptOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminAcceptOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminAcceptOAuth2LogoutRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminAcceptOAuth2LogoutRequest`: SuccessfulOAuth2RequestResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminAcceptOAuth2LogoutRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminAcceptOAuth2LogoutRequest`: %v\n", resp) } ``` @@ -265,13 +265,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminCreateJsonWebKeySet(context.Background(), set).AdminCreateJsonWebKeySetBody(adminCreateJsonWebKeySetBody).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminCreateJsonWebKeySet(context.Background(), set).AdminCreateJsonWebKeySetBody(adminCreateJsonWebKeySetBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminCreateJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminCreateJsonWebKeySet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminCreateJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminCreateJsonWebKeySet`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminCreateJsonWebKeySet`: %v\n", resp) } ``` @@ -334,13 +334,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminCreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminCreateOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminCreateOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminCreateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminCreateOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminCreateOAuth2Client`: %v\n", resp) } ``` @@ -397,9 +397,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminDeleteJsonWebKey(context.Background(), set, kid).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminDeleteJsonWebKey(context.Background(), set, kid).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminDeleteJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminDeleteJsonWebKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -462,9 +462,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminDeleteJsonWebKeySet(context.Background(), set).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminDeleteJsonWebKeySet(context.Background(), set).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminDeleteJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminDeleteJsonWebKeySet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -526,9 +526,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminDeleteOAuth2Client(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminDeleteOAuth2Client(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminDeleteOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminDeleteOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -590,9 +590,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminDeleteOAuth2Token(context.Background()).ClientId(clientId).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminDeleteOAuth2Token(context.Background()).ClientId(clientId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminDeleteOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminDeleteOAuth2Token``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -650,9 +650,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminDeleteTrustedOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminDeleteTrustedOAuth2JwtGrantIssuer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -715,13 +715,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetJsonWebKey(context.Background(), set, kid).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetJsonWebKey(context.Background(), set, kid).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetJsonWebKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetJsonWebKey`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetJsonWebKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetJsonWebKey`: %v\n", resp) } ``` @@ -782,13 +782,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetJsonWebKeySet(context.Background(), set).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetJsonWebKeySet(context.Background(), set).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetJsonWebKeySet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetJsonWebKeySet`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetJsonWebKeySet`: %v\n", resp) } ``` @@ -848,13 +848,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetOAuth2Client(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetOAuth2Client(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetOAuth2Client`: %v\n", resp) } ``` @@ -915,13 +915,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetOAuth2ConsentRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetOAuth2ConsentRequest`: OAuth2ConsentRequest - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetOAuth2ConsentRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -978,13 +978,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetOAuth2LoginRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetOAuth2LoginRequest`: OAuth2LoginRequest - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetOAuth2LoginRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetOAuth2LoginRequest`: %v\n", resp) } ``` @@ -1041,13 +1041,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetOAuth2LogoutRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetOAuth2LogoutRequest`: OAuth2LogoutRequest - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetOAuth2LogoutRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetOAuth2LogoutRequest`: %v\n", resp) } ``` @@ -1104,13 +1104,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminGetTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminGetTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminGetTrustedOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminGetTrustedOAuth2JwtGrantIssuer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminGetTrustedOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminGetTrustedOAuth2JwtGrantIssuer`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminGetTrustedOAuth2JwtGrantIssuer`: %v\n", resp) } ``` @@ -1172,13 +1172,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminIntrospectOAuth2Token(context.Background()).Token(token).Scope(scope).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminIntrospectOAuth2Token(context.Background()).Token(token).Scope(scope).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminIntrospectOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminIntrospectOAuth2Token``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminIntrospectOAuth2Token`: IntrospectedOAuth2Token - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminIntrospectOAuth2Token`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminIntrospectOAuth2Token`: %v\n", resp) } ``` @@ -1239,13 +1239,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminListOAuth2Clients(context.Background()).PageSize(pageSize).PageToken(pageToken).ClientName(clientName).Owner(owner).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminListOAuth2Clients(context.Background()).PageSize(pageSize).PageToken(pageToken).ClientName(clientName).Owner(owner).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminListOAuth2Clients``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminListOAuth2Clients``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminListOAuth2Clients`: []OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminListOAuth2Clients`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminListOAuth2Clients`: %v\n", resp) } ``` @@ -1307,13 +1307,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminListOAuth2SubjectConsentSessions(context.Background()).Subject(subject).Link(link).XTotalCount(xTotalCount).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminListOAuth2SubjectConsentSessions(context.Background()).Subject(subject).Link(link).XTotalCount(xTotalCount).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminListOAuth2SubjectConsentSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminListOAuth2SubjectConsentSessions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminListOAuth2SubjectConsentSessions`: []PreviousOAuth2ConsentSession - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminListOAuth2SubjectConsentSessions`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminListOAuth2SubjectConsentSessions`: %v\n", resp) } ``` @@ -1376,13 +1376,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).MaxItems(maxItems).DefaultItems(defaultItems).Issuer(issuer).Limit(limit).Offset(offset).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).MaxItems(maxItems).DefaultItems(defaultItems).Issuer(issuer).Limit(limit).Offset(offset).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminListTrustedOAuth2JwtGrantIssuers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminListTrustedOAuth2JwtGrantIssuers``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminListTrustedOAuth2JwtGrantIssuers`: []TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminListTrustedOAuth2JwtGrantIssuers`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminListTrustedOAuth2JwtGrantIssuers`: %v\n", resp) } ``` @@ -1443,13 +1443,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminPatchOAuth2Client(context.Background(), id).JsonPatch(jsonPatch).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminPatchOAuth2Client(context.Background(), id).JsonPatch(jsonPatch).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminPatchOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminPatchOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminPatchOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminPatchOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminPatchOAuth2Client`: %v\n", resp) } ``` @@ -1513,13 +1513,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminRejectOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminRejectOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminRejectOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminRejectOAuth2ConsentRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminRejectOAuth2ConsentRequest`: SuccessfulOAuth2RequestResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminRejectOAuth2ConsentRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminRejectOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -1578,13 +1578,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminRejectOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminRejectOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminRejectOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminRejectOAuth2LoginRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminRejectOAuth2LoginRequest`: SuccessfulOAuth2RequestResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminRejectOAuth2LoginRequest`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminRejectOAuth2LoginRequest`: %v\n", resp) } ``` @@ -1642,9 +1642,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminRejectOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminRejectOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminRejectOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminRejectOAuth2LogoutRequest``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -1705,9 +1705,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminRevokeOAuth2ConsentSessions(context.Background()).Subject(subject).Client(client).All(all).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminRevokeOAuth2ConsentSessions(context.Background()).Subject(subject).Client(client).All(all).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminRevokeOAuth2ConsentSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminRevokeOAuth2ConsentSessions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -1767,9 +1767,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminRevokeOAuth2LoginSessions(context.Background()).Subject(subject).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminRevokeOAuth2LoginSessions(context.Background()).Subject(subject).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminRevokeOAuth2LoginSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminRevokeOAuth2LoginSessions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -1829,13 +1829,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(adminTrustOAuth2JwtGrantIssuerBody).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(adminTrustOAuth2JwtGrantIssuerBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminTrustOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminTrustOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminTrustOAuth2JwtGrantIssuer`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer`: %v\n", resp) } ``` @@ -1894,13 +1894,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminUpdateJsonWebKey(context.Background(), set, kid).JsonWebKey(jsonWebKey).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminUpdateJsonWebKey(context.Background(), set, kid).JsonWebKey(jsonWebKey).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminUpdateJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminUpdateJsonWebKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminUpdateJsonWebKey`: JsonWebKey - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminUpdateJsonWebKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminUpdateJsonWebKey`: %v\n", resp) } ``` @@ -1965,13 +1965,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminUpdateJsonWebKeySet(context.Background(), set).JsonWebKeySet(jsonWebKeySet).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminUpdateJsonWebKeySet(context.Background(), set).JsonWebKeySet(jsonWebKeySet).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminUpdateJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminUpdateJsonWebKeySet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminUpdateJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminUpdateJsonWebKeySet`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminUpdateJsonWebKeySet`: %v\n", resp) } ``` @@ -2035,13 +2035,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.AdminUpdateOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() + resp, r, err := apiClient.V0alpha2Api.AdminUpdateOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.AdminUpdateOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.AdminUpdateOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `AdminUpdateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.AdminUpdateOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.AdminUpdateOAuth2Client`: %v\n", resp) } ``` @@ -2102,13 +2102,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DiscoverJsonWebKeys(context.Background()).Execute() + resp, r, err := apiClient.V0alpha2Api.DiscoverJsonWebKeys(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DiscoverJsonWebKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DiscoverJsonWebKeys``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DiscoverJsonWebKeys`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `V1Api.DiscoverJsonWebKeys`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.DiscoverJsonWebKeys`: %v\n", resp) } ``` @@ -2161,13 +2161,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DiscoverOidcConfiguration(context.Background()).Execute() + resp, r, err := apiClient.V0alpha2Api.DiscoverOidcConfiguration(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DiscoverOidcConfiguration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DiscoverOidcConfiguration``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DiscoverOidcConfiguration`: OidcConfiguration - fmt.Fprintf(os.Stdout, "Response from `V1Api.DiscoverOidcConfiguration`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.DiscoverOidcConfiguration`: %v\n", resp) } ``` @@ -2223,13 +2223,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DynamicClientRegistrationCreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() + resp, r, err := apiClient.V0alpha2Api.DynamicClientRegistrationCreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DynamicClientRegistrationCreateOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DynamicClientRegistrationCreateOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DynamicClientRegistrationCreateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.DynamicClientRegistrationCreateOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.DynamicClientRegistrationCreateOAuth2Client`: %v\n", resp) } ``` @@ -2287,9 +2287,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DynamicClientRegistrationDeleteOAuth2Client(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.DynamicClientRegistrationDeleteOAuth2Client(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DynamicClientRegistrationDeleteOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DynamicClientRegistrationDeleteOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -2353,13 +2353,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DynamicClientRegistrationGetOAuth2Client(context.Background(), id).Execute() + resp, r, err := apiClient.V0alpha2Api.DynamicClientRegistrationGetOAuth2Client(context.Background(), id).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DynamicClientRegistrationGetOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DynamicClientRegistrationGetOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DynamicClientRegistrationGetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.DynamicClientRegistrationGetOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.DynamicClientRegistrationGetOAuth2Client`: %v\n", resp) } ``` @@ -2423,13 +2423,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.DynamicClientRegistrationUpdateOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() + resp, r, err := apiClient.V0alpha2Api.DynamicClientRegistrationUpdateOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.DynamicClientRegistrationUpdateOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.DynamicClientRegistrationUpdateOAuth2Client``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DynamicClientRegistrationUpdateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `V1Api.DynamicClientRegistrationUpdateOAuth2Client`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.DynamicClientRegistrationUpdateOAuth2Client`: %v\n", resp) } ``` @@ -2491,13 +2491,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.GetOidcUserInfo(context.Background()).Execute() + resp, r, err := apiClient.V0alpha2Api.GetOidcUserInfo(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.GetOidcUserInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.GetOidcUserInfo``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetOidcUserInfo`: OidcUserInfo - fmt.Fprintf(os.Stdout, "Response from `V1Api.GetOidcUserInfo`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.GetOidcUserInfo`: %v\n", resp) } ``` @@ -2550,13 +2550,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.PerformOAuth2AuthorizationFlow(context.Background()).Execute() + resp, r, err := apiClient.V0alpha2Api.PerformOAuth2AuthorizationFlow(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.PerformOAuth2AuthorizationFlow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.PerformOAuth2AuthorizationFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PerformOAuth2AuthorizationFlow`: OAuth2ApiError - fmt.Fprintf(os.Stdout, "Response from `V1Api.PerformOAuth2AuthorizationFlow`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.PerformOAuth2AuthorizationFlow`: %v\n", resp) } ``` @@ -2615,13 +2615,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.PerformOAuth2TokenFlow(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute() + resp, r, err := apiClient.V0alpha2Api.PerformOAuth2TokenFlow(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.PerformOAuth2TokenFlow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.PerformOAuth2TokenFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PerformOAuth2TokenFlow`: OAuth2TokenResponse - fmt.Fprintf(os.Stdout, "Response from `V1Api.PerformOAuth2TokenFlow`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.PerformOAuth2TokenFlow`: %v\n", resp) } ``` @@ -2680,9 +2680,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.PerformOidcFrontOrBackChannelLogout(context.Background()).Execute() + resp, r, err := apiClient.V0alpha2Api.PerformOidcFrontOrBackChannelLogout(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.PerformOidcFrontOrBackChannelLogout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.PerformOidcFrontOrBackChannelLogout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -2738,9 +2738,9 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.V1Api.RevokeOAuth2Token(context.Background()).Token(token).Execute() + resp, r, err := apiClient.V0alpha2Api.RevokeOAuth2Token(context.Background()).Token(token).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `V1Api.RevokeOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.RevokeOAuth2Token``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } diff --git a/internal/httpclient-next/model_default_session.go b/internal/httpclient/model_default_session.go similarity index 98% rename from internal/httpclient-next/model_default_session.go rename to internal/httpclient/model_default_session.go index 2cb9fa97c6b..5f90f854c7a 100644 --- a/internal/httpclient-next/model_default_session.go +++ b/internal/httpclient/model_default_session.go @@ -1,15 +1,15 @@ /* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package client +package openapi import ( "encoding/json" diff --git a/internal/httpclient-next/model_headers.go b/internal/httpclient/model_headers.go similarity index 79% rename from internal/httpclient-next/model_headers.go rename to internal/httpclient/model_headers.go index 4f8a5b7ee95..e80b63ef2d5 100644 --- a/internal/httpclient-next/model_headers.go +++ b/internal/httpclient/model_headers.go @@ -1,15 +1,15 @@ /* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package client +package openapi import ( "encoding/json" @@ -17,7 +17,7 @@ import ( // Headers Headers is the jwt headers type Headers struct { - Extra map[string]map[string]interface{} `json:"extra,omitempty"` + Extra map[string]interface{} `json:"extra,omitempty"` } // NewHeaders instantiates a new Headers object @@ -38,9 +38,9 @@ func NewHeadersWithDefaults() *Headers { } // GetExtra returns the Extra field value if set, zero value otherwise. -func (o *Headers) GetExtra() map[string]map[string]interface{} { +func (o *Headers) GetExtra() map[string]interface{} { if o == nil || o.Extra == nil { - var ret map[string]map[string]interface{} + var ret map[string]interface{} return ret } return o.Extra @@ -48,7 +48,7 @@ func (o *Headers) GetExtra() map[string]map[string]interface{} { // GetExtraOk returns a tuple with the Extra field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Headers) GetExtraOk() (map[string]map[string]interface{}, bool) { +func (o *Headers) GetExtraOk() (map[string]interface{}, bool) { if o == nil || o.Extra == nil { return nil, false } @@ -64,8 +64,8 @@ func (o *Headers) HasExtra() bool { return false } -// SetExtra gets a reference to the given map[string]map[string]interface{} and assigns it to the Extra field. -func (o *Headers) SetExtra(v map[string]map[string]interface{}) { +// SetExtra gets a reference to the given map[string]interface{} and assigns it to the Extra field. +func (o *Headers) SetExtra(v map[string]interface{}) { o.Extra = v } diff --git a/internal/httpclient-next/model_id_token_claims.go b/internal/httpclient/model_id_token_claims.go similarity index 89% rename from internal/httpclient-next/model_id_token_claims.go rename to internal/httpclient/model_id_token_claims.go index 7807604563b..84b7ed91e53 100644 --- a/internal/httpclient-next/model_id_token_claims.go +++ b/internal/httpclient/model_id_token_claims.go @@ -1,15 +1,15 @@ /* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package client +package openapi import ( "encoding/json" @@ -18,20 +18,20 @@ import ( // IDTokenClaims IDTokenClaims represent the claims used in open id connect requests type IDTokenClaims struct { - Acr *string `json:"acr,omitempty"` - Amr []string `json:"amr,omitempty"` - AtHash *string `json:"at_hash,omitempty"` - Aud []string `json:"aud,omitempty"` - AuthTime *time.Time `json:"auth_time,omitempty"` - CHash *string `json:"c_hash,omitempty"` - Exp *time.Time `json:"exp,omitempty"` - Ext map[string]map[string]interface{} `json:"ext,omitempty"` - Iat *time.Time `json:"iat,omitempty"` - Iss *string `json:"iss,omitempty"` - Jti *string `json:"jti,omitempty"` - Nonce *string `json:"nonce,omitempty"` - Rat *time.Time `json:"rat,omitempty"` - Sub *string `json:"sub,omitempty"` + Acr *string `json:"acr,omitempty"` + Amr []string `json:"amr,omitempty"` + AtHash *string `json:"at_hash,omitempty"` + Aud []string `json:"aud,omitempty"` + AuthTime *time.Time `json:"auth_time,omitempty"` + CHash *string `json:"c_hash,omitempty"` + Exp *time.Time `json:"exp,omitempty"` + Ext map[string]interface{} `json:"ext,omitempty"` + Iat *time.Time `json:"iat,omitempty"` + Iss *string `json:"iss,omitempty"` + Jti *string `json:"jti,omitempty"` + Nonce *string `json:"nonce,omitempty"` + Rat *time.Time `json:"rat,omitempty"` + Sub *string `json:"sub,omitempty"` } // NewIDTokenClaims instantiates a new IDTokenClaims object @@ -276,9 +276,9 @@ func (o *IDTokenClaims) SetExp(v time.Time) { } // GetExt returns the Ext field value if set, zero value otherwise. -func (o *IDTokenClaims) GetExt() map[string]map[string]interface{} { +func (o *IDTokenClaims) GetExt() map[string]interface{} { if o == nil || o.Ext == nil { - var ret map[string]map[string]interface{} + var ret map[string]interface{} return ret } return o.Ext @@ -286,7 +286,7 @@ func (o *IDTokenClaims) GetExt() map[string]map[string]interface{} { // GetExtOk returns a tuple with the Ext field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IDTokenClaims) GetExtOk() (map[string]map[string]interface{}, bool) { +func (o *IDTokenClaims) GetExtOk() (map[string]interface{}, bool) { if o == nil || o.Ext == nil { return nil, false } @@ -302,8 +302,8 @@ func (o *IDTokenClaims) HasExt() bool { return false } -// SetExt gets a reference to the given map[string]map[string]interface{} and assigns it to the Ext field. -func (o *IDTokenClaims) SetExt(v map[string]map[string]interface{}) { +// SetExt gets a reference to the given map[string]interface{} and assigns it to the Ext field. +func (o *IDTokenClaims) SetExt(v map[string]interface{}) { o.Ext = v } diff --git a/internal/httpclient-next/model_o_auth2_access_request.go b/internal/httpclient/model_o_auth2_access_request.go similarity index 97% rename from internal/httpclient-next/model_o_auth2_access_request.go rename to internal/httpclient/model_o_auth2_access_request.go index e3f8c1cf589..2eaed0b8111 100644 --- a/internal/httpclient-next/model_o_auth2_access_request.go +++ b/internal/httpclient/model_o_auth2_access_request.go @@ -1,15 +1,15 @@ /* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package client +package openapi import ( "encoding/json" diff --git a/internal/httpclient/model_refresh_token_hook_request.go b/internal/httpclient/model_refresh_token_hook_request.go index b827db5ae6e..4373cd315b8 100644 --- a/internal/httpclient/model_refresh_token_hook_request.go +++ b/internal/httpclient/model_refresh_token_hook_request.go @@ -22,7 +22,9 @@ type RefreshTokenHookRequest struct { // GrantedAudience is the list of audiences granted to the OAuth 2.0 client. GrantedAudience []string `json:"granted_audience,omitempty"` // GrantedScopes is the list of scopes granted to the OAuth 2.0 client. - GrantedScopes []string `json:"granted_scopes,omitempty"` + GrantedScopes []string `json:"granted_scopes,omitempty"` + Requester *OAuth2AccessRequest `json:"requester,omitempty"` + Session *Session `json:"session,omitempty"` // Subject is the identifier of the authenticated end-user. Subject *string `json:"subject,omitempty"` } @@ -140,6 +142,70 @@ func (o *RefreshTokenHookRequest) SetGrantedScopes(v []string) { o.GrantedScopes = v } +// GetRequester returns the Requester field value if set, zero value otherwise. +func (o *RefreshTokenHookRequest) GetRequester() OAuth2AccessRequest { + if o == nil || o.Requester == nil { + var ret OAuth2AccessRequest + return ret + } + return *o.Requester +} + +// GetRequesterOk returns a tuple with the Requester field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefreshTokenHookRequest) GetRequesterOk() (*OAuth2AccessRequest, bool) { + if o == nil || o.Requester == nil { + return nil, false + } + return o.Requester, true +} + +// HasRequester returns a boolean if a field has been set. +func (o *RefreshTokenHookRequest) HasRequester() bool { + if o != nil && o.Requester != nil { + return true + } + + return false +} + +// SetRequester gets a reference to the given OAuth2AccessRequest and assigns it to the Requester field. +func (o *RefreshTokenHookRequest) SetRequester(v OAuth2AccessRequest) { + o.Requester = &v +} + +// GetSession returns the Session field value if set, zero value otherwise. +func (o *RefreshTokenHookRequest) GetSession() Session { + if o == nil || o.Session == nil { + var ret Session + return ret + } + return *o.Session +} + +// GetSessionOk returns a tuple with the Session field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefreshTokenHookRequest) GetSessionOk() (*Session, bool) { + if o == nil || o.Session == nil { + return nil, false + } + return o.Session, true +} + +// HasSession returns a boolean if a field has been set. +func (o *RefreshTokenHookRequest) HasSession() bool { + if o != nil && o.Session != nil { + return true + } + + return false +} + +// SetSession gets a reference to the given Session and assigns it to the Session field. +func (o *RefreshTokenHookRequest) SetSession(v Session) { + o.Session = &v +} + // GetSubject returns the Subject field value if set, zero value otherwise. func (o *RefreshTokenHookRequest) GetSubject() string { if o == nil || o.Subject == nil { @@ -183,6 +249,12 @@ func (o RefreshTokenHookRequest) MarshalJSON() ([]byte, error) { if o.GrantedScopes != nil { toSerialize["granted_scopes"] = o.GrantedScopes } + if o.Requester != nil { + toSerialize["requester"] = o.Requester + } + if o.Session != nil { + toSerialize["session"] = o.Session + } if o.Subject != nil { toSerialize["subject"] = o.Subject } diff --git a/internal/httpclient-next/model_session.go b/internal/httpclient/model_session.go similarity index 88% rename from internal/httpclient-next/model_session.go rename to internal/httpclient/model_session.go index eb9a90d7482..4f45c1c7245 100644 --- a/internal/httpclient-next/model_session.go +++ b/internal/httpclient/model_session.go @@ -1,15 +1,15 @@ /* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package client +package openapi import ( "encoding/json" @@ -18,17 +18,17 @@ import ( // Session struct for Session type Session struct { - AllowedTopLevelClaims []string `json:"allowed_top_level_claims,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ConsentChallenge *string `json:"consent_challenge,omitempty"` - ExcludeNotBeforeClaim *bool `json:"exclude_not_before_claim,omitempty"` - ExpiresAt *map[string]time.Time `json:"expires_at,omitempty"` - Extra map[string]map[string]interface{} `json:"extra,omitempty"` - Headers *Headers `json:"headers,omitempty"` - IdTokenClaims *IDTokenClaims `json:"id_token_claims,omitempty"` - Kid *string `json:"kid,omitempty"` - Subject *string `json:"subject,omitempty"` - Username *string `json:"username,omitempty"` + AllowedTopLevelClaims []string `json:"allowed_top_level_claims,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ConsentChallenge *string `json:"consent_challenge,omitempty"` + ExcludeNotBeforeClaim *bool `json:"exclude_not_before_claim,omitempty"` + ExpiresAt *map[string]time.Time `json:"expires_at,omitempty"` + Extra map[string]interface{} `json:"extra,omitempty"` + Headers *Headers `json:"headers,omitempty"` + IdTokenClaims *IDTokenClaims `json:"id_token_claims,omitempty"` + Kid *string `json:"kid,omitempty"` + Subject *string `json:"subject,omitempty"` + Username *string `json:"username,omitempty"` } // NewSession instantiates a new Session object @@ -209,9 +209,9 @@ func (o *Session) SetExpiresAt(v map[string]time.Time) { } // GetExtra returns the Extra field value if set, zero value otherwise. -func (o *Session) GetExtra() map[string]map[string]interface{} { +func (o *Session) GetExtra() map[string]interface{} { if o == nil || o.Extra == nil { - var ret map[string]map[string]interface{} + var ret map[string]interface{} return ret } return o.Extra @@ -219,7 +219,7 @@ func (o *Session) GetExtra() map[string]map[string]interface{} { // GetExtraOk returns a tuple with the Extra field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Session) GetExtraOk() (map[string]map[string]interface{}, bool) { +func (o *Session) GetExtraOk() (map[string]interface{}, bool) { if o == nil || o.Extra == nil { return nil, false } @@ -235,8 +235,8 @@ func (o *Session) HasExtra() bool { return false } -// SetExtra gets a reference to the given map[string]map[string]interface{} and assigns it to the Extra field. -func (o *Session) SetExtra(v map[string]map[string]interface{}) { +// SetExtra gets a reference to the given map[string]interface{} and assigns it to the Extra field. +func (o *Session) SetExtra(v map[string]interface{}) { o.Extra = v } diff --git a/internal/httpclient/models/default_session.go b/internal/httpclient/models/default_session.go deleted file mode 100644 index 4e3cbb731d3..00000000000 --- a/internal/httpclient/models/default_session.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DefaultSession IDTokenSession is a session container for the id token -// -// swagger:model DefaultSession -type DefaultSession struct { - - // expires at - ExpiresAt map[string]strfmt.DateTime `json:"expires_at,omitempty"` - - // headers - Headers *Headers `json:"headers,omitempty"` - - // id token claims - IDTokenClaims *IDTokenClaims `json:"id_token_claims,omitempty"` - - // subject - Subject string `json:"subject,omitempty"` - - // username - Username string `json:"username,omitempty"` -} - -// Validate validates this default session -func (m *DefaultSession) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExpiresAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHeaders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIDTokenClaims(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DefaultSession) validateExpiresAt(formats strfmt.Registry) error { - if swag.IsZero(m.ExpiresAt) { // not required - return nil - } - - for k := range m.ExpiresAt { - - if err := validate.FormatOf("expires_at"+"."+k, "body", "date-time", m.ExpiresAt[k].String(), formats); err != nil { - return err - } - - } - - return nil -} - -func (m *DefaultSession) validateHeaders(formats strfmt.Registry) error { - if swag.IsZero(m.Headers) { // not required - return nil - } - - if m.Headers != nil { - if err := m.Headers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("headers") - } - return err - } - } - - return nil -} - -func (m *DefaultSession) validateIDTokenClaims(formats strfmt.Registry) error { - if swag.IsZero(m.IDTokenClaims) { // not required - return nil - } - - if m.IDTokenClaims != nil { - if err := m.IDTokenClaims.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id_token_claims") - } - return err - } - } - - return nil -} - -// ContextValidate validate this default session based on the context it is used -func (m *DefaultSession) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHeaders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIDTokenClaims(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DefaultSession) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error { - - if m.Headers != nil { - if err := m.Headers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("headers") - } - return err - } - } - - return nil -} - -func (m *DefaultSession) contextValidateIDTokenClaims(ctx context.Context, formats strfmt.Registry) error { - - if m.IDTokenClaims != nil { - if err := m.IDTokenClaims.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id_token_claims") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DefaultSession) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DefaultSession) UnmarshalBinary(b []byte) error { - var res DefaultSession - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/headers.go b/internal/httpclient/models/headers.go deleted file mode 100644 index e8d8cfee0b6..00000000000 --- a/internal/httpclient/models/headers.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Headers Headers is the jwt headers -// -// swagger:model Headers -type Headers struct { - - // extra - Extra interface{} `json:"extra,omitempty"` -} - -// Validate validates this headers -func (m *Headers) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this headers based on context it is used -func (m *Headers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Headers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Headers) UnmarshalBinary(b []byte) error { - var res Headers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/id_token_claims.go b/internal/httpclient/models/id_token_claims.go deleted file mode 100644 index 0b6d0820e86..00000000000 --- a/internal/httpclient/models/id_token_claims.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IDTokenClaims IDTokenClaims represent the claims used in open id connect requests -// -// swagger:model IDTokenClaims -type IDTokenClaims struct { - - // acr - Acr string `json:"acr,omitempty"` - - // amr - Amr []string `json:"amr"` - - // at hash - AtHash string `json:"at_hash,omitempty"` - - // aud - Aud []string `json:"aud"` - - // auth time - // Format: date-time - AuthTime strfmt.DateTime `json:"auth_time,omitempty"` - - // c hash - CHash string `json:"c_hash,omitempty"` - - // exp - // Format: date-time - Exp strfmt.DateTime `json:"exp,omitempty"` - - // ext - Ext interface{} `json:"ext,omitempty"` - - // iat - // Format: date-time - Iat strfmt.DateTime `json:"iat,omitempty"` - - // iss - Iss string `json:"iss,omitempty"` - - // jti - Jti string `json:"jti,omitempty"` - - // nonce - Nonce string `json:"nonce,omitempty"` - - // rat - // Format: date-time - Rat strfmt.DateTime `json:"rat,omitempty"` - - // sub - Sub string `json:"sub,omitempty"` -} - -// Validate validates this ID token claims -func (m *IDTokenClaims) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIat(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRat(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IDTokenClaims) validateAuthTime(formats strfmt.Registry) error { - if swag.IsZero(m.AuthTime) { // not required - return nil - } - - if err := validate.FormatOf("auth_time", "body", "date-time", m.AuthTime.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *IDTokenClaims) validateExp(formats strfmt.Registry) error { - if swag.IsZero(m.Exp) { // not required - return nil - } - - if err := validate.FormatOf("exp", "body", "date-time", m.Exp.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *IDTokenClaims) validateIat(formats strfmt.Registry) error { - if swag.IsZero(m.Iat) { // not required - return nil - } - - if err := validate.FormatOf("iat", "body", "date-time", m.Iat.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *IDTokenClaims) validateRat(formats strfmt.Registry) error { - if swag.IsZero(m.Rat) { // not required - return nil - } - - if err := validate.FormatOf("rat", "body", "date-time", m.Rat.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ID token claims based on context it is used -func (m *IDTokenClaims) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IDTokenClaims) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IDTokenClaims) UnmarshalBinary(b []byte) error { - var res IDTokenClaims - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/null_duration.go b/internal/httpclient/models/null_duration.go deleted file mode 100644 index c09aa9e7874..00000000000 --- a/internal/httpclient/models/null_duration.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" -) - -// NullDuration NullDuration represents a nullable JSON and SQL compatible time.Duration. -// -// TODO delete this type and replace it with ory/x/sqlxx/NullDuration when applying the custom client token TTL patch to Hydra 2.x -// -// swagger:model NullDuration -type NullDuration string - -// Validate validates this null duration -func (m NullDuration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this null duration based on context it is used -func (m NullDuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/internal/httpclient/models/o_auth2_access_request.go b/internal/httpclient/models/o_auth2_access_request.go deleted file mode 100644 index 05ad2240515..00000000000 --- a/internal/httpclient/models/o_auth2_access_request.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OAuth2AccessRequest Requester is a token endpoint's request context. -// -// swagger:model oAuth2AccessRequest -type OAuth2AccessRequest struct { - - // ClientID is the identifier of the OAuth 2.0 client. - ClientID string `json:"client_id,omitempty"` - - // GrantTypes is the requests grant types. - GrantTypes []string `json:"grant_types"` - - // GrantedAudience is the list of audiences granted to the OAuth 2.0 client. - GrantedAudience []string `json:"granted_audience"` - - // GrantedScopes is the list of scopes granted to the OAuth 2.0 client. - GrantedScopes []string `json:"granted_scopes"` -} - -// Validate validates this o auth2 access request -func (m *OAuth2AccessRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o auth2 access request based on context it is used -func (m *OAuth2AccessRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OAuth2AccessRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OAuth2AccessRequest) UnmarshalBinary(b []byte) error { - var res OAuth2AccessRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/refresh_token_hook_request.go b/internal/httpclient/models/refresh_token_hook_request.go deleted file mode 100644 index 8b86e8daf8d..00000000000 --- a/internal/httpclient/models/refresh_token_hook_request.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RefreshTokenHookRequest RefreshTokenHookRequest is the request body sent to the refresh token hook. -// -// swagger:model refreshTokenHookRequest -type RefreshTokenHookRequest struct { - - // ClientID is the identifier of the OAuth 2.0 client. - ClientID string `json:"client_id,omitempty"` - - // GrantedAudience is the list of audiences granted to the OAuth 2.0 client. - GrantedAudience []string `json:"granted_audience"` - - // GrantedScopes is the list of scopes granted to the OAuth 2.0 client. - GrantedScopes []string `json:"granted_scopes"` - - // requester - Requester *OAuth2AccessRequest `json:"requester,omitempty"` - - // session - Session *Session `json:"session,omitempty"` - - // Subject is the identifier of the authenticated end-user. - Subject string `json:"subject,omitempty"` -} - -// Validate validates this refresh token hook request -func (m *RefreshTokenHookRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRequester(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSession(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RefreshTokenHookRequest) validateRequester(formats strfmt.Registry) error { - if swag.IsZero(m.Requester) { // not required - return nil - } - - if m.Requester != nil { - if err := m.Requester.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requester") - } - return err - } - } - - return nil -} - -func (m *RefreshTokenHookRequest) validateSession(formats strfmt.Registry) error { - if swag.IsZero(m.Session) { // not required - return nil - } - - if m.Session != nil { - if err := m.Session.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("session") - } - return err - } - } - - return nil -} - -// ContextValidate validate this refresh token hook request based on the context it is used -func (m *RefreshTokenHookRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRequester(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSession(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RefreshTokenHookRequest) contextValidateRequester(ctx context.Context, formats strfmt.Registry) error { - - if m.Requester != nil { - if err := m.Requester.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requester") - } - return err - } - } - - return nil -} - -func (m *RefreshTokenHookRequest) contextValidateSession(ctx context.Context, formats strfmt.Registry) error { - - if m.Session != nil { - if err := m.Session.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("session") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RefreshTokenHookRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RefreshTokenHookRequest) UnmarshalBinary(b []byte) error { - var res RefreshTokenHookRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/session.go b/internal/httpclient/models/session.go deleted file mode 100644 index 2bb413e8b5c..00000000000 --- a/internal/httpclient/models/session.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Session session -// -// swagger:model Session -type Session struct { - - // allowed top level claims - AllowedTopLevelClaims []string `json:"allowed_top_level_claims"` - - // client id - ClientID string `json:"client_id,omitempty"` - - // consent challenge - ConsentChallenge string `json:"consent_challenge,omitempty"` - - // exclude not before claim - ExcludeNotBeforeClaim bool `json:"exclude_not_before_claim,omitempty"` - - // expires at - ExpiresAt map[string]strfmt.DateTime `json:"expires_at,omitempty"` - - // extra - Extra interface{} `json:"extra,omitempty"` - - // headers - Headers *Headers `json:"headers,omitempty"` - - // id token claims - IDTokenClaims *IDTokenClaims `json:"id_token_claims,omitempty"` - - // kid - Kid string `json:"kid,omitempty"` - - // subject - Subject string `json:"subject,omitempty"` - - // username - Username string `json:"username,omitempty"` -} - -// Validate validates this session -func (m *Session) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExpiresAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHeaders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIDTokenClaims(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Session) validateExpiresAt(formats strfmt.Registry) error { - if swag.IsZero(m.ExpiresAt) { // not required - return nil - } - - for k := range m.ExpiresAt { - - if err := validate.FormatOf("expires_at"+"."+k, "body", "date-time", m.ExpiresAt[k].String(), formats); err != nil { - return err - } - - } - - return nil -} - -func (m *Session) validateHeaders(formats strfmt.Registry) error { - if swag.IsZero(m.Headers) { // not required - return nil - } - - if m.Headers != nil { - if err := m.Headers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("headers") - } - return err - } - } - - return nil -} - -func (m *Session) validateIDTokenClaims(formats strfmt.Registry) error { - if swag.IsZero(m.IDTokenClaims) { // not required - return nil - } - - if m.IDTokenClaims != nil { - if err := m.IDTokenClaims.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id_token_claims") - } - return err - } - } - - return nil -} - -// ContextValidate validate this session based on the context it is used -func (m *Session) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHeaders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIDTokenClaims(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Session) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error { - - if m.Headers != nil { - if err := m.Headers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("headers") - } - return err - } - } - - return nil -} - -func (m *Session) contextValidateIDTokenClaims(ctx context.Context, formats strfmt.Registry) error { - - if m.IDTokenClaims != nil { - if err := m.IDTokenClaims.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id_token_claims") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Session) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Session) UnmarshalBinary(b []byte) error { - var res Session - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/internal/httpclient/models/update_o_auth2_client_lifespans.go b/internal/httpclient/models/update_o_auth2_client_lifespans.go deleted file mode 100644 index 236d5b9c9e9..00000000000 --- a/internal/httpclient/models/update_o_auth2_client_lifespans.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateOAuth2ClientLifespans UpdateOAuth2ClientLifespans holds default lifespan configuration for the different -// token types that may be issued for the client. This configuration takes -// precedence over fosite's instance-wide default lifespan, but it may be -// overridden by a session's expires_at claim. -// -// The OIDC Hybrid grant type inherits token lifespan configuration from the implicit grant. -// -// swagger:model UpdateOAuth2ClientLifespans -type UpdateOAuth2ClientLifespans struct { - - // authorization code grant access token lifespan - AuthorizationCodeGrantAccessTokenLifespan NullDuration `json:"authorization_code_grant_access_token_lifespan,omitempty"` - - // authorization code grant id token lifespan - AuthorizationCodeGrantIDTokenLifespan NullDuration `json:"authorization_code_grant_id_token_lifespan,omitempty"` - - // authorization code grant refresh token lifespan - AuthorizationCodeGrantRefreshTokenLifespan NullDuration `json:"authorization_code_grant_refresh_token_lifespan,omitempty"` - - // client credentials grant access token lifespan - ClientCredentialsGrantAccessTokenLifespan NullDuration `json:"client_credentials_grant_access_token_lifespan,omitempty"` - - // implicit grant access token lifespan - ImplicitGrantAccessTokenLifespan NullDuration `json:"implicit_grant_access_token_lifespan,omitempty"` - - // implicit grant id token lifespan - ImplicitGrantIDTokenLifespan NullDuration `json:"implicit_grant_id_token_lifespan,omitempty"` - - // jwt bearer grant access token lifespan - JwtBearerGrantAccessTokenLifespan NullDuration `json:"jwt_bearer_grant_access_token_lifespan,omitempty"` - - // password grant access token lifespan - PasswordGrantAccessTokenLifespan NullDuration `json:"password_grant_access_token_lifespan,omitempty"` - - // password grant refresh token lifespan - PasswordGrantRefreshTokenLifespan NullDuration `json:"password_grant_refresh_token_lifespan,omitempty"` - - // refresh token grant access token lifespan - RefreshTokenGrantAccessTokenLifespan NullDuration `json:"refresh_token_grant_access_token_lifespan,omitempty"` - - // refresh token grant id token lifespan - RefreshTokenGrantIDTokenLifespan NullDuration `json:"refresh_token_grant_id_token_lifespan,omitempty"` - - // refresh token grant refresh token lifespan - RefreshTokenGrantRefreshTokenLifespan NullDuration `json:"refresh_token_grant_refresh_token_lifespan,omitempty"` -} - -// Validate validates this update o auth2 client lifespans -func (m *UpdateOAuth2ClientLifespans) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthorizationCodeGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthorizationCodeGrantIDTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthorizationCodeGrantRefreshTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientCredentialsGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateImplicitGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateImplicitGrantIDTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJwtBearerGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePasswordGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePasswordGrantRefreshTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshTokenGrantAccessTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshTokenGrantIDTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshTokenGrantRefreshTokenLifespan(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateAuthorizationCodeGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.AuthorizationCodeGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.AuthorizationCodeGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateAuthorizationCodeGrantIDTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.AuthorizationCodeGrantIDTokenLifespan) { // not required - return nil - } - - if err := m.AuthorizationCodeGrantIDTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateAuthorizationCodeGrantRefreshTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.AuthorizationCodeGrantRefreshTokenLifespan) { // not required - return nil - } - - if err := m.AuthorizationCodeGrantRefreshTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateClientCredentialsGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.ClientCredentialsGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.ClientCredentialsGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("client_credentials_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateImplicitGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.ImplicitGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.ImplicitGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("implicit_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateImplicitGrantIDTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.ImplicitGrantIDTokenLifespan) { // not required - return nil - } - - if err := m.ImplicitGrantIDTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("implicit_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateJwtBearerGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.JwtBearerGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.JwtBearerGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jwt_bearer_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validatePasswordGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.PasswordGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("password_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validatePasswordGrantRefreshTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordGrantRefreshTokenLifespan) { // not required - return nil - } - - if err := m.PasswordGrantRefreshTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("password_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateRefreshTokenGrantAccessTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshTokenGrantAccessTokenLifespan) { // not required - return nil - } - - if err := m.RefreshTokenGrantAccessTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateRefreshTokenGrantIDTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshTokenGrantIDTokenLifespan) { // not required - return nil - } - - if err := m.RefreshTokenGrantIDTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) validateRefreshTokenGrantRefreshTokenLifespan(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshTokenGrantRefreshTokenLifespan) { // not required - return nil - } - - if err := m.RefreshTokenGrantRefreshTokenLifespan.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -// ContextValidate validate this update o auth2 client lifespans based on the context it is used -func (m *UpdateOAuth2ClientLifespans) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuthorizationCodeGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuthorizationCodeGrantIDTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuthorizationCodeGrantRefreshTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClientCredentialsGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateImplicitGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateImplicitGrantIDTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJwtBearerGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePasswordGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePasswordGrantRefreshTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshTokenGrantAccessTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshTokenGrantIDTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshTokenGrantRefreshTokenLifespan(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateAuthorizationCodeGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.AuthorizationCodeGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateAuthorizationCodeGrantIDTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.AuthorizationCodeGrantIDTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateAuthorizationCodeGrantRefreshTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.AuthorizationCodeGrantRefreshTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authorization_code_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateClientCredentialsGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.ClientCredentialsGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("client_credentials_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateImplicitGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.ImplicitGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("implicit_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateImplicitGrantIDTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.ImplicitGrantIDTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("implicit_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateJwtBearerGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.JwtBearerGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jwt_bearer_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidatePasswordGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.PasswordGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("password_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidatePasswordGrantRefreshTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.PasswordGrantRefreshTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("password_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateRefreshTokenGrantAccessTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.RefreshTokenGrantAccessTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_access_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateRefreshTokenGrantIDTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.RefreshTokenGrantIDTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_id_token_lifespan") - } - return err - } - - return nil -} - -func (m *UpdateOAuth2ClientLifespans) contextValidateRefreshTokenGrantRefreshTokenLifespan(ctx context.Context, formats strfmt.Registry) error { - - if err := m.RefreshTokenGrantRefreshTokenLifespan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refresh_token_grant_refresh_token_lifespan") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateOAuth2ClientLifespans) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateOAuth2ClientLifespans) UnmarshalBinary(b []byte) error { - var res UpdateOAuth2ClientLifespans - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/jwk/handler.go b/jwk/handler.go index a93b7da5c20..6a84023cc02 100644 --- a/jwk/handler.go +++ b/jwk/handler.go @@ -86,7 +86,7 @@ func (h *Handler) SetRoutes(admin *httprouterx.RouterAdmin, public *httprouterx. admin.DELETE(KeyHandlerPath+"/:set", h.adminDeleteJsonWebKeySet) } -// swagger:route GET /.well-known/jwks.json v1 discoverJsonWebKeys +// swagger:route GET /.well-known/jwks.json v0alpha2 discoverJsonWebKeys // // Discover JSON Web Keys // @@ -144,7 +144,7 @@ type adminGetJsonWebKey struct { KID string `json:"kid"` } -// swagger:route GET /admin/keys/{set}/{kid} v1 adminGetJsonWebKey +// swagger:route GET /admin/keys/{set}/{kid} v0alpha2 adminGetJsonWebKey // // Fetch a JSON Web Key // @@ -183,7 +183,7 @@ type adminGetJsonWebKeySet struct { Set string `json:"set"` } -// swagger:route GET /admin/keys/{set} v1 adminGetJsonWebKeySet +// swagger:route GET /admin/keys/{set} v0alpha2 adminGetJsonWebKeySet // // Retrieve a JSON Web Key Set // @@ -247,7 +247,7 @@ type adminCreateJsonWebKeySetBody struct { KeyID string `json:"kid"` } -// swagger:route POST /admin/keys/{set} v1 adminCreateJsonWebKeySet +// swagger:route POST /admin/keys/{set} v0alpha2 adminCreateJsonWebKeySet // // Generate a New JSON Web Key // @@ -293,7 +293,7 @@ type adminUpdateJsonWebKeySet struct { Body jsonWebKeySet } -// swagger:route PUT /admin/keys/{set} v1 adminUpdateJsonWebKeySet +// swagger:route PUT /admin/keys/{set} v0alpha2 adminUpdateJsonWebKeySet // // Update a JSON Web Key Set // @@ -346,7 +346,7 @@ type adminUpdateJsonWebKey struct { Body x.JSONWebKey } -// swagger:route PUT /admin/keys/{set}/{kid} v1 adminUpdateJsonWebKey +// swagger:route PUT /admin/keys/{set}/{kid} v0alpha2 adminUpdateJsonWebKey // // Update a JSON Web Key // @@ -390,7 +390,7 @@ type adminDeleteJsonWebKeySet struct { Set string `json:"set"` } -// swagger:route DELETE /admin/keys/{set} v1 adminDeleteJsonWebKeySet +// swagger:route DELETE /admin/keys/{set} v0alpha2 adminDeleteJsonWebKeySet // // Delete a JSON Web Key Set // @@ -434,7 +434,7 @@ type adminDeleteJsonWebKey struct { KID string `json:"kid"` } -// swagger:route DELETE /admin/keys/{set}/{kid} v1 adminDeleteJsonWebKey +// swagger:route DELETE /admin/keys/{set}/{kid} v0alpha2 adminDeleteJsonWebKey // // Delete a JSON Web Key // diff --git a/jwk/sdk_test.go b/jwk/sdk_test.go index 2bb475ef0da..b456b0436cc 100644 --- a/jwk/sdk_test.go +++ b/jwk/sdk_test.go @@ -60,7 +60,7 @@ func TestJWKSDK(t *testing.T) { t.Run("JSON Web Key", func(t *testing.T) { t.Run("CreateJwkSetKey", func(t *testing.T) { // Create a key called set-foo - resultKeys, _, err := sdk.V1Api.AdminCreateJsonWebKeySet(context.Background(), "set-foo").AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ + resultKeys, _, err := sdk.V0alpha2Api.AdminCreateJsonWebKeySet(context.Background(), "set-foo").AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ Alg: "RS256", Kid: "key-bar", Use: "sig", @@ -74,7 +74,7 @@ func TestJWKSDK(t *testing.T) { var resultKeys *hydra.JsonWebKeySet t.Run("GetJwkSetKey after create", func(t *testing.T) { - result, _, err := sdk.V1Api.AdminGetJsonWebKey(ctx, "set-foo", expectedKid).Execute() + result, _, err := sdk.V0alpha2Api.AdminGetJsonWebKey(ctx, "set-foo", expectedKid).Execute() require.NoError(t, err) require.Len(t, result.Keys, 1) require.Equal(t, expectedKid, result.Keys[0].Kid) @@ -90,19 +90,19 @@ func TestJWKSDK(t *testing.T) { require.Len(t, resultKeys.Keys, 1) resultKeys.Keys[0].Alg = "ES256" - resultKey, _, err := sdk.V1Api.AdminUpdateJsonWebKey(ctx, "set-foo", expectedKid).JsonWebKey(resultKeys.Keys[0]).Execute() + resultKey, _, err := sdk.V0alpha2Api.AdminUpdateJsonWebKey(ctx, "set-foo", expectedKid).JsonWebKey(resultKeys.Keys[0]).Execute() require.NoError(t, err) assert.Equal(t, expectedKid, resultKey.Kid) assert.Equal(t, "ES256", resultKey.Alg) }) t.Run("DeleteJwkSetKey after delete", func(t *testing.T) { - _, err := sdk.V1Api.AdminDeleteJsonWebKey(ctx, "set-foo", expectedKid).Execute() + _, err := sdk.V0alpha2Api.AdminDeleteJsonWebKey(ctx, "set-foo", expectedKid).Execute() require.NoError(t, err) }) t.Run("GetJwkSetKey after delete", func(t *testing.T) { - _, res, err := sdk.V1Api.AdminGetJsonWebKey(ctx, "set-foo", expectedKid).Execute() + _, res, err := sdk.V0alpha2Api.AdminGetJsonWebKey(ctx, "set-foo", expectedKid).Execute() require.Error(t, err) assert.Equal(t, http.StatusNotFound, res.StatusCode) }) @@ -111,7 +111,7 @@ func TestJWKSDK(t *testing.T) { t.Run("JWK Set", func(t *testing.T) { t.Run("CreateJwkSetKey", func(t *testing.T) { - resultKeys, _, err := sdk.V1Api.AdminCreateJsonWebKeySet(ctx, "set-foo2").AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ + resultKeys, _, err := sdk.V0alpha2Api.AdminCreateJsonWebKeySet(ctx, "set-foo2").AdminCreateJsonWebKeySetBody(hydra.AdminCreateJsonWebKeySetBody{ Alg: "RS256", Kid: "key-bar", }).Execute() @@ -121,7 +121,7 @@ func TestJWKSDK(t *testing.T) { assert.Equal(t, "RS256", resultKeys.Keys[0].Alg) }) - resultKeys, _, err := sdk.V1Api.AdminGetJsonWebKeySet(ctx, "set-foo2").Execute() + resultKeys, _, err := sdk.V0alpha2Api.AdminGetJsonWebKeySet(ctx, "set-foo2").Execute() t.Run("GetJwkSet after create", func(t *testing.T) { require.NoError(t, err) if conf.HSMEnabled() { @@ -142,7 +142,7 @@ func TestJWKSDK(t *testing.T) { require.Len(t, resultKeys.Keys, 1) resultKeys.Keys[0].Alg = "ES256" - result, _, err := sdk.V1Api.AdminUpdateJsonWebKeySet(ctx, "set-foo2").JsonWebKeySet(*resultKeys).Execute() + result, _, err := sdk.V0alpha2Api.AdminUpdateJsonWebKeySet(ctx, "set-foo2").JsonWebKeySet(*resultKeys).Execute() require.NoError(t, err) require.Len(t, result.Keys, 1) assert.Equal(t, expectedKid, result.Keys[0].Kid) @@ -150,18 +150,18 @@ func TestJWKSDK(t *testing.T) { }) t.Run("DeleteJwkSet", func(t *testing.T) { - _, err := sdk.V1Api.AdminDeleteJsonWebKeySet(ctx, "set-foo2").Execute() + _, err := sdk.V0alpha2Api.AdminDeleteJsonWebKeySet(ctx, "set-foo2").Execute() require.NoError(t, err) }) t.Run("GetJwkSet after delete", func(t *testing.T) { - _, res, err := sdk.V1Api.AdminGetJsonWebKeySet(ctx, "set-foo2").Execute() + _, res, err := sdk.V0alpha2Api.AdminGetJsonWebKeySet(ctx, "set-foo2").Execute() require.Error(t, err) assert.Equal(t, http.StatusNotFound, res.StatusCode) }) t.Run("GetJwkSetKey after delete", func(t *testing.T) { - _, res, err := sdk.V1Api.AdminGetJsonWebKey(ctx, "set-foo2", expectedKid).Execute() + _, res, err := sdk.V0alpha2Api.AdminGetJsonWebKey(ctx, "set-foo2", expectedKid).Execute() require.Error(t, err) assert.Equal(t, http.StatusNotFound, res.StatusCode) }) diff --git a/oauth2/handler.go b/oauth2/handler.go index 65400a2d784..c00fae2fd86 100644 --- a/oauth2/handler.go +++ b/oauth2/handler.go @@ -114,7 +114,7 @@ func (h *Handler) SetRoutes(admin *httprouterx.RouterAdmin, public *httprouterx. admin.DELETE(DeleteTokensPath, h.adminDeleteOAuth2Token) } -// swagger:route GET /oauth2/sessions/logout v1 performOidcFrontOrBackChannelLogout +// swagger:route GET /oauth2/sessions/logout v0alpha2 performOidcFrontOrBackChannelLogout // // OpenID Connect Front- or Back-channel Enabled Logout // @@ -353,7 +353,7 @@ type OIDCConfiguration struct { CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"` } -// swagger:route GET /.well-known/openid-configuration v1 discoverOidcConfiguration +// swagger:route GET /.well-known/openid-configuration v0alpha2 discoverOidcConfiguration // // OpenID Connect Discovery // @@ -471,7 +471,7 @@ type oidcUserInfo struct { UpdatedAt int `json:"updated_at,omitempty"` } -// swagger:route GET /userinfo v1 getOidcUserInfo +// swagger:route GET /userinfo v0alpha2 getOidcUserInfo // // OpenID Connect Userinfo // @@ -581,7 +581,7 @@ type revokeOAuth2Token struct { Token string `json:"token"` } -// swagger:route POST /oauth2/revoke v1 revokeOAuth2Token +// swagger:route POST /oauth2/revoke v0alpha2 revokeOAuth2Token // // Revoke an OAuth2 Access or Refresh Token // @@ -631,7 +631,7 @@ type adminIntrospectOAuth2Token struct { Scope string `json:"scope"` } -// swagger:route POST /admin/oauth2/introspect v1 adminIntrospectOAuth2Token +// swagger:route POST /admin/oauth2/introspect v0alpha2 adminIntrospectOAuth2Token // // Introspect OAuth2 Access or Refresh Tokens // @@ -785,7 +785,7 @@ type oAuth2TokenResponse struct { TokenType string `json:"token_type"` } -// swagger:route POST /oauth2/token v1 performOAuth2TokenFlow +// swagger:route POST /oauth2/token v0alpha2 performOAuth2TokenFlow // // The OAuth 2.0 Token Endpoint // @@ -884,7 +884,7 @@ func (h *Handler) performOAuth2TokenFlow(w http.ResponseWriter, r *http.Request) h.r.OAuth2Provider().WriteAccessResponse(ctx, w, accessRequest, accessResponse) } -// swagger:route GET /oauth2/auth v1 performOAuth2AuthorizationFlow +// swagger:route GET /oauth2/auth v0alpha2 performOAuth2AuthorizationFlow // // The OAuth 2.0 Authorize Endpoint // @@ -1015,7 +1015,7 @@ type adminDeleteOAuth2Token struct { ClientID string `json:"client_id"` } -// swagger:route DELETE /admin/oauth2/tokens v1 adminDeleteOAuth2Token +// swagger:route DELETE /admin/oauth2/tokens v0alpha2 adminDeleteOAuth2Token // // Delete OAuth2 Access Tokens from a Client // diff --git a/oauth2/handler_test.go b/oauth2/handler_test.go index 0a9c52faef2..11d32b96ecd 100644 --- a/oauth2/handler_test.go +++ b/oauth2/handler_test.go @@ -95,7 +95,7 @@ func TestHandlerDeleteHandler(t *testing.T) { c := hydra.NewAPIClient(hydra.NewConfiguration()) c.GetConfig().Servers = hydra.ServerConfigurations{{URL: ts.URL}} - _, err := c.V1Api.AdminDeleteOAuth2Token(context.Background()).ClientId("foobar").Execute() + _, err := c.V0alpha2Api.AdminDeleteOAuth2Token(context.Background()).ClientId("foobar").Execute() require.NoError(t, err) ds := new(oauth2.Session) diff --git a/oauth2/introspector_test.go b/oauth2/introspector_test.go index 114ba33114a..941e802dbf4 100644 --- a/oauth2/introspector_test.go +++ b/oauth2/introspector_test.go @@ -165,7 +165,7 @@ func TestIntrospectorSDK(t *testing.T) { client.GetConfig().Servers = hydra.ServerConfigurations{{URL: server.URL}} } - ctx, _, err := client.V1Api.AdminIntrospectOAuth2Token(context.Background()). + ctx, _, err := client.V0alpha2Api.AdminIntrospectOAuth2Token(context.Background()). Token(c.token). Scope(strings.Join(c.scopes, " ")). Execute() diff --git a/oauth2/oauth2_auth_code_test.go b/oauth2/oauth2_auth_code_test.go index 904a8a880b2..9a683d552df 100644 --- a/oauth2/oauth2_auth_code_test.go +++ b/oauth2/oauth2_auth_code_test.go @@ -140,7 +140,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { acceptLoginHandler := func(t *testing.T, c *client.Client, subject string, checkRequestPayload func(request *hydra.OAuth2LoginRequest) *hydra.AcceptOAuth2LoginRequest) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - rr, _, err := adminClient.V1Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() + rr, _, err := adminClient.V0alpha2Api.AdminGetOAuth2LoginRequest(context.Background()).LoginChallenge(r.URL.Query().Get("login_challenge")).Execute() require.NoError(t, err) assert.EqualValues(t, c.GetID(), pointerx.StringR(rr.Client.ClientId)) @@ -165,7 +165,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { } } - v, _, err := adminClient.V1Api.AdminAcceptOAuth2LoginRequest(context.Background()). + v, _, err := adminClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(context.Background()). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(acceptBody). Execute() @@ -177,7 +177,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { acceptConsentHandler := func(t *testing.T, c *client.Client, subject string, checkRequestPayload func(*hydra.OAuth2ConsentRequest)) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - rr, _, err := adminClient.V1Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() + rr, _, err := adminClient.V0alpha2Api.AdminGetOAuth2ConsentRequest(context.Background()).ConsentChallenge(r.URL.Query().Get("consent_challenge")).Execute() require.NoError(t, err) assert.EqualValues(t, c.GetID(), pointerx.StringR(rr.Client.ClientId)) @@ -194,7 +194,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { } assert.Equal(t, map[string]interface{}{"context": "bar"}, rr.Context) - v, _, err := adminClient.V1Api.AdminAcceptOAuth2ConsentRequest(context.Background()). + v, _, err := adminClient.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(context.Background()). ConsentChallenge(r.URL.Query().Get("consent_challenge")). AcceptOAuth2ConsentRequest(hydra.AcceptOAuth2ConsentRequest{ GrantScope: []string{"hydra", "offline", "openid"}, Remember: pointerx.Bool(true), RememberFor: pointerx.Int64(0), @@ -366,7 +366,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { t.Run("case=checks if request fails when subject is empty", func(t *testing.T) { testhelpers.NewLoginConsentUI(t, reg.Config(), func(w http.ResponseWriter, r *http.Request) { - _, res, err := adminClient.V1Api.AdminAcceptOAuth2LoginRequest(ctx). + _, res, err := adminClient.V0alpha2Api.AdminAcceptOAuth2LoginRequest(ctx). LoginChallenge(r.URL.Query().Get("login_challenge")). AcceptOAuth2LoginRequest(hydra.AcceptOAuth2LoginRequest{Subject: "", Remember: pointerx.Bool(true)}).Execute() require.Error(t, err) // expects 400 diff --git a/oauth2/revocator_test.go b/oauth2/revocator_test.go index 5816aed9c86..ff02e15fbb4 100644 --- a/oauth2/revocator_test.go +++ b/oauth2/revocator_test.go @@ -142,7 +142,7 @@ func TestRevoke(t *testing.T) { }, } { t.Run(fmt.Sprintf("case=%d", k), func(t *testing.T) { - _, err := client.V1Api.RevokeOAuth2Token( + _, err := client.V0alpha2Api.RevokeOAuth2Token( context.WithValue( context.Background(), hydra.ContextBasicAuth, diff --git a/oauth2/trust/handler.go b/oauth2/trust/handler.go index 95226bd90c4..944301f024d 100644 --- a/oauth2/trust/handler.go +++ b/oauth2/trust/handler.go @@ -76,7 +76,7 @@ type adminTrustOAuth2JwtGrantIssuer struct { Body adminTrustOAuth2JwtGrantIssuerBody } -// swagger:route POST /admin/trust/grants/jwt-bearer/issuers v1 adminTrustOAuth2JwtGrantIssuer +// swagger:route POST /admin/trust/grants/jwt-bearer/issuers v0alpha2 adminTrustOAuth2JwtGrantIssuer // // Trust an OAuth2 JWT Bearer Grant Type Issuer // @@ -139,7 +139,7 @@ type adminGetTrustedOAuth2JwtGrantIssuer struct { ID string `json:"id"` } -// swagger:route GET /admin/trust/grants/jwt-bearer/issuers/{id} v1 adminGetTrustedOAuth2JwtGrantIssuer +// swagger:route GET /admin/trust/grants/jwt-bearer/issuers/{id} v0alpha2 adminGetTrustedOAuth2JwtGrantIssuer // // Get a Trusted OAuth2 JWT Bearer Grant Type Issuer // @@ -177,7 +177,7 @@ type adminDeleteTrustedOAuth2JwtGrantIssuer struct { ID string `json:"id"` } -// swagger:route DELETE /admin/trust/grants/jwt-bearer/issuers/{id} v1 adminDeleteTrustedOAuth2JwtGrantIssuer +// swagger:route DELETE /admin/trust/grants/jwt-bearer/issuers/{id} v0alpha2 adminDeleteTrustedOAuth2JwtGrantIssuer // // Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer // @@ -228,7 +228,7 @@ type adminListTrustedOAuth2JwtGrantIssuers struct { Offset int `json:"offset"` } -// swagger:route GET /admin/trust/grants/jwt-bearer/issuers v1 adminListTrustedOAuth2JwtGrantIssuers +// swagger:route GET /admin/trust/grants/jwt-bearer/issuers v0alpha2 adminListTrustedOAuth2JwtGrantIssuers // // List Trusted OAuth2 JWT Bearer Grant Type Issuers // diff --git a/oauth2/trust/handler_test.go b/oauth2/trust/handler_test.go index d2f058730f0..73976ea4106 100644 --- a/oauth2/trust/handler_test.go +++ b/oauth2/trust/handler_test.go @@ -94,7 +94,7 @@ func (s *HandlerTestSuite) TestGrantCanBeCreatedAndFetched() { model := createRequestParams ctx := context.Background() - createResult, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + createResult, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no errors expected on grant creation") s.NotEmpty(createResult.Id, " grant id expected to be non-empty") s.Equal(model.Issuer, *createResult.Issuer, "issuer must match") @@ -104,7 +104,7 @@ func (s *HandlerTestSuite) TestGrantCanBeCreatedAndFetched() { s.Equal(model.Jwk.Kid, *createResult.PublicKey.Kid, "public key id must match") s.Equal(model.ExpiresAt.Round(time.Second).UTC().String(), createResult.ExpiresAt.Round(time.Second).UTC().String(), "expiration date must match") - getResult, _, err := s.hydraClient.V1Api.AdminGetTrustedOAuth2JwtGrantIssuer(ctx, *createResult.Id).Execute() + getResult, _, err := s.hydraClient.V0alpha2Api.AdminGetTrustedOAuth2JwtGrantIssuer(ctx, *createResult.Id).Execute() s.Require().NoError(err, "no errors expected on grant fetching") s.Equal(*createResult.Id, *getResult.Id, " grant id must match") s.Equal(model.Issuer, *getResult.Issuer, "issuer must match") @@ -125,15 +125,15 @@ func (s *HandlerTestSuite) TestGrantCanNotBeCreatedWithSameIssuerSubjectKey() { ) ctx := context.Background() - _, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no errors expected on grant creation") - _, _, err = s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err = s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().Error(err, "expected error, because grant with same issuer+subject+kid exists") kid := uuid.New().String() createRequestParams.Jwk.Kid = kid - _, _, err = s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err = s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(ctx).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.NoError(err, "no errors expected on grant creation, because kid is now different") } @@ -146,7 +146,7 @@ func (s *HandlerTestSuite) TestGrantCanNotBeCreatedWithSubjectAndAnySubject() { time.Now().Add(time.Hour), ) - _, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().Error(err, "expected error, because a grant with a subject and allow_any_subject cannot be created") } @@ -159,7 +159,7 @@ func (s *HandlerTestSuite) TestGrantCanNotBeCreatedWithMissingFields() { time.Now().Add(time.Hour), ) - _, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().Error(err, "expected error, because grant missing issuer") createRequestParams = s.newCreateJwtBearerGrantParams( @@ -170,7 +170,7 @@ func (s *HandlerTestSuite) TestGrantCanNotBeCreatedWithMissingFields() { time.Now().Add(time.Hour), ) - _, _, err = s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err = s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().Error(err, "expected error, because grant missing subject") createRequestParams = s.newCreateJwtBearerGrantParams( @@ -181,7 +181,7 @@ func (s *HandlerTestSuite) TestGrantCanNotBeCreatedWithMissingFields() { time.Time{}, ) - _, _, err = s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err = s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Error(err, "expected error, because grant missing expiration date") } @@ -194,10 +194,10 @@ func (s *HandlerTestSuite) TestGrantPublicCanBeFetched() { time.Now().Add(time.Hour), ) - _, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no error expected on grant creation") - getResult, _, err := s.hydraClient.V1Api.AdminGetJsonWebKey(context.Background(), createRequestParams.Issuer, createRequestParams.Jwk.Kid).Execute() + getResult, _, err := s.hydraClient.V0alpha2Api.AdminGetJsonWebKey(context.Background(), createRequestParams.Issuer, createRequestParams.Jwk.Kid).Execute() s.Require().NoError(err, "no error expected on fetching public key") s.Equal(createRequestParams.Jwk.Kid, getResult.Keys[0].Kid) @@ -212,7 +212,7 @@ func (s *HandlerTestSuite) TestGrantWithAnySubjectCanBeCreated() { time.Now().Add(time.Hour), ) - grant, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + grant, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no error expected on grant creation") assert.Empty(s.T(), grant.Subject) @@ -235,17 +235,17 @@ func (s *HandlerTestSuite) TestGrantListCanBeFetched() { time.Now().Add(time.Hour), ) - _, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + _, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no errors expected on grant creation") - _, _, err = s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams2).Execute() + _, _, err = s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams2).Execute() s.Require().NoError(err, "no errors expected on grant creation") - getResult, _, err := s.hydraClient.V1Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).Execute() + getResult, _, err := s.hydraClient.V0alpha2Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).Execute() s.Require().NoError(err, "no errors expected on grant list fetching") s.Len(getResult, 2, "expected to get list of 2 grants") - getResult, _, err = s.hydraClient.V1Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).Issuer(createRequestParams2.Issuer).Execute() + getResult, _, err = s.hydraClient.V0alpha2Api.AdminListTrustedOAuth2JwtGrantIssuers(context.Background()).Issuer(createRequestParams2.Issuer).Execute() s.Require().NoError(err, "no errors expected on grant list fetching") s.Len(getResult, 1, "expected to get list of 1 grant, when filtering by issuer") @@ -261,13 +261,13 @@ func (s *HandlerTestSuite) TestGrantCanBeDeleted() { time.Now().Add(time.Hour), ) - createResult, _, err := s.hydraClient.V1Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() + createResult, _, err := s.hydraClient.V0alpha2Api.AdminTrustOAuth2JwtGrantIssuer(context.Background()).AdminTrustOAuth2JwtGrantIssuerBody(createRequestParams).Execute() s.Require().NoError(err, "no errors expected on grant creation") - _, err = s.hydraClient.V1Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), *createResult.Id).Execute() + _, err = s.hydraClient.V0alpha2Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), *createResult.Id).Execute() s.Require().NoError(err, "no errors expected on grant deletion") - _, err = s.hydraClient.V1Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), *createResult.Id).Execute() + _, err = s.hydraClient.V0alpha2Api.AdminDeleteTrustedOAuth2JwtGrantIssuer(context.Background(), *createResult.Id).Execute() s.Error(err, "expected error, because grant has been already deleted") } diff --git a/spec/api.json b/spec/api.json index e74de32179f..65daa27f6eb 100644 --- a/spec/api.json +++ b/spec/api.json @@ -19,6 +19,100 @@ } }, "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, SQL, and Swagger." }, @@ -53,6 +147,52 @@ "nullable": true, "type": "string" }, + "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" + }, "StringSliceJSONFormat": { "items": { "type": "string" @@ -579,6 +719,37 @@ "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" + }, "oAuth2ApiError": { "description": "An API error caused by Ory's OAuth 2.0 APIs.", "properties": { @@ -1329,6 +1500,12 @@ }, "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" @@ -1562,7 +1739,7 @@ }, "summary": "Discover JSON Web Keys", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -1594,7 +1771,7 @@ }, "summary": "OpenID Connect Discovery", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -1659,7 +1836,7 @@ }, "summary": "List OAuth 2.0 Clients", "tags": [ - "v1" + "v0alpha2" ] }, "post": { @@ -1700,7 +1877,7 @@ }, "summary": "Create an OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -1736,7 +1913,7 @@ }, "summary": "Deletes an OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -1777,7 +1954,7 @@ }, "summary": "Get an OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] }, "patch": { @@ -1829,7 +2006,7 @@ }, "summary": "Patch an OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] }, "put": { @@ -1881,7 +2058,7 @@ }, "summary": "Update an OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -1969,7 +2146,7 @@ }, "summary": "Delete a JSON Web Key Set", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -2010,7 +2187,7 @@ }, "summary": "Retrieve a JSON Web Key Set", "tags": [ - "v1" + "v0alpha2" ] }, "post": { @@ -2062,7 +2239,7 @@ }, "summary": "Generate a New JSON Web Key", "tags": [ - "v1" + "v0alpha2" ] }, "put": { @@ -2113,7 +2290,7 @@ }, "summary": "Update a JSON Web Key Set", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2158,7 +2335,7 @@ }, "summary": "Delete a JSON Web Key", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -2208,7 +2385,7 @@ }, "summary": "Fetch a JSON Web Key", "tags": [ - "v1" + "v0alpha2" ] }, "put": { @@ -2268,7 +2445,7 @@ }, "summary": "Update a JSON Web Key", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2320,7 +2497,7 @@ }, "summary": "Get OAuth 2.0 Consent Request Information", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2372,7 +2549,7 @@ }, "summary": "Accept an OAuth 2.0 Consent Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2424,7 +2601,7 @@ }, "summary": "Reject an OAuth 2.0 Consent Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2476,7 +2653,7 @@ }, "summary": "Get an OAuth 2.0 Login Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2528,7 +2705,7 @@ }, "summary": "Accept an OAuth 2.0 Login Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2580,7 +2757,7 @@ }, "summary": "Reject an OAuth 2.0 Login Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2632,7 +2809,7 @@ }, "summary": "Get an OAuth 2.0 Logout Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2674,7 +2851,7 @@ }, "summary": "Accept an OAuth 2.0 Logout Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2724,7 +2901,7 @@ }, "summary": "Reject an OAuth 2.0 Logout Request", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2776,7 +2953,7 @@ }, "summary": "Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -2833,7 +3010,7 @@ }, "summary": "List OAuth 2.0 Consent Sessions of a Subject", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2869,7 +3046,7 @@ }, "summary": "Invalidates All OAuth 2.0 Login Sessions of a Certain User", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2928,7 +3105,7 @@ }, "summary": "Introspect OAuth2 Access or Refresh Tokens", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -2963,7 +3140,7 @@ }, "summary": "Delete OAuth2 Access Tokens from a Client", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3039,7 +3216,7 @@ }, "summary": "List Trusted OAuth2 JWT Bearer Grant Type Issuers", "tags": [ - "v1" + "v0alpha2" ] }, "post": { @@ -3079,7 +3256,7 @@ }, "summary": "Trust an OAuth2 JWT Bearer Grant Type Issuer", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3115,7 +3292,7 @@ }, "summary": "Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -3156,7 +3333,7 @@ }, "summary": "Get a Trusted OAuth2 JWT Bearer Grant Type Issuer", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3260,7 +3437,7 @@ }, "summary": "The OAuth 2.0 Authorize Endpoint", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3303,7 +3480,7 @@ }, "summary": "Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3344,7 +3521,7 @@ ], "summary": "Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "tags": [ - "v1" + "v0alpha2" ] }, "get": { @@ -3390,7 +3567,7 @@ ], "summary": "Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "tags": [ - "v1" + "v0alpha2" ] }, "put": { @@ -3447,7 +3624,7 @@ ], "summary": "Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3501,7 +3678,7 @@ ], "summary": "Revoke an OAuth2 Access or Refresh Token", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3516,7 +3693,7 @@ }, "summary": "OpenID Connect Front- or Back-channel Enabled Logout", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3593,7 +3770,7 @@ ], "summary": "The OAuth 2.0 Token Endpoint", "tags": [ - "v1" + "v0alpha2" ] } }, @@ -3630,7 +3807,7 @@ ], "summary": "OpenID Connect Userinfo", "tags": [ - "v1" + "v0alpha2" ] } }, diff --git a/spec/swagger.json b/spec/swagger.json index 87cb0706e45..c0d8674a454 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -32,7 +32,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Discover JSON Web Keys", "operationId": "discoverJsonWebKeys", @@ -63,7 +63,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "OpenID Connect Discovery", "operationId": "discoverOidcConfiguration", @@ -97,7 +97,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "List OAuth 2.0 Clients", "operationId": "adminListOAuth2Clients", @@ -158,7 +158,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Create an OAuth 2.0 Client", "operationId": "adminCreateOAuth2Client", @@ -202,7 +202,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get an OAuth 2.0 Client", "operationId": "adminGetOAuth2Client", @@ -243,7 +243,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Update an OAuth 2.0 Client", "operationId": "adminUpdateOAuth2Client", @@ -292,7 +292,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Deletes an OAuth 2.0 Client", "operationId": "adminDeleteOAuth2Client", @@ -330,7 +330,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Patch an OAuth 2.0 Client", "operationId": "adminPatchOAuth2Client", @@ -427,7 +427,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Retrieve a JSON Web Key Set", "operationId": "adminGetJsonWebKeySet", @@ -468,7 +468,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Update a JSON Web Key Set", "operationId": "adminUpdateJsonWebKeySet", @@ -516,7 +516,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Generate a New JSON Web Key", "operationId": "adminCreateJsonWebKeySet", @@ -565,7 +565,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Delete a JSON Web Key Set", "operationId": "adminDeleteJsonWebKeySet", @@ -605,7 +605,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Fetch a JSON Web Key", "operationId": "adminGetJsonWebKey", @@ -653,7 +653,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Update a JSON Web Key", "operationId": "adminUpdateJsonWebKey", @@ -708,7 +708,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Delete a JSON Web Key", "operationId": "adminDeleteJsonWebKey", @@ -755,7 +755,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get OAuth 2.0 Consent Request Information", "operationId": "adminGetOAuth2ConsentRequest", @@ -803,7 +803,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Accept an OAuth 2.0 Consent Request", "operationId": "adminAcceptOAuth2ConsentRequest", @@ -852,7 +852,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Reject an OAuth 2.0 Consent Request", "operationId": "adminRejectOAuth2ConsentRequest", @@ -901,7 +901,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get an OAuth 2.0 Login Request", "operationId": "adminGetOAuth2LoginRequest", @@ -949,7 +949,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Accept an OAuth 2.0 Login Request", "operationId": "adminAcceptOAuth2LoginRequest", @@ -998,7 +998,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Reject an OAuth 2.0 Login Request", "operationId": "adminRejectOAuth2LoginRequest", @@ -1044,7 +1044,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get an OAuth 2.0 Logout Request", "operationId": "adminGetOAuth2LogoutRequest", @@ -1089,7 +1089,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Accept an OAuth 2.0 Logout Request", "operationId": "adminAcceptOAuth2LogoutRequest", @@ -1128,7 +1128,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Reject an OAuth 2.0 Logout Request", "operationId": "adminRejectOAuth2LogoutRequest", @@ -1174,7 +1174,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "List OAuth 2.0 Consent Sessions of a Subject", "operationId": "adminListOAuth2SubjectConsentSessions", @@ -1227,7 +1227,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client", "operationId": "adminRevokeOAuth2ConsentSessions", @@ -1279,7 +1279,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Invalidates All OAuth 2.0 Login Sessions of a Certain User", "operationId": "adminRevokeOAuth2LoginSessions", @@ -1319,7 +1319,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Introspect OAuth2 Access or Refresh Tokens", "operationId": "adminIntrospectOAuth2Token", @@ -1365,7 +1365,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Delete OAuth2 Access Tokens from a Client", "operationId": "adminDeleteOAuth2Token", @@ -1404,7 +1404,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "List Trusted OAuth2 JWT Bearer Grant Type Issuers", "operationId": "adminListTrustedOAuth2JwtGrantIssuers", @@ -1470,7 +1470,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Trust an OAuth2 JWT Bearer Grant Type Issuer", "operationId": "adminTrustOAuth2JwtGrantIssuer", @@ -1513,7 +1513,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get a Trusted OAuth2 JWT Bearer Grant Type Issuer", "operationId": "adminGetTrustedOAuth2JwtGrantIssuer", @@ -1554,7 +1554,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer", "operationId": "adminDeleteTrustedOAuth2JwtGrantIssuer", @@ -1645,7 +1645,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "The OAuth 2.0 Authorize Endpoint", "operationId": "performOAuth2AuthorizationFlow", @@ -1676,7 +1676,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "operationId": "dynamicClientRegistrationCreateOAuth2Client", @@ -1725,7 +1725,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "operationId": "dynamicClientRegistrationGetOAuth2Client", @@ -1771,7 +1771,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "operationId": "dynamicClientRegistrationUpdateOAuth2Client", @@ -1822,7 +1822,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol", "operationId": "dynamicClientRegistrationDeleteOAuth2Client", @@ -1867,7 +1867,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "Revoke an OAuth2 Access or Refresh Token", "operationId": "revokeOAuth2Token", @@ -1900,7 +1900,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "OpenID Connect Front- or Back-channel Enabled Logout", "operationId": "performOidcFrontOrBackChannelLogout", @@ -1933,7 +1933,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "The OAuth 2.0 Token Endpoint", "operationId": "performOAuth2TokenFlow", @@ -1997,7 +1997,7 @@ "https" ], "tags": [ - "v1" + "v0alpha2" ], "summary": "OpenID Connect Userinfo", "operationId": "getOidcUserInfo", @@ -2040,6 +2040,100 @@ } }, "definitions": { + "DefaultSession": { + "description": "IDTokenSession is a session container for the id token", + "type": "object", + "properties": { + "expires_at": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "date-time" + } + }, + "headers": { + "$ref": "#/definitions/Headers" + }, + "id_token_claims": { + "$ref": "#/definitions/IDTokenClaims" + }, + "subject": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "Headers": { + "description": "Headers is the jwt headers", + "type": "object", + "properties": { + "extra": { + "type": "object", + "additionalProperties": true + } + } + }, + "IDTokenClaims": { + "description": "IDTokenClaims represent the claims used in open id connect requests", + "type": "object", + "properties": { + "acr": { + "type": "string" + }, + "amr": { + "type": "array", + "items": { + "type": "string" + } + }, + "at_hash": { + "type": "string" + }, + "aud": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth_time": { + "type": "string", + "format": "date-time" + }, + "c_hash": { + "type": "string" + }, + "exp": { + "type": "string", + "format": "date-time" + }, + "ext": { + "type": "object", + "additionalProperties": true + }, + "iat": { + "type": "string", + "format": "date-time" + }, + "iss": { + "type": "string" + }, + "jti": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "rat": { + "type": "string", + "format": "date-time" + }, + "sub": { + "type": "string" + } + } + }, "JSONRawMessage": { "type": "object", "title": "JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger." @@ -2052,6 +2146,52 @@ "type": "string", "title": "NullDuration represents a nullable JSON and SQL compatible time.Duration." }, + "Session": { + "type": "object", + "properties": { + "allowed_top_level_claims": { + "type": "array", + "items": { + "type": "string" + } + }, + "client_id": { + "type": "string" + }, + "consent_challenge": { + "type": "string" + }, + "exclude_not_before_claim": { + "type": "boolean" + }, + "expires_at": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "date-time" + } + }, + "extra": { + "type": "object", + "additionalProperties": true + }, + "headers": { + "$ref": "#/definitions/Headers" + }, + "id_token_claims": { + "$ref": "#/definitions/IDTokenClaims" + }, + "kid": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "StringSliceJSONFormat": { "type": "array", "title": "StringSliceJSONFormat represents []string{} which is encoded to/from JSON for SQL storage.", @@ -2568,6 +2708,37 @@ "format": "date-time", "title": "NullTime implements sql.NullTime functionality." }, + "oAuth2AccessRequest": { + "type": "object", + "title": "Requester is a token endpoint's request context.", + "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.", + "type": "array", + "items": { + "type": "string" + } + }, + "granted_audience": { + "description": "GrantedAudience is the list of audiences granted to the OAuth 2.0 client.", + "type": "array", + "items": { + "type": "string" + } + }, + "granted_scopes": { + "description": "GrantedScopes is the list of scopes granted to the OAuth 2.0 client.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "oAuth2ApiError": { "description": "An API error caused by Ory's OAuth 2.0 APIs.", "type": "object", @@ -3320,6 +3491,12 @@ "type": "string" } }, + "requester": { + "$ref": "#/definitions/oAuth2AccessRequest" + }, + "session": { + "$ref": "#/definitions/Session" + }, "subject": { "description": "Subject is the identifier of the authenticated end-user.", "type": "string" diff --git a/test/conformance/run_test.go b/test/conformance/run_test.go index cc836fa7640..b8822545986 100644 --- a/test/conformance/run_test.go +++ b/test/conformance/run_test.go @@ -274,7 +274,7 @@ func createPlan(t *testing.T, extra url.Values, isParallel bool) { bo := conf.NextBackOff() require.NotEqual(t, backoff.Stop, bo, "%+v", err) - _, _, err = hydra.V1Api.AdminCreateJsonWebKeySet(context.Background(), "hydra.openid.id-token").AdminCreateJsonWebKeySetBody(hydrac.AdminCreateJsonWebKeySetBody{ + _, _, err = hydra.V0alpha2Api.AdminCreateJsonWebKeySet(context.Background(), "hydra.openid.id-token").AdminCreateJsonWebKeySetBody(hydrac.AdminCreateJsonWebKeySetBody{ Alg: "RS256", }).Execute() if err == nil { diff --git a/test/mock-client/main.go b/test/mock-client/main.go index 2778b91f23b..ff214bce092 100644 --- a/test/mock-client/main.go +++ b/test/mock-client/main.go @@ -198,7 +198,7 @@ func checkTokenResponse(token oauth2token) { } } - intro, resp, err := sdk.V1Api.AdminIntrospectOAuth2Token(context.Background()).Token(token.AccessToken).Execute() + intro, resp, err := sdk.V0alpha2Api.AdminIntrospectOAuth2Token(context.Background()).Token(token.AccessToken).Execute() defer resp.Body.Close() if err != nil { log.Fatalf("Unable to introspect OAuth2 token: %s", err) diff --git a/test/mock-lcp/main.go b/test/mock-lcp/main.go index 92752449e84..31cf9552647 100644 --- a/test/mock-lcp/main.go +++ b/test/mock-lcp/main.go @@ -41,7 +41,7 @@ func init() { func login(rw http.ResponseWriter, r *http.Request) { challenge := r.URL.Query().Get("login_challenge") - lr, resp, err := client.V1Api.AdminGetOAuth2LoginRequest(r.Context()).LoginChallenge(challenge).Execute() + lr, resp, err := client.V0alpha2Api.AdminGetOAuth2LoginRequest(r.Context()).LoginChallenge(challenge).Execute() defer resp.Body.Close() if err != nil { log.Fatalf("Unable to fetch clogin request: %s", err) @@ -54,7 +54,7 @@ func login(rw http.ResponseWriter, r *http.Request) { remember = true } - vr, resp, err := client.V1Api.AdminAcceptOAuth2LoginRequest(r.Context()). + vr, resp, err := client.V0alpha2Api.AdminAcceptOAuth2LoginRequest(r.Context()). LoginChallenge(challenge). AcceptOAuth2LoginRequest(hydra.AcceptOAuth2LoginRequest{ Subject: "the-subject", @@ -66,7 +66,7 @@ func login(rw http.ResponseWriter, r *http.Request) { } redirectTo = vr.RedirectTo } else { - vr, resp, err := client.V1Api.AdminRejectOAuth2LoginRequest(r.Context()). + vr, resp, err := client.V0alpha2Api.AdminRejectOAuth2LoginRequest(r.Context()). LoginChallenge(challenge). RejectOAuth2Request(hydra.RejectOAuth2Request{ Error: pointerx.String("invalid_request"), @@ -86,7 +86,7 @@ func login(rw http.ResponseWriter, r *http.Request) { func consent(rw http.ResponseWriter, r *http.Request) { challenge := r.URL.Query().Get("consent_challenge") - o, resp, err := client.V1Api.AdminGetOAuth2ConsentRequest(r.Context()).ConsentChallenge(challenge).Execute() + o, resp, err := client.V0alpha2Api.AdminGetOAuth2ConsentRequest(r.Context()).ConsentChallenge(challenge).Execute() defer resp.Body.Close() if err != nil { log.Fatalf("Unable to fetch consent request: %s", err) @@ -103,7 +103,7 @@ func consent(rw http.ResponseWriter, r *http.Request) { value = "rab" } - v, resp, err := client.V1Api.AdminAcceptOAuth2ConsentRequest(r.Context()). + v, resp, err := client.V0alpha2Api.AdminAcceptOAuth2ConsentRequest(r.Context()). ConsentChallenge(challenge). AcceptOAuth2ConsentRequest(hydra.AcceptOAuth2ConsentRequest{ GrantScope: o.RequestedScope, @@ -119,7 +119,7 @@ func consent(rw http.ResponseWriter, r *http.Request) { } redirectTo = v.RedirectTo } else { - v, resp, err := client.V1Api.AdminRejectOAuth2ConsentRequest(r.Context()). + v, resp, err := client.V0alpha2Api.AdminRejectOAuth2ConsentRequest(r.Context()). ConsentChallenge(challenge). RejectOAuth2Request(hydra.RejectOAuth2Request{Error: pointerx.String("invalid_request")}).Execute() defer resp.Body.Close()