From a8b55ab18d41f1f7850f4e0e8b6b97077d7b69e2 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:29:55 +0000 Subject: [PATCH] chore: regenerate OpenAPI client v2.2.1 --- clients/hydra/dart/.openapi-generator/VERSION | 2 +- clients/hydra/dart/README.md | 9 +- clients/hydra/dart/analysis_options.yaml | 4 +- clients/hydra/dart/doc/JwkApi.md | 14 +- clients/hydra/dart/doc/MetadataApi.md | 6 +- clients/hydra/dart/doc/OAuth2Api.md | 56 +- clients/hydra/dart/doc/OidcApi.md | 25 +- clients/hydra/dart/doc/WellknownApi.md | 2 +- clients/hydra/dart/lib/src/api/jwk_api.dart | 61 +- .../hydra/dart/lib/src/api/metadata_api.dart | 18 +- .../hydra/dart/lib/src/api/o_auth2_api.dart | 202 +- clients/hydra/dart/lib/src/api/oidc_api.dart | 59 +- .../hydra/dart/lib/src/api/wellknown_api.dart | 6 +- .../hydra/dart/lib/src/auth/basic_auth.dart | 2 +- .../hydra/dart/lib/src/auth/bearer_auth.dart | 2 +- clients/hydra/dart/pubspec.yaml | 6 +- clients/hydra/dotnet/.openapi-generator/FILES | 22 +- .../hydra/dotnet/.openapi-generator/VERSION | 2 +- clients/hydra/dotnet/Ory.Hydra.Client.sln | 10 +- clients/hydra/dotnet/README.md | 41 +- clients/hydra/dotnet/api/openapi.yaml | 4621 ++++++ ...e2001.md => HydraGetVersion200Response.md} | 4 +- ...ponse200.md => HydraIsReady200Response.md} | 2 +- ...ponse503.md => HydraIsReady503Response.md} | 2 +- .../dotnet/docs/HydraOAuth2ConsentRequest.md | 2 +- .../dotnet/docs/HydraOAuth2LoginRequest.md | 2 +- .../dotnet/docs/HydraOAuth2LogoutRequest.md | 2 +- clients/hydra/dotnet/docs/HydraVersion.md | 2 +- clients/hydra/dotnet/docs/JwkApi.md | 259 +- clients/hydra/dotnet/docs/MetadataApi.md | 104 +- clients/hydra/dotnet/docs/OAuth2Api.md | 1057 +- clients/hydra/dotnet/docs/OidcApi.md | 264 +- clients/hydra/dotnet/docs/WellknownApi.md | 34 +- .../Ory.Hydra.Client.Test/Api/JwkApiTests.cs | 6 +- .../Api/MetadataApiTests.cs | 6 +- .../Api/OAuth2ApiTests.cs | 48 +- .../Ory.Hydra.Client.Test/Api/OidcApiTests.cs | 4 +- .../Api/WellknownApiTests.cs | 2 +- ...aAcceptOAuth2ConsentRequestSessionTests.cs | 7 +- .../HydraAcceptOAuth2ConsentRequestTests.cs | 12 +- .../HydraAcceptOAuth2LoginRequestTests.cs | 14 +- .../Model/HydraCreateJsonWebKeySetTests.cs | 8 +- ...ateVerifiableCredentialRequestBodyTests.cs | 8 +- .../HydraCredentialSupportedDraft00Tests.cs | 9 +- .../Model/HydraErrorOAuth2Tests.cs | 10 +- .../Model/HydraGenericErrorTests.cs | 13 +- ....cs => HydraGetVersion200ResponseTests.cs} | 34 +- .../Model/HydraHealthNotReadyStatusTests.cs | 6 +- .../Model/HydraHealthStatusTests.cs | 6 +- .../HydraIntrospectedOAuth2TokenTests.cs | 19 +- ...sts.cs => HydraIsReady200ResponseTests.cs} | 28 +- ...sts.cs => HydraIsReady503ResponseTests.cs} | 28 +- .../Model/HydraJsonPatchTests.cs | 9 +- .../Model/HydraJsonWebKeySetTests.cs | 6 +- .../Model/HydraJsonWebKeyTests.cs | 22 +- .../Model/HydraOAuth2ClientTests.cs | 53 +- .../HydraOAuth2ClientTokenLifespansTests.cs | 15 +- ...ConsentRequestOpenIDConnectContextTests.cs | 10 +- .../Model/HydraOAuth2ConsentRequestTests.cs | 24 +- ...HydraOAuth2ConsentSessionExpiresAtTests.cs | 10 +- .../Model/HydraOAuth2ConsentSessionTests.cs | 14 +- .../Model/HydraOAuth2LoginRequestTests.cs | 20 +- .../Model/HydraOAuth2LogoutRequestTests.cs | 17 +- .../Model/HydraOAuth2RedirectToTests.cs | 6 +- .../Model/HydraOAuth2TokenExchangeTests.cs | 11 +- .../Model/HydraOidcConfigurationTests.cs | 36 +- .../Model/HydraOidcUserInfoTests.cs | 24 +- .../Model/HydraPaginationHeadersTests.cs | 7 +- .../Model/HydraPaginationTests.cs | 7 +- .../Model/HydraRFC6749ErrorJsonTests.cs | 10 +- .../Model/HydraRejectOAuth2RequestTests.cs | 10 +- .../Model/HydraTokenPaginationHeadersTests.cs | 7 +- ...raTokenPaginationRequestParametersTests.cs | 7 +- ...ydraTokenPaginationResponseHeadersTests.cs | 7 +- .../Model/HydraTokenPaginationTests.cs | 7 +- .../HydraTrustOAuth2JwtGrantIssuerTests.cs | 11 +- .../HydraTrustedOAuth2JwtGrantIssuerTests.cs | 13 +- ...draTrustedOAuth2JwtGrantJsonWebKeyTests.cs | 7 +- ...erifiableCredentialPrimingResponseTests.cs | 13 +- .../HydraVerifiableCredentialProofTests.cs | 7 +- .../HydraVerifiableCredentialResponseTests.cs | 7 +- .../Model/HydraVersionTests.cs | 12 +- .../Ory.Hydra.Client.Test.csproj | 10 +- .../dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs | 227 +- .../src/Ory.Hydra.Client/Api/MetadataApi.cs | 143 +- .../src/Ory.Hydra.Client/Api/OAuth2Api.cs | 981 +- .../src/Ory.Hydra.Client/Api/OidcApi.cs | 287 +- .../src/Ory.Hydra.Client/Api/WellknownApi.cs | 35 +- .../src/Ory.Hydra.Client/Client/ApiClient.cs | 481 +- .../Ory.Hydra.Client/Client/ApiException.cs | 2 +- .../Ory.Hydra.Client/Client/ApiResponse.cs | 2 +- .../Client/Auth/OAuthAuthenticator.cs | 106 + .../Ory.Hydra.Client/Client/Auth/OAuthFlow.cs | 28 + .../Client/Auth/TokenResponse.cs | 23 + .../Ory.Hydra.Client/Client/ClientUtils.cs | 84 +- .../Ory.Hydra.Client/Client/Configuration.cs | 169 +- .../Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- .../src/Ory.Hydra.Client/Client/HttpMethod.cs | 2 +- .../Ory.Hydra.Client/Client/IApiAccessor.cs | 2 +- .../Client/IAsynchronousClient.cs | 2 +- .../Client/IReadableConfiguration.cs | 53 +- .../Client/ISynchronousClient.cs | 2 +- .../src/Ory.Hydra.Client/Client/Multimap.cs | 2 +- .../Client/OpenAPIDateConverter.cs | 2 +- .../Ory.Hydra.Client/Client/RequestOptions.cs | 19 +- .../Client/RetryConfiguration.cs | 6 +- .../Model/AbstractOpenAPISchema.cs | 2 +- .../Model/HydraAcceptOAuth2ConsentRequest.cs | 105 +- .../HydraAcceptOAuth2ConsentRequestSession.cs | 66 +- .../Model/HydraAcceptOAuth2LoginRequest.cs | 123 +- .../Model/HydraCreateJsonWebKeySet.cs | 90 +- ...raCreateVerifiableCredentialRequestBody.cs | 76 +- .../Model/HydraCredentialSupportedDraft00.cs | 87 +- .../Model/HydraErrorOAuth2.cs | 91 +- .../Model/HydraGenericError.cs | 127 +- .../Model/HydraGetVersion200Response.cs | 92 + .../Model/HydraHealthNotReadyStatus.cs | 58 +- .../Model/HydraHealthStatus.cs | 57 +- .../Model/HydraInlineResponse2001.cs | 143 - .../Model/HydraIntrospectedOAuth2Token.cs | 160 +- ...ponse200.cs => HydraIsReady200Response.cs} | 67 +- ...ponse503.cs => HydraIsReady503Response.cs} | 68 +- .../Ory.Hydra.Client/Model/HydraJsonPatch.cs | 98 +- .../Ory.Hydra.Client/Model/HydraJsonWebKey.cs | 238 +- .../Model/HydraJsonWebKeySet.cs | 58 +- .../Model/HydraOAuth2Client.cs | 593 +- .../Model/HydraOAuth2ClientTokenLifespans.cs | 258 +- .../Model/HydraOAuth2ConsentRequest.cs | 181 +- ...Auth2ConsentRequestOpenIDConnectContext.cs | 96 +- .../Model/HydraOAuth2ConsentSession.cs | 123 +- .../HydraOAuth2ConsentSessionExpiresAt.cs | 93 +- .../Model/HydraOAuth2LoginRequest.cs | 163 +- .../Model/HydraOAuth2LogoutRequest.cs | 110 +- .../Model/HydraOAuth2RedirectTo.cs | 62 +- .../Model/HydraOAuth2TokenExchange.cs | 98 +- .../Model/HydraOidcConfiguration.cs | 359 +- .../Model/HydraOidcUserInfo.cs | 207 +- .../Ory.Hydra.Client/Model/HydraPagination.cs | 70 +- .../Model/HydraPaginationHeaders.cs | 66 +- .../Model/HydraRFC6749ErrorJson.cs | 89 +- .../Model/HydraRejectOAuth2Request.cs | 89 +- .../Model/HydraTokenPagination.cs | 70 +- .../Model/HydraTokenPaginationHeaders.cs | 66 +- .../HydraTokenPaginationRequestParameters.cs | 70 +- .../HydraTokenPaginationResponseHeaders.cs | 62 +- .../Model/HydraTrustOAuth2JwtGrantIssuer.cs | 119 +- .../Model/HydraTrustedOAuth2JwtGrantIssuer.cs | 121 +- .../HydraTrustedOAuth2JwtGrantJsonWebKey.cs | 68 +- ...ydraVerifiableCredentialPrimingResponse.cs | 112 +- .../Model/HydraVerifiableCredentialProof.cs | 66 +- .../HydraVerifiableCredentialResponse.cs | 66 +- .../Ory.Hydra.Client/Model/HydraVersion.cs | 67 +- .../Ory.Hydra.Client/Ory.Hydra.Client.csproj | 19 +- .../hydra/elixir/.openapi-generator/VERSION | 2 +- clients/hydra/elixir/README.md | 2 +- clients/hydra/elixir/lib/ory/api/jwk.ex | 2 +- clients/hydra/elixir/lib/ory/api/metadata.ex | 2 +- clients/hydra/elixir/lib/ory/api/o_auth2.ex | 8 +- clients/hydra/elixir/lib/ory/api/oidc.ex | 2 +- clients/hydra/elixir/lib/ory/api/wellknown.ex | 2 +- clients/hydra/elixir/lib/ory/connection.ex | 4 +- clients/hydra/elixir/lib/ory/deserializer.ex | 2 +- .../model/accept_o_auth2_consent_request.ex | 2 +- .../accept_o_auth2_consent_request_session.ex | 2 +- .../ory/model/accept_o_auth2_login_request.ex | 2 +- .../lib/ory/model/create_json_web_key_set.ex | 2 +- ...eate_verifiable_credential_request_body.ex | 2 +- .../ory/model/credential_supported_draft00.ex | 2 +- .../elixir/lib/ory/model/error_o_auth2.ex | 2 +- .../elixir/lib/ory/model/generic_error.ex | 2 +- .../lib/ory/model/get_version_200_response.ex | 2 +- .../lib/ory/model/health_not_ready_status.ex | 2 +- .../elixir/lib/ory/model/health_status.ex | 2 +- .../ory/model/introspected_o_auth2_token.ex | 2 +- .../lib/ory/model/is_ready_200_response.ex | 2 +- .../lib/ory/model/is_ready_503_response.ex | 2 +- .../hydra/elixir/lib/ory/model/json_patch.ex | 2 +- .../elixir/lib/ory/model/json_web_key.ex | 2 +- .../elixir/lib/ory/model/json_web_key_set.ex | 2 +- .../elixir/lib/ory/model/o_auth2_client.ex | 2 +- .../model/o_auth2_client_token_lifespans.ex | 2 +- .../lib/ory/model/o_auth2_consent_request.ex | 2 +- ...consent_request_open_id_connect_context.ex | 2 +- .../lib/ory/model/o_auth2_consent_session.ex | 2 +- .../o_auth2_consent_session_expires_at.ex | 2 +- .../lib/ory/model/o_auth2_login_request.ex | 2 +- .../lib/ory/model/o_auth2_logout_request.ex | 2 +- .../lib/ory/model/o_auth2_redirect_to.ex | 2 +- .../lib/ory/model/o_auth2_token_exchange.ex | 2 +- .../lib/ory/model/oidc_configuration.ex | 2 +- .../elixir/lib/ory/model/oidc_user_info.ex | 2 +- .../hydra/elixir/lib/ory/model/pagination.ex | 2 +- .../lib/ory/model/pagination_headers.ex | 2 +- .../lib/ory/model/reject_o_auth2_request.ex | 2 +- .../lib/ory/model/rfc6749_error_json.ex | 2 +- .../elixir/lib/ory/model/token_pagination.ex | 2 +- .../lib/ory/model/token_pagination_headers.ex | 2 +- .../token_pagination_request_parameters.ex | 2 +- .../token_pagination_response_headers.ex | 2 +- .../model/trust_o_auth2_jwt_grant_issuer.ex | 2 +- .../model/trusted_o_auth2_jwt_grant_issuer.ex | 2 +- .../trusted_o_auth2_jwt_grant_json_web_key.ex | 2 +- .../verifiable_credential_priming_response.ex | 2 +- .../ory/model/verifiable_credential_proof.ex | 2 +- .../model/verifiable_credential_response.ex | 2 +- clients/hydra/elixir/lib/ory/model/version.ex | 2 +- .../hydra/elixir/lib/ory/request_builder.ex | 2 +- clients/hydra/elixir/mix.exs | 2 +- clients/hydra/elixir/mix.lock | 18 +- clients/hydra/go/.openapi-generator/VERSION | 2 +- clients/hydra/go/README.md | 27 +- clients/hydra/go/api/openapi.yaml | 23 +- clients/hydra/go/api_jwk.go | 2 +- clients/hydra/go/api_metadata.go | 2 +- clients/hydra/go/api_o_auth2.go | 2 +- clients/hydra/go/api_oidc.go | 2 +- clients/hydra/go/api_wellknown.go | 2 +- clients/hydra/go/client.go | 6 +- clients/hydra/go/configuration.go | 2 +- clients/hydra/go/docs/JwkAPI.md | 214 +- clients/hydra/go/docs/MetadataAPI.md | 78 +- clients/hydra/go/docs/OAuth2API.md | 858 +- clients/hydra/go/docs/OidcAPI.md | 222 +- clients/hydra/go/docs/WellknownAPI.md | 26 +- clients/hydra/go/go.mod | 8 +- clients/hydra/go/go.sum | 20 +- .../model_accept_o_auth2_consent_request.go | 10 +- ..._accept_o_auth2_consent_request_session.go | 12 +- .../go/model_accept_o_auth2_login_request.go | 14 +- .../hydra/go/model_create_json_web_key_set.go | 12 +- ...eate_verifiable_credential_request_body.go | 8 +- .../go/model_credential_supported_draft00.go | 8 +- clients/hydra/go/model_error_o_auth2.go | 8 +- clients/hydra/go/model_generic_error.go | 14 +- .../go/model_get_version_200_response.go | 8 +- .../hydra/go/model_health_not_ready_status.go | 8 +- clients/hydra/go/model_health_status.go | 8 +- .../go/model_introspected_o_auth2_token.go | 12 +- .../hydra/go/model_is_ready_200_response.go | 8 +- .../hydra/go/model_is_ready_503_response.go | 8 +- clients/hydra/go/model_json_patch.go | 14 +- clients/hydra/go/model_json_web_key.go | 12 +- clients/hydra/go/model_json_web_key_set.go | 8 +- clients/hydra/go/model_o_auth2_client.go | 12 +- .../model_o_auth2_client_token_lifespans.go | 8 +- .../hydra/go/model_o_auth2_consent_request.go | 14 +- ...consent_request_open_id_connect_context.go | 8 +- .../hydra/go/model_o_auth2_consent_session.go | 10 +- ...odel_o_auth2_consent_session_expires_at.go | 8 +- .../hydra/go/model_o_auth2_login_request.go | 12 +- .../hydra/go/model_o_auth2_logout_request.go | 8 +- clients/hydra/go/model_o_auth2_redirect_to.go | 12 +- .../hydra/go/model_o_auth2_token_exchange.go | 8 +- clients/hydra/go/model_oidc_configuration.go | 12 +- clients/hydra/go/model_oidc_user_info.go | 8 +- clients/hydra/go/model_pagination.go | 8 +- clients/hydra/go/model_pagination_headers.go | 8 +- .../hydra/go/model_reject_o_auth2_request.go | 8 +- clients/hydra/go/model_rfc6749_error_json.go | 8 +- clients/hydra/go/model_token_pagination.go | 8 +- .../go/model_token_pagination_headers.go | 8 +- ...del_token_pagination_request_parameters.go | 8 +- ...model_token_pagination_response_headers.go | 8 +- .../model_trust_o_auth2_jwt_grant_issuer.go | 12 +- .../model_trusted_o_auth2_jwt_grant_issuer.go | 8 +- ..._trusted_o_auth2_jwt_grant_json_web_key.go | 8 +- ..._verifiable_credential_priming_response.go | 8 +- .../go/model_verifiable_credential_proof.go | 8 +- .../model_verifiable_credential_response.go | 8 +- clients/hydra/go/model_version.go | 8 +- clients/hydra/go/response.go | 2 +- clients/hydra/go/utils.go | 4 +- .../hydra/java/.github/workflows/maven.yml | 6 +- clients/hydra/java/.openapi-generator/VERSION | 2 +- clients/hydra/java/README.md | 18 +- clients/hydra/java/api/openapi.yaml | 164 +- clients/hydra/java/build.gradle | 20 +- clients/hydra/java/build.sbt | 12 +- clients/hydra/java/docs/JwkApi.md | 14 +- clients/hydra/java/docs/MetadataApi.md | 6 +- clients/hydra/java/docs/OAuth2Api.md | 56 +- clients/hydra/java/docs/OidcApi.md | 16 +- clients/hydra/java/docs/WellknownApi.md | 2 +- .../java/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 43453 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 +- clients/hydra/java/gradlew | 189 +- clients/hydra/java/gradlew.bat | 37 +- clients/hydra/java/pom.xml | 126 +- .../main/java/sh/ory/hydra/ApiCallback.java | 2 +- .../src/main/java/sh/ory/hydra/ApiClient.java | 108 +- .../main/java/sh/ory/hydra/ApiException.java | 11 +- .../main/java/sh/ory/hydra/ApiResponse.java | 2 +- .../main/java/sh/ory/hydra/Configuration.java | 6 +- .../sh/ory/hydra/GzipRequestInterceptor.java | 2 +- .../java/src/main/java/sh/ory/hydra/JSON.java | 4 +- .../java/src/main/java/sh/ory/hydra/Pair.java | 4 +- .../sh/ory/hydra/ProgressRequestBody.java | 2 +- .../sh/ory/hydra/ProgressResponseBody.java | 2 +- .../sh/ory/hydra/ServerConfiguration.java | 1 + .../java/sh/ory/hydra/ServerVariable.java | 1 + .../main/java/sh/ory/hydra/StringUtil.java | 4 +- .../main/java/sh/ory/hydra/api/JwkApi.java | 3 +- .../java/sh/ory/hydra/api/MetadataApi.java | 3 +- .../main/java/sh/ory/hydra/api/OAuth2Api.java | 3 +- .../main/java/sh/ory/hydra/api/OidcApi.java | 3 +- .../java/sh/ory/hydra/api/WellknownApi.java | 3 +- .../java/sh/ory/hydra/auth/ApiKeyAuth.java | 4 +- .../sh/ory/hydra/auth/Authentication.java | 2 +- .../java/sh/ory/hydra/auth/HttpBasicAuth.java | 4 +- .../sh/ory/hydra/auth/HttpBearerAuth.java | 24 +- .../main/java/sh/ory/hydra/auth/OAuth.java | 4 +- .../java/sh/ory/hydra/auth/OAuthFlow.java | 4 +- .../hydra/model/AbstractOpenApiSchema.java | 9 +- .../model/AcceptOAuth2ConsentRequest.java | 136 +- .../AcceptOAuth2ConsentRequestSession.java | 86 +- .../hydra/model/AcceptOAuth2LoginRequest.java | 150 +- .../ory/hydra/model/CreateJsonWebKeySet.java | 99 +- ...CreateVerifiableCredentialRequestBody.java | 100 +- .../model/CredentialSupportedDraft00.java | 115 +- .../java/sh/ory/hydra/model/ErrorOAuth2.java | 111 +- .../java/sh/ory/hydra/model/GenericError.java | 138 +- .../hydra/model/GetVersion200Response.java | 78 +- .../ory/hydra/model/HealthNotReadyStatus.java | 80 +- .../java/sh/ory/hydra/model/HealthStatus.java | 78 +- .../hydra/model/IntrospectedOAuth2Token.java | 193 +- .../ory/hydra/model/IsReady200Response.java | 78 +- .../ory/hydra/model/IsReady503Response.java | 80 +- .../java/sh/ory/hydra/model/JsonPatch.java | 107 +- .../java/sh/ory/hydra/model/JsonWebKey.java | 214 +- .../sh/ory/hydra/model/JsonWebKeySet.java | 83 +- .../java/sh/ory/hydra/model/OAuth2Client.java | 487 +- .../model/OAuth2ClientTokenLifespans.java | 151 +- .../ory/hydra/model/OAuth2ConsentRequest.java | 194 +- ...th2ConsentRequestOpenIDConnectContext.java | 120 +- .../ory/hydra/model/OAuth2ConsentSession.java | 157 +- .../model/OAuth2ConsentSessionExpiresAt.java | 110 +- .../ory/hydra/model/OAuth2LoginRequest.java | 158 +- .../ory/hydra/model/OAuth2LogoutRequest.java | 120 +- .../sh/ory/hydra/model/OAuth2RedirectTo.java | 83 +- .../ory/hydra/model/OAuth2TokenExchange.java | 119 +- .../sh/ory/hydra/model/OidcConfiguration.java | 374 +- .../java/sh/ory/hydra/model/OidcUserInfo.java | 223 +- .../java/sh/ory/hydra/model/Pagination.java | 86 +- .../sh/ory/hydra/model/PaginationHeaders.java | 86 +- .../sh/ory/hydra/model/RFC6749ErrorJson.java | 110 +- .../ory/hydra/model/RejectOAuth2Request.java | 110 +- .../sh/ory/hydra/model/TokenPagination.java | 86 +- .../hydra/model/TokenPaginationHeaders.java | 86 +- .../TokenPaginationRequestParameters.java | 87 +- .../model/TokenPaginationResponseHeaders.java | 87 +- .../model/TrustOAuth2JwtGrantIssuer.java | 128 +- .../model/TrustedOAuth2JwtGrantIssuer.java | 141 +- .../TrustedOAuth2JwtGrantJsonWebKey.java | 87 +- .../VerifiableCredentialPrimingResponse.java | 134 +- .../model/VerifiableCredentialProof.java | 86 +- .../model/VerifiableCredentialResponse.java | 86 +- .../main/java/sh/ory/hydra/model/Version.java | 78 +- .../java/sh/ory/hydra/api/JwkApiTest.java | 2 +- .../sh/ory/hydra/api/MetadataApiTest.java | 2 +- .../java/sh/ory/hydra/api/OAuth2ApiTest.java | 2 +- .../java/sh/ory/hydra/api/OidcApiTest.java | 2 +- .../sh/ory/hydra/api/WellknownApiTest.java | 2 +- ...AcceptOAuth2ConsentRequestSessionTest.java | 6 +- .../model/AcceptOAuth2ConsentRequestTest.java | 6 +- .../model/AcceptOAuth2LoginRequestTest.java | 6 +- .../hydra/model/CreateJsonWebKeySetTest.java | 6 +- ...teVerifiableCredentialRequestBodyTest.java | 6 +- .../model/CredentialSupportedDraft00Test.java | 6 +- .../sh/ory/hydra/model/ErrorOAuth2Test.java | 6 +- .../sh/ory/hydra/model/GenericErrorTest.java | 6 +- .../model/GetVersion200ResponseTest.java | 6 +- .../hydra/model/HealthNotReadyStatusTest.java | 6 +- .../sh/ory/hydra/model/HealthStatusTest.java | 6 +- .../model/IntrospectedOAuth2TokenTest.java | 6 +- .../hydra/model/IsReady200ResponseTest.java | 6 +- .../hydra/model/IsReady503ResponseTest.java | 6 +- .../sh/ory/hydra/model/JsonPatchTest.java | 6 +- .../sh/ory/hydra/model/JsonWebKeySetTest.java | 6 +- .../sh/ory/hydra/model/JsonWebKeyTest.java | 6 +- .../sh/ory/hydra/model/OAuth2ClientTest.java | 6 +- .../model/OAuth2ClientTokenLifespansTest.java | 6 +- ...onsentRequestOpenIDConnectContextTest.java | 6 +- .../hydra/model/OAuth2ConsentRequestTest.java | 6 +- .../OAuth2ConsentSessionExpiresAtTest.java | 6 +- .../hydra/model/OAuth2ConsentSessionTest.java | 6 +- .../hydra/model/OAuth2LoginRequestTest.java | 6 +- .../hydra/model/OAuth2LogoutRequestTest.java | 6 +- .../ory/hydra/model/OAuth2RedirectToTest.java | 6 +- .../hydra/model/OAuth2TokenExchangeTest.java | 6 +- .../hydra/model/OidcConfigurationTest.java | 6 +- .../sh/ory/hydra/model/OidcUserInfoTest.java | 6 +- .../hydra/model/PaginationHeadersTest.java | 6 +- .../sh/ory/hydra/model/PaginationTest.java | 6 +- .../ory/hydra/model/RFC6749ErrorJsonTest.java | 6 +- .../hydra/model/RejectOAuth2RequestTest.java | 6 +- .../model/TokenPaginationHeadersTest.java | 6 +- .../TokenPaginationRequestParametersTest.java | 6 +- .../TokenPaginationResponseHeadersTest.java | 6 +- .../ory/hydra/model/TokenPaginationTest.java | 6 +- .../model/TrustOAuth2JwtGrantIssuerTest.java | 6 +- .../TrustedOAuth2JwtGrantIssuerTest.java | 6 +- .../TrustedOAuth2JwtGrantJsonWebKeyTest.java | 6 +- ...rifiableCredentialPrimingResponseTest.java | 6 +- .../model/VerifiableCredentialProofTest.java | 6 +- .../VerifiableCredentialResponseTest.java | 6 +- .../java/sh/ory/hydra/model/VersionTest.java | 6 +- clients/hydra/php/.gitignore | 1 + clients/hydra/php/.openapi-generator/FILES | 20 +- clients/hydra/php/.openapi-generator/VERSION | 2 +- clients/hydra/php/.php-cs-fixer.dist.php | 29 + clients/hydra/php/.php_cs | 23 - clients/hydra/php/README.md | 16 +- clients/hydra/php/composer.json | 6 +- clients/hydra/php/composer.lock | 2361 +++- clients/hydra/php/docs/Api/JwkApi.md | 74 +- clients/hydra/php/docs/Api/MetadataApi.md | 20 +- clients/hydra/php/docs/Api/OAuth2Api.md | 276 +- clients/hydra/php/docs/Api/OidcApi.md | 54 +- clients/hydra/php/docs/Api/WellknownApi.md | 8 +- ...sponse2001.md => GetVersion200Response.md} | 2 +- ...neResponse200.md => IsReady200Response.md} | 2 +- ...neResponse503.md => IsReady503Response.md} | 2 +- clients/hydra/php/lib/Api/JwkApi.php | 693 +- clients/hydra/php/lib/Api/MetadataApi.php | 352 +- clients/hydra/php/lib/Api/OAuth2Api.php | 3329 +++-- clients/hydra/php/lib/Api/OidcApi.php | 846 +- clients/hydra/php/lib/Api/WellknownApi.php | 119 +- clients/hydra/php/lib/ApiException.php | 7 +- clients/hydra/php/lib/Configuration.php | 81 +- clients/hydra/php/lib/HeaderSelector.php | 211 +- .../lib/Model/AcceptOAuth2ConsentRequest.php | 152 +- .../AcceptOAuth2ConsentRequestSession.php | 129 +- .../lib/Model/AcceptOAuth2LoginRequest.php | 164 +- .../php/lib/Model/CreateJsonWebKeySet.php | 121 +- .../CreateVerifiableCredentialRequestBody.php | 121 +- .../lib/Model/CredentialSupportedDraft00.php | 127 +- clients/hydra/php/lib/Model/ErrorOAuth2.php | 133 +- clients/hydra/php/lib/Model/GenericError.php | 158 +- ...onse2001.php => GetVersion200Response.php} | 117 +- .../php/lib/Model/HealthNotReadyStatus.php | 109 +- clients/hydra/php/lib/Model/HealthStatus.php | 109 +- .../php/lib/Model/IntrospectedOAuth2Token.php | 187 +- ...Response200.php => IsReady200Response.php} | 117 +- ...Response503.php => IsReady503Response.php} | 117 +- clients/hydra/php/lib/Model/JsonPatch.php | 134 +- clients/hydra/php/lib/Model/JsonWebKey.php | 205 +- clients/hydra/php/lib/Model/JsonWebKeySet.php | 109 +- .../hydra/php/lib/Model/ModelInterface.php | 22 +- clients/hydra/php/lib/Model/OAuth2Client.php | 445 +- .../lib/Model/OAuth2ClientTokenLifespans.php | 203 +- .../php/lib/Model/OAuth2ConsentRequest.php | 188 +- ...uth2ConsentRequestOpenIDConnectContext.php | 133 +- .../php/lib/Model/OAuth2ConsentSession.php | 164 +- .../Model/OAuth2ConsentSessionExpiresAt.php | 133 +- .../php/lib/Model/OAuth2LoginRequest.php | 157 +- .../php/lib/Model/OAuth2LogoutRequest.php | 139 +- .../hydra/php/lib/Model/OAuth2RedirectTo.php | 109 +- .../php/lib/Model/OAuth2TokenExchange.php | 139 +- .../hydra/php/lib/Model/OidcConfiguration.php | 289 +- clients/hydra/php/lib/Model/OidcUserInfo.php | 217 +- clients/hydra/php/lib/Model/Pagination.php | 119 +- .../hydra/php/lib/Model/PaginationHeaders.php | 115 +- .../hydra/php/lib/Model/RFC6749ErrorJson.php | 133 +- .../php/lib/Model/RejectOAuth2Request.php | 133 +- .../hydra/php/lib/Model/TokenPagination.php | 119 +- .../php/lib/Model/TokenPaginationHeaders.php | 115 +- .../TokenPaginationRequestParameters.php | 119 +- .../Model/TokenPaginationResponseHeaders.php | 115 +- .../lib/Model/TrustOAuth2JwtGrantIssuer.php | 139 +- .../lib/Model/TrustedOAuth2JwtGrantIssuer.php | 151 +- .../Model/TrustedOAuth2JwtGrantJsonWebKey.php | 115 +- .../VerifiableCredentialPrimingResponse.php | 151 +- .../lib/Model/VerifiableCredentialProof.php | 115 +- .../Model/VerifiableCredentialResponse.php | 115 +- clients/hydra/php/lib/Model/Version.php | 109 +- clients/hydra/php/lib/ObjectSerializer.php | 244 +- clients/hydra/php/test/Api/JwkApiTest.php | 20 +- .../hydra/php/test/Api/MetadataApiTest.php | 12 +- clients/hydra/php/test/Api/OAuth2ApiTest.php | 62 +- clients/hydra/php/test/Api/OidcApiTest.php | 22 +- .../hydra/php/test/Api/WellknownApiTest.php | 8 +- .../AcceptOAuth2ConsentRequestSessionTest.php | 12 +- .../Model/AcceptOAuth2ConsentRequestTest.php | 22 +- .../Model/AcceptOAuth2LoginRequestTest.php | 26 +- .../test/Model/CreateJsonWebKeySetTest.php | 14 +- ...ateVerifiableCredentialRequestBodyTest.php | 14 +- .../Model/CredentialSupportedDraft00Test.php | 16 +- .../hydra/php/test/Model/ErrorOAuth2Test.php | 18 +- .../hydra/php/test/Model/GenericErrorTest.php | 24 +- ...Test.php => GetVersion200ResponseTest.php} | 22 +- .../test/Model/HealthNotReadyStatusTest.php | 10 +- .../hydra/php/test/Model/HealthStatusTest.php | 10 +- .../Model/IntrospectedOAuth2TokenTest.php | 36 +- ...200Test.php => IsReady200ResponseTest.php} | 22 +- ...503Test.php => IsReady503ResponseTest.php} | 22 +- .../hydra/php/test/Model/JsonPatchTest.php | 16 +- .../php/test/Model/JsonWebKeySetTest.php | 10 +- .../hydra/php/test/Model/JsonWebKeyTest.php | 42 +- .../hydra/php/test/Model/OAuth2ClientTest.php | 104 +- .../Model/OAuth2ClientTokenLifespansTest.php | 28 +- ...ConsentRequestOpenIDConnectContextTest.php | 18 +- .../test/Model/OAuth2ConsentRequestTest.php | 34 +- .../OAuth2ConsentSessionExpiresAtTest.php | 18 +- .../test/Model/OAuth2ConsentSessionTest.php | 26 +- .../php/test/Model/OAuth2LoginRequestTest.php | 26 +- .../test/Model/OAuth2LogoutRequestTest.php | 20 +- .../php/test/Model/OAuth2RedirectToTest.php | 10 +- .../test/Model/OAuth2TokenExchangeTest.php | 20 +- .../php/test/Model/OidcConfigurationTest.php | 70 +- .../hydra/php/test/Model/OidcUserInfoTest.php | 46 +- .../php/test/Model/PaginationHeadersTest.php | 12 +- .../hydra/php/test/Model/PaginationTest.php | 12 +- .../php/test/Model/RFC6749ErrorJsonTest.php | 18 +- .../test/Model/RejectOAuth2RequestTest.php | 18 +- .../test/Model/TokenPaginationHeadersTest.php | 12 +- .../TokenPaginationRequestParametersTest.php | 12 +- .../TokenPaginationResponseHeadersTest.php | 12 +- .../php/test/Model/TokenPaginationTest.php | 12 +- .../Model/TrustOAuth2JwtGrantIssuerTest.php | 20 +- .../Model/TrustedOAuth2JwtGrantIssuerTest.php | 24 +- .../TrustedOAuth2JwtGrantJsonWebKeyTest.php | 12 +- ...erifiableCredentialPrimingResponseTest.php | 24 +- .../Model/VerifiableCredentialProofTest.php | 12 +- .../VerifiableCredentialResponseTest.php | 12 +- clients/hydra/php/test/Model/VersionTest.php | 10 +- .../hydra/python/.github/workflows/python.yml | 38 + clients/hydra/python/.gitlab-ci.yml | 27 +- clients/hydra/python/.openapi-generator/FILES | 110 +- .../hydra/python/.openapi-generator/VERSION | 2 +- clients/hydra/python/README.md | 70 +- .../python/docs/AcceptOAuth2ConsentRequest.md | 25 +- .../docs/AcceptOAuth2ConsentRequestSession.md | 23 +- .../python/docs/AcceptOAuth2LoginRequest.md | 25 +- .../hydra/python/docs/CreateJsonWebKeySet.md | 19 +- .../CreateVerifiableCredentialRequestBody.md | 21 +- .../python/docs/CredentialSupportedDraft00.md | 25 +- clients/hydra/python/docs/ErrorOAuth2.md | 19 +- clients/hydra/python/docs/GenericError.md | 23 +- .../python/docs/GetVersion200Response.md | 19 +- .../hydra/python/docs/HealthNotReadyStatus.md | 21 +- clients/hydra/python/docs/HealthStatus.md | 19 +- .../python/docs/IntrospectedOAuth2Token.md | 23 +- .../hydra/python/docs/IsReady200Response.md | 19 +- .../hydra/python/docs/IsReady503Response.md | 21 +- clients/hydra/python/docs/JsonPatch.md | 23 +- .../hydra/python/docs/JsonPatchDocument.md | 12 - clients/hydra/python/docs/JsonWebKey.md | 27 +- clients/hydra/python/docs/JsonWebKeySet.md | 21 +- clients/hydra/python/docs/JwkApi.md | 246 +- clients/hydra/python/docs/MetadataApi.md | 53 +- clients/hydra/python/docs/NullDuration.md | 11 - clients/hydra/python/docs/OAuth2Api.md | 1075 +- clients/hydra/python/docs/OAuth2Client.md | 61 +- .../python/docs/OAuth2ClientTokenLifespans.md | 39 +- .../hydra/python/docs/OAuth2ConsentRequest.md | 29 +- ...Auth2ConsentRequestOpenIDConnectContext.md | 25 +- .../hydra/python/docs/OAuth2ConsentSession.md | 25 +- .../docs/OAuth2ConsentSessionExpiresAt.md | 19 +- .../python/docs/OAuth2ConsentSessions.md | 12 - .../hydra/python/docs/OAuth2LoginRequest.md | 27 +- .../hydra/python/docs/OAuth2LogoutRequest.md | 19 +- clients/hydra/python/docs/OAuth2RedirectTo.md | 19 +- .../hydra/python/docs/OAuth2TokenExchange.md | 19 +- clients/hydra/python/docs/OidcApi.md | 316 +- .../hydra/python/docs/OidcConfiguration.md | 53 +- clients/hydra/python/docs/OidcUserInfo.md | 19 +- clients/hydra/python/docs/Pagination.md | 23 +- .../hydra/python/docs/PaginationHeaders.md | 19 +- clients/hydra/python/docs/RFC6749ErrorJson.md | 19 +- .../hydra/python/docs/RejectOAuth2Request.md | 19 +- .../python/docs/StringSliceJSONFormat.md | 11 - clients/hydra/python/docs/TokenPagination.md | 23 +- .../python/docs/TokenPaginationHeaders.md | 19 +- .../docs/TokenPaginationRequestParameters.md | 23 +- .../docs/TokenPaginationResponseHeaders.md | 19 +- .../python/docs/TrustOAuth2JwtGrantIssuer.md | 23 +- .../docs/TrustedOAuth2JwtGrantIssuer.md | 21 +- .../docs/TrustedOAuth2JwtGrantIssuers.md | 12 - .../docs/TrustedOAuth2JwtGrantJsonWebKey.md | 19 +- .../VerifiableCredentialPrimingResponse.md | 19 +- .../python/docs/VerifiableCredentialProof.md | 19 +- .../docs/VerifiableCredentialResponse.md | 19 +- clients/hydra/python/docs/Version.md | 19 +- clients/hydra/python/docs/WellknownApi.md | 18 +- .../hydra/python/ory_hydra_client/__init__.py | 74 +- .../python/ory_hydra_client/api/__init__.py | 12 +- .../python/ory_hydra_client/api/jwk_api.py | 2896 ++-- .../ory_hydra_client/api/metadata_api.py | 1079 +- .../ory_hydra_client/api/o_auth2_api.py | 11564 +++++++++++----- .../python/ory_hydra_client/api/oidc_api.py | 3108 +++-- .../ory_hydra_client/api/wellknown_api.py | 382 +- .../python/ory_hydra_client/api_client.py | 1213 +- .../python/ory_hydra_client/api_response.py | 21 + .../python/ory_hydra_client/apis/__init__.py | 21 - .../python/ory_hydra_client/configuration.py | 156 +- .../python/ory_hydra_client/exceptions.py | 105 +- .../python/ory_hydra_client/model/__init__.py | 5 - .../model/accept_o_auth2_consent_request.py | 296 - .../accept_o_auth2_consent_request_session.py | 268 - .../model/accept_o_auth2_login_request.py | 308 - .../model/create_json_web_key_set.py | 282 - ...eate_verifiable_credential_request_body.py | 278 - .../model/credential_supported_draft00.py | 276 - .../ory_hydra_client/model/error_o_auth2.py | 280 - .../ory_hydra_client/model/generic_error.py | 298 - .../model/get_version200_response.py | 264 - .../model/health_not_ready_status.py | 264 - .../ory_hydra_client/model/health_status.py | 264 - .../model/introspected_o_auth2_token.py | 322 - .../model/is_ready200_response.py | 264 - .../model/is_ready503_response.py | 264 - .../ory_hydra_client/model/json_patch.py | 284 - .../model/json_patch_document.py | 292 - .../ory_hydra_client/model/json_web_key.py | 340 - .../model/json_web_key_set.py | 270 - .../ory_hydra_client/model/null_duration.py | 292 - .../ory_hydra_client/model/o_auth2_client.py | 460 - .../model/o_auth2_client_token_lifespans.py | 306 - .../model/o_auth2_consent_request.py | 328 - ...consent_request_open_id_connect_context.py | 280 - .../model/o_auth2_consent_session.py | 308 - .../o_auth2_consent_session_expires_at.py | 280 - .../model/o_auth2_consent_sessions.py | 292 - .../model/o_auth2_login_request.py | 320 - .../model/o_auth2_logout_request.py | 290 - .../model/o_auth2_redirect_to.py | 270 - .../model/o_auth2_token_exchange.py | 284 - .../model/oidc_configuration.py | 412 - .../ory_hydra_client/model/oidc_user_info.py | 336 - .../ory_hydra_client/model/pagination.py | 274 - .../model/pagination_headers.py | 268 - .../model/reject_o_auth2_request.py | 280 - .../model/rfc6749_error_json.py | 280 - .../model/string_slice_json_format.py | 287 - .../model/token_pagination.py | 274 - .../model/token_pagination_headers.py | 268 - .../token_pagination_request_parameters.py | 274 - .../token_pagination_response_headers.py | 268 - .../model/trust_o_auth2_jwt_grant_issuer.py | 302 - .../model/trusted_o_auth2_jwt_grant_issuer.py | 298 - .../trusted_o_auth2_jwt_grant_issuers.py | 292 - .../trusted_o_auth2_jwt_grant_json_web_key.py | 268 - .../verifiable_credential_priming_response.py | 292 - .../model/verifiable_credential_proof.py | 268 - .../model/verifiable_credential_response.py | 268 - .../python/ory_hydra_client/model/version.py | 264 - .../python/ory_hydra_client/model_utils.py | 2059 --- .../ory_hydra_client/models/__init__.py | 115 +- .../models/accept_o_auth2_consent_request.py | 123 + .../accept_o_auth2_consent_request_session.py | 113 + .../models/accept_o_auth2_login_request.py | 122 + .../models/create_json_web_key_set.py | 105 + ...eate_verifiable_credential_request_body.py | 109 + .../models/credential_supported_draft00.py | 107 + .../ory_hydra_client/models/error_o_auth2.py | 109 + .../ory_hydra_client/models/generic_error.py | 120 + .../models/get_version200_response.py | 101 + .../models/health_not_ready_status.py | 101 + .../ory_hydra_client/models/health_status.py | 101 + .../models/introspected_o_auth2_token.py | 127 + .../models/is_ready200_response.py | 101 + .../models/is_ready503_response.py | 101 + .../ory_hydra_client/models/json_patch.py | 112 + .../ory_hydra_client/models/json_web_key.py | 133 + .../models/json_web_key_set.py | 109 + .../ory_hydra_client/models/o_auth2_client.py | 307 + .../models/o_auth2_client_token_lifespans.py | 220 + .../models/o_auth2_consent_request.py | 138 + ...consent_request_open_id_connect_context.py | 109 + .../models/o_auth2_consent_session.py | 135 + .../o_auth2_consent_session_expires_at.py | 110 + .../models/o_auth2_login_request.py | 125 + .../models/o_auth2_logout_request.py | 115 + .../models/o_auth2_redirect_to.py | 101 + .../models/o_auth2_token_exchange.py | 111 + .../models/oidc_configuration.py | 169 + .../ory_hydra_client/models/oidc_user_info.py | 137 + .../ory_hydra_client/models/pagination.py | 104 + .../models/pagination_headers.py | 103 + .../models/reject_o_auth2_request.py | 109 + .../models/rfc6749_error_json.py | 109 + .../models/token_pagination.py | 104 + .../models/token_pagination_headers.py | 103 + .../token_pagination_request_parameters.py | 104 + .../token_pagination_response_headers.py | 103 + .../models/trust_o_auth2_jwt_grant_issuer.py | 116 + .../trusted_o_auth2_jwt_grant_issuer.py | 120 + .../trusted_o_auth2_jwt_grant_json_web_key.py | 103 + .../verifiable_credential_priming_response.py | 115 + .../models/verifiable_credential_proof.py | 103 + .../models/verifiable_credential_response.py | 103 + .../python/ory_hydra_client/models/version.py | 101 + .../hydra/python/ory_hydra_client/py.typed | 0 clients/hydra/python/ory_hydra_client/rest.py | 377 +- clients/hydra/python/pyproject.toml | 71 + clients/hydra/python/requirements.txt | 4 +- clients/hydra/python/setup.py | 31 +- clients/hydra/python/test-requirements.txt | 4 + .../test_accept_o_auth2_consent_request.py | 56 +- ..._accept_o_auth2_consent_request_session.py | 41 +- .../test/test_accept_o_auth2_login_request.py | 53 +- .../test/test_create_json_web_key_set.py | 45 +- ...eate_verifiable_credential_request_body.py | 48 +- .../test/test_credential_supported_draft00.py | 49 +- .../hydra/python/test/test_error_o_auth2.py | 44 +- .../hydra/python/test/test_generic_error.py | 48 +- .../test/test_get_version200_response.py | 40 +- .../test/test_health_not_ready_status.py | 42 +- .../hydra/python/test/test_health_status.py | 40 +- .../test/test_introspected_o_auth2_token.py | 58 +- .../python/test/test_is_ready200_response.py | 40 +- .../python/test/test_is_ready503_response.py | 42 +- clients/hydra/python/test/test_json_patch.py | 45 +- .../python/test/test_json_patch_document.py | 38 - .../hydra/python/test/test_json_web_key.py | 62 +- .../python/test/test_json_web_key_set.py | 63 +- clients/hydra/python/test/test_jwk_api.py | 49 +- .../hydra/python/test/test_metadata_api.py | 33 +- .../hydra/python/test/test_null_duration.py | 36 - clients/hydra/python/test/test_o_auth2_api.py | 133 +- .../hydra/python/test/test_o_auth2_client.py | 107 +- .../test_o_auth2_client_token_lifespans.py | 51 +- .../test/test_o_auth2_consent_request.py | 128 +- ...consent_request_open_id_connect_context.py | 50 +- .../test/test_o_auth2_consent_session.py | 143 +- ...test_o_auth2_consent_session_expires_at.py | 44 +- .../test/test_o_auth2_consent_sessions.py | 38 - .../python/test/test_o_auth2_login_request.py | 178 +- .../test/test_o_auth2_logout_request.py | 99 +- .../python/test/test_o_auth2_redirect_to.py | 41 +- .../test/test_o_auth2_token_exchange.py | 45 +- clients/hydra/python/test/test_oidc_api.py | 53 +- .../python/test/test_oidc_configuration.py | 129 +- .../hydra/python/test/test_oidc_user_info.py | 58 +- clients/hydra/python/test/test_pagination.py | 41 +- .../python/test/test_pagination_headers.py | 41 +- .../test/test_reject_o_auth2_request.py | 44 +- .../python/test/test_rfc6749_error_json.py | 44 +- .../test/test_string_slice_json_format.py | 36 - .../python/test/test_token_pagination.py | 41 +- .../test/test_token_pagination_headers.py | 41 +- ...est_token_pagination_request_parameters.py | 41 +- .../test_token_pagination_response_headers.py | 41 +- .../test_trust_o_auth2_jwt_grant_issuer.py | 89 +- .../test_trusted_o_auth2_jwt_grant_issuer.py | 51 +- .../test_trusted_o_auth2_jwt_grant_issuers.py | 38 - ..._trusted_o_auth2_jwt_grant_json_web_key.py | 41 +- ..._verifiable_credential_priming_response.py | 47 +- .../test/test_verifiable_credential_proof.py | 41 +- .../test_verifiable_credential_response.py | 41 +- clients/hydra/python/test/test_version.py | 40 +- .../hydra/python/test/test_wellknown_api.py | 25 +- clients/hydra/ruby/.gitlab-ci.yml | 2 +- clients/hydra/ruby/.openapi-generator/FILES | 2 - clients/hydra/ruby/.openapi-generator/VERSION | 2 +- clients/hydra/ruby/Gemfile.lock | 26 +- clients/hydra/ruby/README.md | 12 +- clients/hydra/ruby/lib/ory-hydra-client.rb | 4 +- .../ruby/lib/ory-hydra-client/api/jwk_api.rb | 4 +- .../lib/ory-hydra-client/api/metadata_api.rb | 4 +- .../lib/ory-hydra-client/api/o_auth2_api.rb | 4 +- .../ruby/lib/ory-hydra-client/api/oidc_api.rb | 4 +- .../lib/ory-hydra-client/api/wellknown_api.rb | 4 +- .../ruby/lib/ory-hydra-client/api_client.rb | 50 +- .../ruby/lib/ory-hydra-client/api_error.rb | 5 +- .../lib/ory-hydra-client/configuration.rb | 51 +- .../models/accept_o_auth2_consent_request.rb | 35 +- .../accept_o_auth2_consent_request_session.rb | 35 +- .../models/accept_o_auth2_login_request.rb | 37 +- .../models/create_json_web_key_set.rb | 41 +- ...eate_verifiable_credential_request_body.rb | 35 +- .../models/credential_supported_draft00.rb | 35 +- .../ory-hydra-client/models/error_o_auth2.rb | 35 +- .../ory-hydra-client/models/generic_error.rb | 37 +- .../models/get_version200_response.rb | 35 +- .../models/health_not_ready_status.rb | 35 +- .../ory-hydra-client/models/health_status.rb | 35 +- .../models/introspected_o_auth2_token.rb | 37 +- .../models/is_ready200_response.rb | 35 +- .../models/is_ready503_response.rb | 35 +- .../lib/ory-hydra-client/models/json_patch.rb | 39 +- .../ory-hydra-client/models/json_web_key.rb | 43 +- .../models/json_web_key_set.rb | 35 +- .../ory-hydra-client/models/o_auth2_client.rb | 95 +- .../models/o_auth2_client_token_lifespans.rb | 95 +- .../models/o_auth2_consent_request.rb | 37 +- ...consent_request_open_id_connect_context.rb | 35 +- .../models/o_auth2_consent_session.rb | 35 +- .../o_auth2_consent_session_expires_at.rb | 35 +- .../models/o_auth2_login_request.rb | 45 +- .../models/o_auth2_logout_request.rb | 35 +- .../models/o_auth2_redirect_to.rb | 37 +- .../models/o_auth2_token_exchange.rb | 35 +- .../models/oidc_configuration.rb | 53 +- .../ory-hydra-client/models/oidc_user_info.rb | 35 +- .../lib/ory-hydra-client/models/pagination.rb | 47 +- .../models/pagination_headers.rb | 35 +- .../models/reject_o_auth2_request.rb | 35 +- .../models/rfc6749_error_json.rb | 35 +- .../models/token_pagination.rb | 47 +- .../models/token_pagination_headers.rb | 35 +- .../token_pagination_request_parameters.rb | 47 +- .../token_pagination_response_headers.rb | 35 +- .../models/trust_o_auth2_jwt_grant_issuer.rb | 43 +- .../trusted_o_auth2_jwt_grant_issuer.rb | 35 +- .../trusted_o_auth2_jwt_grant_json_web_key.rb | 35 +- .../verifiable_credential_priming_response.rb | 35 +- .../models/verifiable_credential_proof.rb | 35 +- .../models/verifiable_credential_response.rb | 35 +- .../lib/ory-hydra-client/models/version.rb | 35 +- .../ruby/lib/ory-hydra-client/version.rb | 6 +- clients/hydra/ruby/ory-hydra-client.gemspec | 7 +- clients/hydra/ruby/spec/api/jwk_api_spec.rb | 18 +- .../hydra/ruby/spec/api/metadata_api_spec.rb | 10 +- .../hydra/ruby/spec/api/o_auth2_api_spec.rb | 60 +- clients/hydra/ruby/spec/api/oidc_api_spec.rb | 20 +- .../hydra/ruby/spec/api/wellknown_api_spec.rb | 6 +- clients/hydra/ruby/spec/api_client_spec.rb | 226 - clients/hydra/ruby/spec/configuration_spec.rb | 42 - ...pt_o_auth2_consent_request_session_spec.rb | 12 +- .../accept_o_auth2_consent_request_spec.rb | 22 +- .../accept_o_auth2_login_request_spec.rb | 26 +- .../models/create_json_web_key_set_spec.rb | 14 +- ...verifiable_credential_request_body_spec.rb | 14 +- .../credential_supported_draft00_spec.rb | 16 +- .../ruby/spec/models/error_o_auth2_spec.rb | 18 +- .../ruby/spec/models/generic_error_spec.rb | 24 +- .../models/get_version200_response_spec.rb | 10 +- .../models/health_not_ready_status_spec.rb | 10 +- .../ruby/spec/models/health_status_spec.rb | 10 +- .../models/introspected_o_auth2_token_spec.rb | 36 +- .../spec/models/is_ready200_response_spec.rb | 10 +- .../spec/models/is_ready503_response_spec.rb | 10 +- .../hydra/ruby/spec/models/json_patch_spec.rb | 16 +- .../ruby/spec/models/json_web_key_set_spec.rb | 10 +- .../ruby/spec/models/json_web_key_spec.rb | 42 +- .../ruby/spec/models/o_auth2_client_spec.rb | 104 +- .../o_auth2_client_token_lifespans_spec.rb | 28 +- ...nt_request_open_id_connect_context_spec.rb | 18 +- .../models/o_auth2_consent_request_spec.rb | 34 +- ...o_auth2_consent_session_expires_at_spec.rb | 18 +- .../models/o_auth2_consent_session_spec.rb | 26 +- .../spec/models/o_auth2_login_request_spec.rb | 26 +- .../models/o_auth2_logout_request_spec.rb | 20 +- .../spec/models/o_auth2_redirect_to_spec.rb | 10 +- .../models/o_auth2_token_exchange_spec.rb | 20 +- .../spec/models/oidc_configuration_spec.rb | 70 +- .../ruby/spec/models/oidc_user_info_spec.rb | 46 +- .../spec/models/pagination_headers_spec.rb | 12 +- .../hydra/ruby/spec/models/pagination_spec.rb | 12 +- .../models/reject_o_auth2_request_spec.rb | 18 +- .../spec/models/rfc6749_error_json_spec.rb | 18 +- .../models/token_pagination_headers_spec.rb | 12 +- ...oken_pagination_request_parameters_spec.rb | 12 +- .../token_pagination_response_headers_spec.rb | 12 +- .../ruby/spec/models/token_pagination_spec.rb | 12 +- .../trust_o_auth2_jwt_grant_issuer_spec.rb | 20 +- .../trusted_o_auth2_jwt_grant_issuer_spec.rb | 24 +- ...ted_o_auth2_jwt_grant_json_web_key_spec.rb | 12 +- ...fiable_credential_priming_response_spec.rb | 24 +- .../verifiable_credential_proof_spec.rb | 12 +- .../verifiable_credential_response_spec.rb | 12 +- .../hydra/ruby/spec/models/version_spec.rb | 10 +- clients/hydra/ruby/spec/spec_helper.rb | 4 +- clients/hydra/rust/.gitignore | 4 +- clients/hydra/rust/.openapi-generator/VERSION | 2 +- clients/hydra/rust/Cargo.lock | 958 +- clients/hydra/rust/Cargo.toml | 27 +- clients/hydra/rust/README.md | 5 +- .../rust/docs/AcceptOAuth2ConsentRequest.md | 2 +- .../hydra/rust/docs/CreateJsonWebKeySet.md | 2 +- .../CreateVerifiableCredentialRequestBody.md | 2 +- .../hydra/rust/docs/HealthNotReadyStatus.md | 2 +- .../rust/docs/IntrospectedOAuth2Token.md | 2 +- clients/hydra/rust/docs/IsReady503Response.md | 2 +- clients/hydra/rust/docs/JsonWebKey.md | 2 +- clients/hydra/rust/docs/JsonWebKeySet.md | 2 +- clients/hydra/rust/docs/JwkApi.md | 20 +- clients/hydra/rust/docs/MetadataApi.md | 12 +- clients/hydra/rust/docs/OAuth2Api.md | 86 +- .../hydra/rust/docs/OAuth2ConsentRequest.md | 4 +- ...Auth2ConsentRequestOpenIdConnectContext.md | 2 +- .../hydra/rust/docs/OAuth2ConsentSession.md | 6 +- clients/hydra/rust/docs/OAuth2LoginRequest.md | 4 +- .../hydra/rust/docs/OAuth2LogoutRequest.md | 2 +- clients/hydra/rust/docs/OidcApi.md | 24 +- clients/hydra/rust/docs/OidcConfiguration.md | 2 +- .../rust/docs/TrustOAuth2JwtGrantIssuer.md | 2 +- .../rust/docs/TrustedOAuth2JwtGrantIssuer.md | 2 +- clients/hydra/rust/docs/WellknownApi.md | 4 +- clients/hydra/rust/src/apis/configuration.rs | 7 +- clients/hydra/rust/src/apis/jwk_api.rs | 109 +- clients/hydra/rust/src/apis/metadata_api.rs | 59 +- clients/hydra/rust/src/apis/mod.rs | 29 + clients/hydra/rust/src/apis/o_auth2_api.rs | 446 +- clients/hydra/rust/src/apis/oidc_api.rs | 134 +- clients/hydra/rust/src/apis/wellknown_api.rs | 35 +- clients/hydra/rust/src/lib.rs | 4 +- .../models/accept_o_auth2_consent_request.rs | 35 +- .../accept_o_auth2_consent_request_session.rs | 27 +- .../models/accept_o_auth2_login_request.rs | 32 +- .../src/models/create_json_web_key_set.rs | 22 +- ...eate_verifiable_credential_request_body.rs | 23 +- .../models/credential_supported_draft00.rs | 25 +- .../hydra/rust/src/models/error_o_auth2.rs | 27 +- .../hydra/rust/src/models/generic_error.rs | 30 +- .../src/models/get_version_200_response.rs | 17 +- .../src/models/health_not_ready_status.rs | 19 +- .../hydra/rust/src/models/health_status.rs | 17 +- .../src/models/introspected_o_auth2_token.rs | 42 +- .../rust/src/models/is_ready_200_response.rs | 17 +- .../rust/src/models/is_ready_503_response.rs | 19 +- clients/hydra/rust/src/models/json_patch.rs | 24 +- clients/hydra/rust/src/models/json_web_key.rs | 48 +- .../hydra/rust/src/models/json_web_key_set.rs | 21 +- .../hydra/rust/src/models/o_auth2_client.rs | 121 +- .../models/o_auth2_client_token_lifespans.rs | 37 +- .../src/models/o_auth2_consent_request.rs | 44 +- ...consent_request_open_id_connect_context.rs | 27 +- .../src/models/o_auth2_consent_session.rs | 45 +- .../o_auth2_consent_session_expires_at.rs | 25 +- .../rust/src/models/o_auth2_login_request.rs | 34 +- .../rust/src/models/o_auth2_logout_request.rs | 29 +- .../rust/src/models/o_auth2_redirect_to.rs | 14 +- .../rust/src/models/o_auth2_token_exchange.rs | 29 +- .../rust/src/models/oidc_configuration.rs | 76 +- .../hydra/rust/src/models/oidc_user_info.rs | 55 +- clients/hydra/rust/src/models/pagination.rs | 19 +- .../rust/src/models/pagination_headers.rs | 19 +- .../rust/src/models/reject_o_auth2_request.rs | 25 +- .../rust/src/models/rfc6749_error_json.rs | 25 +- .../hydra/rust/src/models/token_pagination.rs | 19 +- .../src/models/token_pagination_headers.rs | 19 +- .../token_pagination_request_parameters.rs | 21 +- .../token_pagination_response_headers.rs | 21 +- .../models/trust_o_auth2_jwt_grant_issuer.rs | 28 +- .../trusted_o_auth2_jwt_grant_issuer.rs | 35 +- .../trusted_o_auth2_jwt_grant_json_web_key.rs | 21 +- .../verifiable_credential_priming_response.rs | 31 +- .../src/models/verifiable_credential_proof.rs | 19 +- .../models/verifiable_credential_response.rs | 19 +- clients/hydra/rust/src/models/version.rs | 17 +- clients/hydra/typescript-fetch/.gitignore | 4 + clients/hydra/typescript-fetch/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../typescript-fetch/.openapi-generator/FILES | 60 + .../.openapi-generator/VERSION | 1 + clients/hydra/typescript-fetch/LICENSE | 201 + clients/hydra/typescript-fetch/README.md | 46 + .../hydra/typescript-fetch/package-lock.json | 30 + clients/hydra/typescript-fetch/package.json | 22 + .../hydra/typescript-fetch/src/apis/JwkApi.ts | 353 + .../typescript-fetch/src/apis/MetadataApi.ts | 126 + .../typescript-fetch/src/apis/OAuth2Api.ts | 1395 ++ .../typescript-fetch/src/apis/OidcApi.ts | 367 + .../typescript-fetch/src/apis/WellknownApi.ts | 61 + .../hydra/typescript-fetch/src/apis/index.ts | 7 + clients/hydra/typescript-fetch/src/index.ts | 5 + .../src/models/AcceptOAuth2ConsentRequest.ts | 117 + .../AcceptOAuth2ConsentRequestSession.ts | 72 + .../src/models/AcceptOAuth2LoginRequest.ts | 150 + .../src/models/CreateJsonWebKeySet.ts | 88 + .../CreateVerifiableCredentialRequestBody.ts | 83 + .../src/models/CredentialSupportedDraft00.ts | 92 + .../src/models/ErrorOAuth2.ts | 96 + .../src/models/GenericError.ts | 127 + .../src/models/GetVersion200Response.ts | 60 + .../src/models/HealthNotReadyStatus.ts | 60 + .../src/models/HealthStatus.ts | 60 + .../src/models/IntrospectedOAuth2Token.ts | 185 + .../src/models/IsReady200Response.ts | 60 + .../src/models/IsReady503Response.ts | 60 + .../typescript-fetch/src/models/JsonPatch.ts | 92 + .../typescript-fetch/src/models/JsonWebKey.ts | 217 + .../src/models/JsonWebKeySet.ts | 73 + .../src/models/OAuth2Client.ts | 537 + .../src/models/OAuth2ClientTokenLifespans.ts | 132 + .../src/models/OAuth2ConsentRequest.ts | 181 + ...Auth2ConsentRequestOpenIDConnectContext.ts | 115 + .../src/models/OAuth2ConsentSession.ts | 149 + .../models/OAuth2ConsentSessionExpiresAt.ts | 92 + .../src/models/OAuth2LoginRequest.ts | 153 + .../src/models/OAuth2LogoutRequest.ts | 108 + .../src/models/OAuth2RedirectTo.ts | 61 + .../src/models/OAuth2TokenExchange.ts | 103 + .../src/models/OidcConfiguration.ts | 395 + .../src/models/OidcUserInfo.ts | 204 + .../typescript-fetch/src/models/Pagination.ts | 74 + .../src/models/PaginationHeaders.ts | 74 + .../src/models/RFC6749ErrorJson.ts | 92 + .../src/models/RejectOAuth2Request.ts | 97 + .../src/models/TokenPagination.ts | 74 + .../src/models/TokenPaginationHeaders.ts | 74 + .../TokenPaginationRequestParameters.ts | 77 + .../models/TokenPaginationResponseHeaders.ts | 84 + .../src/models/TrustOAuth2JwtGrantIssuer.ts | 111 + .../src/models/TrustedOAuth2JwtGrantIssuer.ts | 123 + .../models/TrustedOAuth2JwtGrantJsonWebKey.ts | 68 + .../VerifiableCredentialPrimingResponse.ts | 116 + .../src/models/VerifiableCredentialProof.ts | 68 + .../models/VerifiableCredentialResponse.ts | 68 + .../typescript-fetch/src/models/Version.ts | 60 + .../typescript-fetch/src/models/index.ts | 46 + clients/hydra/typescript-fetch/src/runtime.ts | 426 + .../hydra/typescript-fetch/tsconfig.esm.json | 7 + clients/hydra/typescript-fetch/tsconfig.json | 16 + .../typescript/.openapi-generator/VERSION | 2 +- clients/hydra/typescript/README.md | 9 +- clients/hydra/typescript/api.ts | 284 +- clients/hydra/typescript/base.ts | 2 +- clients/hydra/typescript/common.ts | 2 +- clients/hydra/typescript/configuration.ts | 2 +- clients/hydra/typescript/index.ts | 2 +- clients/hydra/typescript/package-lock.json | 130 +- clients/hydra/typescript/package.json | 8 +- spec/hydra/v2.2.1.json | 2 +- 1017 files changed, 60408 insertions(+), 44900 deletions(-) create mode 100644 clients/hydra/dotnet/api/openapi.yaml rename clients/hydra/dotnet/docs/{HydraInlineResponse2001.md => HydraGetVersion200Response.md} (69%) rename clients/hydra/dotnet/docs/{HydraInlineResponse200.md => HydraIsReady200Response.md} (87%) rename clients/hydra/dotnet/docs/{HydraInlineResponse503.md => HydraIsReady503Response.md} (89%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraInlineResponse2001Tests.cs => HydraGetVersion200ResponseTests.cs} (57%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraInlineResponse200Tests.cs => HydraIsReady200ResponseTests.cs} (65%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraInlineResponse503Tests.cs => HydraIsReady503ResponseTests.cs} (65%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/TokenResponse.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraInlineResponse200.cs => HydraIsReady200Response.cs} (51%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraInlineResponse503.cs => HydraIsReady503Response.cs} (52%) create mode 100644 clients/hydra/php/.php-cs-fixer.dist.php delete mode 100644 clients/hydra/php/.php_cs rename clients/hydra/php/docs/Model/{InlineResponse2001.md => GetVersion200Response.md} (92%) rename clients/hydra/php/docs/Model/{InlineResponse200.md => IsReady200Response.md} (93%) rename clients/hydra/php/docs/Model/{InlineResponse503.md => IsReady503Response.md} (94%) rename clients/hydra/php/lib/Model/{InlineResponse2001.php => GetVersion200Response.php} (66%) rename clients/hydra/php/lib/Model/{InlineResponse200.php => IsReady200Response.php} (66%) rename clients/hydra/php/lib/Model/{InlineResponse503.php => IsReady503Response.php} (67%) rename clients/hydra/php/test/Model/{InlineResponse2001Test.php => GetVersion200ResponseTest.php} (75%) rename clients/hydra/php/test/Model/{InlineResponse200Test.php => IsReady200ResponseTest.php} (75%) rename clients/hydra/php/test/Model/{InlineResponse503Test.php => IsReady503ResponseTest.php} (75%) create mode 100644 clients/hydra/python/.github/workflows/python.yml delete mode 100644 clients/hydra/python/docs/JsonPatchDocument.md delete mode 100644 clients/hydra/python/docs/NullDuration.md delete mode 100644 clients/hydra/python/docs/OAuth2ConsentSessions.md delete mode 100644 clients/hydra/python/docs/StringSliceJSONFormat.md delete mode 100644 clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md create mode 100644 clients/hydra/python/ory_hydra_client/api_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/apis/__init__.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/__init__.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/create_verifiable_credential_request_body.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/credential_supported_draft00.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/error_o_auth2.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/generic_error.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/get_version200_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/health_status.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/is_ready200_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/is_ready503_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/json_patch.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/json_patch_document.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/json_web_key.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/json_web_key_set.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/null_duration.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_client.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/oidc_configuration.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/oidc_user_info.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/pagination.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/pagination_headers.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/rfc6749_error_json.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/verifiable_credential_priming_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/verifiable_credential_proof.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/verifiable_credential_response.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/version.py delete mode 100644 clients/hydra/python/ory_hydra_client/model_utils.py create mode 100644 clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request_session.py create mode 100644 clients/hydra/python/ory_hydra_client/models/accept_o_auth2_login_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/create_json_web_key_set.py create mode 100644 clients/hydra/python/ory_hydra_client/models/create_verifiable_credential_request_body.py create mode 100644 clients/hydra/python/ory_hydra_client/models/credential_supported_draft00.py create mode 100644 clients/hydra/python/ory_hydra_client/models/error_o_auth2.py create mode 100644 clients/hydra/python/ory_hydra_client/models/generic_error.py create mode 100644 clients/hydra/python/ory_hydra_client/models/get_version200_response.py create mode 100644 clients/hydra/python/ory_hydra_client/models/health_not_ready_status.py create mode 100644 clients/hydra/python/ory_hydra_client/models/health_status.py create mode 100644 clients/hydra/python/ory_hydra_client/models/introspected_o_auth2_token.py create mode 100644 clients/hydra/python/ory_hydra_client/models/is_ready200_response.py create mode 100644 clients/hydra/python/ory_hydra_client/models/is_ready503_response.py create mode 100644 clients/hydra/python/ory_hydra_client/models/json_patch.py create mode 100644 clients/hydra/python/ory_hydra_client/models/json_web_key.py create mode 100644 clients/hydra/python/ory_hydra_client/models/json_web_key_set.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_client.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_client_token_lifespans.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request_open_id_connect_context.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session_expires_at.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_login_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_logout_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_redirect_to.py create mode 100644 clients/hydra/python/ory_hydra_client/models/o_auth2_token_exchange.py create mode 100644 clients/hydra/python/ory_hydra_client/models/oidc_configuration.py create mode 100644 clients/hydra/python/ory_hydra_client/models/oidc_user_info.py create mode 100644 clients/hydra/python/ory_hydra_client/models/pagination.py create mode 100644 clients/hydra/python/ory_hydra_client/models/pagination_headers.py create mode 100644 clients/hydra/python/ory_hydra_client/models/reject_o_auth2_request.py create mode 100644 clients/hydra/python/ory_hydra_client/models/rfc6749_error_json.py create mode 100644 clients/hydra/python/ory_hydra_client/models/token_pagination.py create mode 100644 clients/hydra/python/ory_hydra_client/models/token_pagination_headers.py create mode 100644 clients/hydra/python/ory_hydra_client/models/token_pagination_request_parameters.py create mode 100644 clients/hydra/python/ory_hydra_client/models/token_pagination_response_headers.py create mode 100644 clients/hydra/python/ory_hydra_client/models/trust_o_auth2_jwt_grant_issuer.py create mode 100644 clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_issuer.py create mode 100644 clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_json_web_key.py create mode 100644 clients/hydra/python/ory_hydra_client/models/verifiable_credential_priming_response.py create mode 100644 clients/hydra/python/ory_hydra_client/models/verifiable_credential_proof.py create mode 100644 clients/hydra/python/ory_hydra_client/models/verifiable_credential_response.py create mode 100644 clients/hydra/python/ory_hydra_client/models/version.py create mode 100644 clients/hydra/python/ory_hydra_client/py.typed create mode 100644 clients/hydra/python/pyproject.toml delete mode 100644 clients/hydra/python/test/test_json_patch_document.py delete mode 100644 clients/hydra/python/test/test_null_duration.py delete mode 100644 clients/hydra/python/test/test_o_auth2_consent_sessions.py delete mode 100644 clients/hydra/python/test/test_string_slice_json_format.py delete mode 100644 clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py delete mode 100644 clients/hydra/ruby/spec/api_client_spec.rb delete mode 100644 clients/hydra/ruby/spec/configuration_spec.rb create mode 100644 clients/hydra/typescript-fetch/.gitignore create mode 100644 clients/hydra/typescript-fetch/.npmignore create mode 100644 clients/hydra/typescript-fetch/.openapi-generator-ignore create mode 100644 clients/hydra/typescript-fetch/.openapi-generator/FILES create mode 100644 clients/hydra/typescript-fetch/.openapi-generator/VERSION create mode 100644 clients/hydra/typescript-fetch/LICENSE create mode 100644 clients/hydra/typescript-fetch/README.md create mode 100644 clients/hydra/typescript-fetch/package-lock.json create mode 100644 clients/hydra/typescript-fetch/package.json create mode 100644 clients/hydra/typescript-fetch/src/apis/JwkApi.ts create mode 100644 clients/hydra/typescript-fetch/src/apis/MetadataApi.ts create mode 100644 clients/hydra/typescript-fetch/src/apis/OAuth2Api.ts create mode 100644 clients/hydra/typescript-fetch/src/apis/OidcApi.ts create mode 100644 clients/hydra/typescript-fetch/src/apis/WellknownApi.ts create mode 100644 clients/hydra/typescript-fetch/src/apis/index.ts create mode 100644 clients/hydra/typescript-fetch/src/index.ts create mode 100644 clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequest.ts create mode 100644 clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequestSession.ts create mode 100644 clients/hydra/typescript-fetch/src/models/AcceptOAuth2LoginRequest.ts create mode 100644 clients/hydra/typescript-fetch/src/models/CreateJsonWebKeySet.ts create mode 100644 clients/hydra/typescript-fetch/src/models/CreateVerifiableCredentialRequestBody.ts create mode 100644 clients/hydra/typescript-fetch/src/models/CredentialSupportedDraft00.ts create mode 100644 clients/hydra/typescript-fetch/src/models/ErrorOAuth2.ts create mode 100644 clients/hydra/typescript-fetch/src/models/GenericError.ts create mode 100644 clients/hydra/typescript-fetch/src/models/GetVersion200Response.ts create mode 100644 clients/hydra/typescript-fetch/src/models/HealthNotReadyStatus.ts create mode 100644 clients/hydra/typescript-fetch/src/models/HealthStatus.ts create mode 100644 clients/hydra/typescript-fetch/src/models/IntrospectedOAuth2Token.ts create mode 100644 clients/hydra/typescript-fetch/src/models/IsReady200Response.ts create mode 100644 clients/hydra/typescript-fetch/src/models/IsReady503Response.ts create mode 100644 clients/hydra/typescript-fetch/src/models/JsonPatch.ts create mode 100644 clients/hydra/typescript-fetch/src/models/JsonWebKey.ts create mode 100644 clients/hydra/typescript-fetch/src/models/JsonWebKeySet.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2Client.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2ClientTokenLifespans.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequest.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequestOpenIDConnectContext.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2ConsentSession.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2ConsentSessionExpiresAt.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2LoginRequest.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2LogoutRequest.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2RedirectTo.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OAuth2TokenExchange.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OidcConfiguration.ts create mode 100644 clients/hydra/typescript-fetch/src/models/OidcUserInfo.ts create mode 100644 clients/hydra/typescript-fetch/src/models/Pagination.ts create mode 100644 clients/hydra/typescript-fetch/src/models/PaginationHeaders.ts create mode 100644 clients/hydra/typescript-fetch/src/models/RFC6749ErrorJson.ts create mode 100644 clients/hydra/typescript-fetch/src/models/RejectOAuth2Request.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TokenPagination.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TokenPaginationHeaders.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TokenPaginationRequestParameters.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TokenPaginationResponseHeaders.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TrustOAuth2JwtGrantIssuer.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantIssuer.ts create mode 100644 clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantJsonWebKey.ts create mode 100644 clients/hydra/typescript-fetch/src/models/VerifiableCredentialPrimingResponse.ts create mode 100644 clients/hydra/typescript-fetch/src/models/VerifiableCredentialProof.ts create mode 100644 clients/hydra/typescript-fetch/src/models/VerifiableCredentialResponse.ts create mode 100644 clients/hydra/typescript-fetch/src/models/Version.ts create mode 100644 clients/hydra/typescript-fetch/src/models/index.ts create mode 100644 clients/hydra/typescript-fetch/src/runtime.ts create mode 100644 clients/hydra/typescript-fetch/tsconfig.esm.json create mode 100644 clients/hydra/typescript-fetch/tsconfig.json diff --git a/clients/hydra/dart/.openapi-generator/VERSION b/clients/hydra/dart/.openapi-generator/VERSION index cd802a1ec4e..1985849fb58 100644 --- a/clients/hydra/dart/.openapi-generator/VERSION +++ b/clients/hydra/dart/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/dart/README.md b/clients/hydra/dart/README.md index 2fba5564f55..4a2b6ae5b84 100644 --- a/clients/hydra/dart/README.md +++ b/clients/hydra/dart/README.md @@ -4,7 +4,8 @@ Documentation for all of Ory Hydra's APIs. This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v2.2.0 +- API version: v2.2.1 +- Generator version: 7.7.0 - Build package: org.openapitools.codegen.languages.DartDioClientCodegen ## Requirements @@ -18,7 +19,7 @@ This Dart package is automatically generated by the [OpenAPI Generator](https:// To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml ```yaml dependencies: - ory_hydra_client: 2.2.0 + ory_hydra_client: 2.2.1 ``` ### Github @@ -54,7 +55,7 @@ final CreateJsonWebKeySet createJsonWebKeySet = ; // CreateJsonWebKeySet | try { final response = await api.createJsonWebKeySet(set_, createJsonWebKeySet); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling JwkApi->createJsonWebKeySet: $e\n"); } @@ -173,7 +174,7 @@ Authentication schemes defined for the API: ### bearer -- **Type**: HTTP basic authentication +- **Type**: HTTP Bearer Token authentication ### oauth2 diff --git a/clients/hydra/dart/analysis_options.yaml b/clients/hydra/dart/analysis_options.yaml index 139ad7abf55..16a95850087 100644 --- a/clients/hydra/dart/analysis_options.yaml +++ b/clients/hydra/dart/analysis_options.yaml @@ -2,9 +2,7 @@ analyzer: language: strict-inference: true strict-raw-types: true - strong-mode: - implicit-dynamic: false - implicit-casts: false + strict-casts: false exclude: - test/*.dart errors: diff --git a/clients/hydra/dart/doc/JwkApi.md b/clients/hydra/dart/doc/JwkApi.md index 6ba462e1e1d..63e1f3340cf 100644 --- a/clients/hydra/dart/doc/JwkApi.md +++ b/clients/hydra/dart/doc/JwkApi.md @@ -36,7 +36,7 @@ final CreateJsonWebKeySet createJsonWebKeySet = ; // CreateJsonWebKeySet | try { final response = api.createJsonWebKeySet(set_, createJsonWebKeySet); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->createJsonWebKeySet: $e\n'); } ``` @@ -80,7 +80,7 @@ final String kid = kid_example; // String | The JSON Web Key ID (kid) try { api.deleteJsonWebKey(set_, kid); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->deleteJsonWebKey: $e\n'); } ``` @@ -123,7 +123,7 @@ final String set_ = set__example; // String | The JSON Web Key Set try { api.deleteJsonWebKeySet(set_); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->deleteJsonWebKeySet: $e\n'); } ``` @@ -167,7 +167,7 @@ final String kid = kid_example; // String | JSON Web Key ID try { final response = api.getJsonWebKey(set_, kid); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->getJsonWebKey: $e\n'); } ``` @@ -211,7 +211,7 @@ final String set_ = set__example; // String | JSON Web Key Set ID try { final response = api.getJsonWebKeySet(set_); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->getJsonWebKeySet: $e\n'); } ``` @@ -256,7 +256,7 @@ final JsonWebKey jsonWebKey = ; // JsonWebKey | try { final response = api.setJsonWebKey(set_, kid, jsonWebKey); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->setJsonWebKey: $e\n'); } ``` @@ -302,7 +302,7 @@ final JsonWebKeySet jsonWebKeySet = ; // JsonWebKeySet | try { final response = api.setJsonWebKeySet(set_, jsonWebKeySet); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling JwkApi->setJsonWebKeySet: $e\n'); } ``` diff --git a/clients/hydra/dart/doc/MetadataApi.md b/clients/hydra/dart/doc/MetadataApi.md index d7237ff6723..e3f1cb3992b 100644 --- a/clients/hydra/dart/doc/MetadataApi.md +++ b/clients/hydra/dart/doc/MetadataApi.md @@ -30,7 +30,7 @@ final api = OryHydraClient().getMetadataApi(); try { final response = api.getVersion(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling MetadataApi->getVersion: $e\n'); } ``` @@ -69,7 +69,7 @@ final api = OryHydraClient().getMetadataApi(); try { final response = api.isAlive(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling MetadataApi->isAlive: $e\n'); } ``` @@ -108,7 +108,7 @@ final api = OryHydraClient().getMetadataApi(); try { final response = api.isReady(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling MetadataApi->isReady: $e\n'); } ``` diff --git a/clients/hydra/dart/doc/OAuth2Api.md b/clients/hydra/dart/doc/OAuth2Api.md index 9c45f7cb368..79e5a2e48d2 100644 --- a/clients/hydra/dart/doc/OAuth2Api.md +++ b/clients/hydra/dart/doc/OAuth2Api.md @@ -57,7 +57,7 @@ final AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest = ; // AcceptOAuth2C try { final response = api.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->acceptOAuth2ConsentRequest: $e\n'); } ``` @@ -102,7 +102,7 @@ final AcceptOAuth2LoginRequest acceptOAuth2LoginRequest = ; // AcceptOAuth2Login try { final response = api.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->acceptOAuth2LoginRequest: $e\n'); } ``` @@ -146,7 +146,7 @@ final String logoutChallenge = logoutChallenge_example; // String | OAuth 2.0 Lo try { final response = api.acceptOAuth2LogoutRequest(logoutChallenge); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->acceptOAuth2LogoutRequest: $e\n'); } ``` @@ -189,7 +189,7 @@ final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request B try { final response = api.createOAuth2Client(oAuth2Client); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->createOAuth2Client: $e\n'); } ``` @@ -231,7 +231,7 @@ final String id = id_example; // String | The id of the OAuth 2.0 Client. try { api.deleteOAuth2Client(id); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->deleteOAuth2Client: $e\n'); } ``` @@ -273,7 +273,7 @@ final String clientId = clientId_example; // String | OAuth 2.0 Client ID try { api.deleteOAuth2Token(clientId); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->deleteOAuth2Token: $e\n'); } ``` @@ -315,7 +315,7 @@ final String id = id_example; // String | The id of the desired grant try { api.deleteTrustedOAuth2JwtGrantIssuer(id); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->deleteTrustedOAuth2JwtGrantIssuer: $e\n'); } ``` @@ -358,7 +358,7 @@ final String id = id_example; // String | The id of the OAuth 2.0 Client. try { final response = api.getOAuth2Client(id); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->getOAuth2Client: $e\n'); } ``` @@ -401,7 +401,7 @@ final String consentChallenge = consentChallenge_example; // String | OAuth 2.0 try { final response = api.getOAuth2ConsentRequest(consentChallenge); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->getOAuth2ConsentRequest: $e\n'); } ``` @@ -444,7 +444,7 @@ final String loginChallenge = loginChallenge_example; // String | OAuth 2.0 Logi try { final response = api.getOAuth2LoginRequest(loginChallenge); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->getOAuth2LoginRequest: $e\n'); } ``` @@ -487,7 +487,7 @@ final String logoutChallenge = logoutChallenge_example; // String | try { final response = api.getOAuth2LogoutRequest(logoutChallenge); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->getOAuth2LogoutRequest: $e\n'); } ``` @@ -530,7 +530,7 @@ final String id = id_example; // String | The id of the desired grant try { final response = api.getTrustedOAuth2JwtGrantIssuer(id); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->getTrustedOAuth2JwtGrantIssuer: $e\n'); } ``` @@ -574,7 +574,7 @@ final String scope = scope_example; // String | An optional, space separated lis try { final response = api.introspectOAuth2Token(token, scope); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->introspectOAuth2Token: $e\n'); } ``` @@ -621,7 +621,7 @@ final String owner = owner_example; // String | The owner of the clients to filt try { final response = api.listOAuth2Clients(pageSize, pageToken, clientName, owner); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->listOAuth2Clients: $e\n'); } ``` @@ -670,7 +670,7 @@ final String loginSessionId = loginSessionId_example; // String | The login sess try { final response = api.listOAuth2ConsentSessions(subject, pageSize, pageToken, loginSessionId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->listOAuth2ConsentSessions: $e\n'); } ``` @@ -718,7 +718,7 @@ final String issuer = issuer_example; // String | If optional \"issuer\" is supp try { final response = api.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->listTrustedOAuth2JwtGrantIssuers: $e\n'); } ``` @@ -762,7 +762,7 @@ final api = OryHydraClient().getOAuth2Api(); try { final response = api.oAuth2Authorize(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->oAuth2Authorize: $e\n'); } ``` @@ -811,7 +811,7 @@ final String refreshToken = refreshToken_example; // String | try { final response = api.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->oauth2TokenExchange: $e\n'); } ``` @@ -859,7 +859,7 @@ final BuiltList jsonPatch = ; // BuiltList | OAuth 2.0 Cli try { final response = api.patchOAuth2Client(id, jsonPatch); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->patchOAuth2Client: $e\n'); } ``` @@ -904,7 +904,7 @@ final RejectOAuth2Request rejectOAuth2Request = ; // RejectOAuth2Request | try { final response = api.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->rejectOAuth2ConsentRequest: $e\n'); } ``` @@ -949,7 +949,7 @@ final RejectOAuth2Request rejectOAuth2Request = ; // RejectOAuth2Request | try { final response = api.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->rejectOAuth2LoginRequest: $e\n'); } ``` @@ -992,7 +992,7 @@ final String logoutChallenge = logoutChallenge_example; // String | try { api.rejectOAuth2LogoutRequest(logoutChallenge); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->rejectOAuth2LogoutRequest: $e\n'); } ``` @@ -1036,7 +1036,7 @@ final bool all = true; // bool | Revoke All Consent Sessions If set to `true` d try { api.revokeOAuth2ConsentSessions(subject, client, all); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->revokeOAuth2ConsentSessions: $e\n'); } ``` @@ -1081,7 +1081,7 @@ final String sid = sid_example; // String | OAuth 2.0 Subject The subject to re try { api.revokeOAuth2LoginSessions(subject, sid); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->revokeOAuth2LoginSessions: $e\n'); } ``` @@ -1131,7 +1131,7 @@ final String clientSecret = clientSecret_example; // String | try { api.revokeOAuth2Token(token, clientId, clientSecret); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->revokeOAuth2Token: $e\n'); } ``` @@ -1177,7 +1177,7 @@ final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request B try { final response = api.setOAuth2Client(id, oAuth2Client); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->setOAuth2Client: $e\n'); } ``` @@ -1222,7 +1222,7 @@ final OAuth2ClientTokenLifespans oAuth2ClientTokenLifespans = ; // OAuth2ClientT try { final response = api.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->setOAuth2ClientLifespans: $e\n'); } ``` @@ -1266,7 +1266,7 @@ final TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer = ; // TrustOAuth2JwtG try { final response = api.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OAuth2Api->trustOAuth2JwtGrantIssuer: $e\n'); } ``` diff --git a/clients/hydra/dart/doc/OidcApi.md b/clients/hydra/dart/doc/OidcApi.md index b50e37fbadf..17670d73b6b 100644 --- a/clients/hydra/dart/doc/OidcApi.md +++ b/clients/hydra/dart/doc/OidcApi.md @@ -36,7 +36,7 @@ final OAuth2Client oAuth2Client = ; // OAuth2Client | Dynamic Client Registratio try { final response = api.createOidcDynamicClient(oAuth2Client); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->createOidcDynamicClient: $e\n'); } ``` @@ -79,7 +79,7 @@ final CreateVerifiableCredentialRequestBody createVerifiableCredentialRequestBod try { final response = api.createVerifiableCredential(createVerifiableCredentialRequestBody); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->createVerifiableCredential: $e\n'); } ``` @@ -115,16 +115,13 @@ This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) ### Example ```dart import 'package:ory_hydra_client/api.dart'; -// TODO Configure HTTP basic authorization: bearer -//defaultApiClient.getAuthentication('bearer').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearer').password = 'YOUR_PASSWORD'; final api = OryHydraClient().getOidcApi(); final String id = id_example; // String | The id of the OAuth 2.0 Client. try { api.deleteOidcDynamicClient(id); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->deleteOidcDynamicClient: $e\n'); } ``` @@ -166,7 +163,7 @@ final api = OryHydraClient().getOidcApi(); try { final response = api.discoverOidcConfiguration(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->discoverOidcConfiguration: $e\n'); } ``` @@ -199,9 +196,6 @@ This endpoint behaves like the administrative counterpart (`getOAuth2Client`) bu ### Example ```dart import 'package:ory_hydra_client/api.dart'; -// TODO Configure HTTP basic authorization: bearer -//defaultApiClient.getAuthentication('bearer').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearer').password = 'YOUR_PASSWORD'; final api = OryHydraClient().getOidcApi(); final String id = id_example; // String | The id of the OAuth 2.0 Client. @@ -209,7 +203,7 @@ final String id = id_example; // String | The id of the OAuth 2.0 Client. try { final response = api.getOidcDynamicClient(id); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->getOidcDynamicClient: $e\n'); } ``` @@ -253,7 +247,7 @@ final api = OryHydraClient().getOidcApi(); try { final response = api.getOidcUserInfo(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->getOidcUserInfo: $e\n'); } ``` @@ -291,7 +285,7 @@ final api = OryHydraClient().getOidcApi(); try { api.revokeOidcSession(); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->revokeOidcSession: $e\n'); } ``` @@ -324,9 +318,6 @@ This endpoint behaves like the administrative counterpart (`setOAuth2Client`) bu ### Example ```dart import 'package:ory_hydra_client/api.dart'; -// TODO Configure HTTP basic authorization: bearer -//defaultApiClient.getAuthentication('bearer').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearer').password = 'YOUR_PASSWORD'; final api = OryHydraClient().getOidcApi(); final String id = id_example; // String | OAuth 2.0 Client ID @@ -335,7 +326,7 @@ final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request B try { final response = api.setOidcDynamicClient(id, oAuth2Client); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OidcApi->setOidcDynamicClient: $e\n'); } ``` diff --git a/clients/hydra/dart/doc/WellknownApi.md b/clients/hydra/dart/doc/WellknownApi.md index bfe5ca67b1a..4bdc0aa3d2c 100644 --- a/clients/hydra/dart/doc/WellknownApi.md +++ b/clients/hydra/dart/doc/WellknownApi.md @@ -28,7 +28,7 @@ final api = OryHydraClient().getWellknownApi(); try { final response = api.discoverJsonWebKeys(); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WellknownApi->discoverJsonWebKeys: $e\n'); } ``` diff --git a/clients/hydra/dart/lib/src/api/jwk_api.dart b/clients/hydra/dart/lib/src/api/jwk_api.dart index de0a7048c38..0d5198fa2c4 100644 --- a/clients/hydra/dart/lib/src/api/jwk_api.dart +++ b/clients/hydra/dart/lib/src/api/jwk_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/api_util.dart'; import 'package:ory_hydra_client/src/model/create_json_web_key_set.dart'; import 'package:ory_hydra_client/src/model/error_o_auth2.dart'; import 'package:ory_hydra_client/src/model/json_web_key.dart'; @@ -34,7 +35,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKeySet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createJsonWebKeySet({ required String set_, required CreateJsonWebKeySet createJsonWebKeySet, @@ -45,7 +46,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()); final _options = Options( method: r'POST', headers: { @@ -66,12 +67,12 @@ class JwkApi { _bodyData = _serializers.serialize(createJsonWebKeySet, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -96,10 +97,10 @@ class JwkApi { ) as JsonWebKeySet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -131,7 +132,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteJsonWebKey({ required String set_, required String kid, @@ -142,7 +143,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()).replaceAll('{' r'kid' '}', encodeQueryParameter(_serializers, kid, const FullType(String)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -179,7 +180,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteJsonWebKeySet({ required String set_, CancelToken? cancelToken, @@ -189,7 +190,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -227,7 +228,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKeySet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getJsonWebKey({ required String set_, required String kid, @@ -238,7 +239,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()).replaceAll('{' r'kid' '}', encodeQueryParameter(_serializers, kid, const FullType(String)).toString()); final _options = Options( method: r'GET', headers: { @@ -269,10 +270,10 @@ class JwkApi { ) as JsonWebKeySet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -303,7 +304,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKeySet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getJsonWebKeySet({ required String set_, CancelToken? cancelToken, @@ -313,7 +314,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()); final _options = Options( method: r'GET', headers: { @@ -344,10 +345,10 @@ class JwkApi { ) as JsonWebKeySet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -380,7 +381,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKey] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> setJsonWebKey({ required String set_, required String kid, @@ -392,7 +393,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()).replaceAll('{' r'kid' '}', encodeQueryParameter(_serializers, kid, const FullType(String)).toString()); final _options = Options( method: r'PUT', headers: { @@ -413,12 +414,12 @@ class JwkApi { _bodyData = jsonWebKey == null ? null : _serializers.serialize(jsonWebKey, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -443,10 +444,10 @@ class JwkApi { ) as JsonWebKey; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -478,7 +479,7 @@ class JwkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKeySet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> setJsonWebKeySet({ required String set_, JsonWebKeySet? jsonWebKeySet, @@ -489,7 +490,7 @@ class JwkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', encodeQueryParameter(_serializers, set_, const FullType(String)).toString()); final _options = Options( method: r'PUT', headers: { @@ -510,12 +511,12 @@ class JwkApi { _bodyData = jsonWebKeySet == null ? null : _serializers.serialize(jsonWebKeySet, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -540,10 +541,10 @@ class JwkApi { ) as JsonWebKeySet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/clients/hydra/dart/lib/src/api/metadata_api.dart b/clients/hydra/dart/lib/src/api/metadata_api.dart index 8a94ea4f892..4db759f228b 100644 --- a/clients/hydra/dart/lib/src/api/metadata_api.dart +++ b/clients/hydra/dart/lib/src/api/metadata_api.dart @@ -33,7 +33,7 @@ class MetadataApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetVersion200Response] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getVersion({ CancelToken? cancelToken, Map? headers, @@ -73,10 +73,10 @@ class MetadataApi { ) as GetVersion200Response; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -106,7 +106,7 @@ class MetadataApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [HealthStatus] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> isAlive({ CancelToken? cancelToken, Map? headers, @@ -146,10 +146,10 @@ class MetadataApi { ) as HealthStatus; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -179,7 +179,7 @@ class MetadataApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [IsReady200Response] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> isReady({ CancelToken? cancelToken, Map? headers, @@ -219,10 +219,10 @@ class MetadataApi { ) as IsReady200Response; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/clients/hydra/dart/lib/src/api/o_auth2_api.dart b/clients/hydra/dart/lib/src/api/o_auth2_api.dart index 401eaf9df24..eecd3320fd3 100644 --- a/clients/hydra/dart/lib/src/api/o_auth2_api.dart +++ b/clients/hydra/dart/lib/src/api/o_auth2_api.dart @@ -49,7 +49,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2RedirectTo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> acceptOAuth2ConsentRequest({ required String consentChallenge, AcceptOAuth2ConsentRequest? acceptOAuth2ConsentRequest, @@ -85,13 +85,13 @@ class OAuth2Api { _bodyData = acceptOAuth2ConsentRequest == null ? null : _serializers.serialize(acceptOAuth2ConsentRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -117,10 +117,10 @@ class OAuth2Api { ) as OAuth2RedirectTo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -152,7 +152,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2RedirectTo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> acceptOAuth2LoginRequest({ required String loginChallenge, AcceptOAuth2LoginRequest? acceptOAuth2LoginRequest, @@ -188,13 +188,13 @@ class OAuth2Api { _bodyData = acceptOAuth2LoginRequest == null ? null : _serializers.serialize(acceptOAuth2LoginRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -220,10 +220,10 @@ class OAuth2Api { ) as OAuth2RedirectTo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -254,7 +254,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2RedirectTo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> acceptOAuth2LogoutRequest({ required String logoutChallenge, CancelToken? cancelToken, @@ -300,10 +300,10 @@ class OAuth2Api { ) as OAuth2RedirectTo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -334,7 +334,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createOAuth2Client({ required OAuth2Client oAuth2Client, CancelToken? cancelToken, @@ -365,12 +365,12 @@ class OAuth2Api { _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -395,10 +395,10 @@ class OAuth2Api { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -429,7 +429,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteOAuth2Client({ required String id, CancelToken? cancelToken, @@ -439,7 +439,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -476,7 +476,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteOAuth2Token({ required String clientId, CancelToken? cancelToken, @@ -528,7 +528,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteTrustedOAuth2JwtGrantIssuer({ required String id, CancelToken? cancelToken, @@ -538,7 +538,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -575,7 +575,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOAuth2Client({ required String id, CancelToken? cancelToken, @@ -585,7 +585,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'GET', headers: { @@ -616,10 +616,10 @@ class OAuth2Api { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -650,7 +650,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2ConsentRequest] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOAuth2ConsentRequest({ required String consentChallenge, CancelToken? cancelToken, @@ -696,10 +696,10 @@ class OAuth2Api { ) as OAuth2ConsentRequest; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -730,7 +730,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2LoginRequest] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOAuth2LoginRequest({ required String loginChallenge, CancelToken? cancelToken, @@ -776,10 +776,10 @@ class OAuth2Api { ) as OAuth2LoginRequest; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -810,7 +810,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2LogoutRequest] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOAuth2LogoutRequest({ required String logoutChallenge, CancelToken? cancelToken, @@ -856,10 +856,10 @@ class OAuth2Api { ) as OAuth2LogoutRequest; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -890,7 +890,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [TrustedOAuth2JwtGrantIssuer] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getTrustedOAuth2JwtGrantIssuer({ required String id, CancelToken? cancelToken, @@ -900,7 +900,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'GET', headers: { @@ -931,10 +931,10 @@ class OAuth2Api { ) as TrustedOAuth2JwtGrantIssuer; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -966,7 +966,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [IntrospectedOAuth2Token] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> introspectOAuth2Token({ required String token, String? scope, @@ -1000,12 +1000,12 @@ class OAuth2Api { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1030,10 +1030,10 @@ class OAuth2Api { ) as IntrospectedOAuth2Token; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1067,7 +1067,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> listOAuth2Clients({ int? pageSize = 250, String? pageToken = '1', @@ -1119,10 +1119,10 @@ class OAuth2Api { ) as BuiltList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1156,7 +1156,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> listOAuth2ConsentSessions({ required String subject, int? pageSize = 250, @@ -1208,10 +1208,10 @@ class OAuth2Api { ) as BuiltList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1244,7 +1244,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future>> listTrustedOAuth2JwtGrantIssuers({ int? maxItems, int? defaultItems, @@ -1294,10 +1294,10 @@ class OAuth2Api { ) as BuiltList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1327,7 +1327,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ErrorOAuth2] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> oAuth2Authorize({ CancelToken? cancelToken, Map? headers, @@ -1367,10 +1367,10 @@ class OAuth2Api { ) as ErrorOAuth2; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1405,7 +1405,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2TokenExchange] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> oauth2TokenExchange({ required String grantType, String? clientId, @@ -1454,12 +1454,12 @@ class OAuth2Api { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1484,10 +1484,10 @@ class OAuth2Api { ) as OAuth2TokenExchange; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1519,7 +1519,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> patchOAuth2Client({ required String id, required BuiltList jsonPatch, @@ -1530,7 +1530,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'PATCH', headers: { @@ -1551,12 +1551,12 @@ class OAuth2Api { _bodyData = _serializers.serialize(jsonPatch, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1581,10 +1581,10 @@ class OAuth2Api { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1616,7 +1616,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2RedirectTo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> rejectOAuth2ConsentRequest({ required String consentChallenge, RejectOAuth2Request? rejectOAuth2Request, @@ -1652,13 +1652,13 @@ class OAuth2Api { _bodyData = rejectOAuth2Request == null ? null : _serializers.serialize(rejectOAuth2Request, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1684,10 +1684,10 @@ class OAuth2Api { ) as OAuth2RedirectTo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1719,7 +1719,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2RedirectTo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> rejectOAuth2LoginRequest({ required String loginChallenge, RejectOAuth2Request? rejectOAuth2Request, @@ -1755,13 +1755,13 @@ class OAuth2Api { _bodyData = rejectOAuth2Request == null ? null : _serializers.serialize(rejectOAuth2Request, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, queryParameters: _queryParameters, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1787,10 +1787,10 @@ class OAuth2Api { ) as OAuth2RedirectTo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -1821,7 +1821,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> rejectOAuth2LogoutRequest({ required String logoutChallenge, CancelToken? cancelToken, @@ -1875,7 +1875,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> revokeOAuth2ConsentSessions({ required String subject, String? client, @@ -1932,7 +1932,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> revokeOAuth2LoginSessions({ String? subject, String? sid, @@ -1988,7 +1988,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> revokeOAuth2Token({ required String token, String? clientId, @@ -2033,12 +2033,12 @@ class OAuth2Api { }; } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2070,7 +2070,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> setOAuth2Client({ required String id, required OAuth2Client oAuth2Client, @@ -2081,7 +2081,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'PUT', headers: { @@ -2102,12 +2102,12 @@ class OAuth2Api { _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2132,10 +2132,10 @@ class OAuth2Api { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2167,7 +2167,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> setOAuth2ClientLifespans({ required String id, OAuth2ClientTokenLifespans? oAuth2ClientTokenLifespans, @@ -2178,7 +2178,7 @@ class OAuth2Api { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/admin/clients/{id}/lifespans'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/admin/clients/{id}/lifespans'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'PUT', headers: { @@ -2199,12 +2199,12 @@ class OAuth2Api { _bodyData = oAuth2ClientTokenLifespans == null ? null : _serializers.serialize(oAuth2ClientTokenLifespans, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2229,10 +2229,10 @@ class OAuth2Api { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2263,7 +2263,7 @@ class OAuth2Api { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [TrustedOAuth2JwtGrantIssuer] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> trustOAuth2JwtGrantIssuer({ TrustOAuth2JwtGrantIssuer? trustOAuth2JwtGrantIssuer, CancelToken? cancelToken, @@ -2294,12 +2294,12 @@ class OAuth2Api { _bodyData = trustOAuth2JwtGrantIssuer == null ? null : _serializers.serialize(trustOAuth2JwtGrantIssuer, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -2324,10 +2324,10 @@ class OAuth2Api { ) as TrustedOAuth2JwtGrantIssuer; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/clients/hydra/dart/lib/src/api/oidc_api.dart b/clients/hydra/dart/lib/src/api/oidc_api.dart index 966046006a1..4d1820e4375 100644 --- a/clients/hydra/dart/lib/src/api/oidc_api.dart +++ b/clients/hydra/dart/lib/src/api/oidc_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/api_util.dart'; import 'package:ory_hydra_client/src/model/create_verifiable_credential_request_body.dart'; import 'package:ory_hydra_client/src/model/error_o_auth2.dart'; import 'package:ory_hydra_client/src/model/generic_error.dart'; @@ -37,7 +38,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createOidcDynamicClient({ required OAuth2Client oAuth2Client, CancelToken? cancelToken, @@ -68,12 +69,12 @@ class OidcApi { _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -98,10 +99,10 @@ class OidcApi { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -132,7 +133,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [VerifiableCredentialResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createVerifiableCredential({ CreateVerifiableCredentialRequestBody? createVerifiableCredentialRequestBody, CancelToken? cancelToken, @@ -163,12 +164,12 @@ class OidcApi { _bodyData = createVerifiableCredentialRequestBody == null ? null : _serializers.serialize(createVerifiableCredentialRequestBody, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -193,10 +194,10 @@ class OidcApi { ) as VerifiableCredentialResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -227,7 +228,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteOidcDynamicClient({ required String id, CancelToken? cancelToken, @@ -237,7 +238,7 @@ class OidcApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -279,7 +280,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OidcConfiguration] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> discoverOidcConfiguration({ CancelToken? cancelToken, Map? headers, @@ -319,10 +320,10 @@ class OidcApi { ) as OidcConfiguration; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -353,7 +354,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOidcDynamicClient({ required String id, CancelToken? cancelToken, @@ -363,7 +364,7 @@ class OidcApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'GET', headers: { @@ -400,10 +401,10 @@ class OidcApi { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -433,7 +434,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OidcUserInfo] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOidcUserInfo({ CancelToken? cancelToken, Map? headers, @@ -478,10 +479,10 @@ class OidcApi { ) as OidcUserInfo; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -511,7 +512,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> revokeOidcSession({ CancelToken? cancelToken, Map? headers, @@ -558,7 +559,7 @@ class OidcApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OAuth2Client] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> setOidcDynamicClient({ required String id, required OAuth2Client oAuth2Client, @@ -569,7 +570,7 @@ class OidcApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); final _options = Options( method: r'PUT', headers: { @@ -596,12 +597,12 @@ class OidcApi { _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -626,10 +627,10 @@ class OidcApi { ) as OAuth2Client; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/clients/hydra/dart/lib/src/api/wellknown_api.dart b/clients/hydra/dart/lib/src/api/wellknown_api.dart index b887c4037a9..3a9722bbaf7 100644 --- a/clients/hydra/dart/lib/src/api/wellknown_api.dart +++ b/clients/hydra/dart/lib/src/api/wellknown_api.dart @@ -30,7 +30,7 @@ class WellknownApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonWebKeySet] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> discoverJsonWebKeys({ CancelToken? cancelToken, Map? headers, @@ -70,10 +70,10 @@ class WellknownApi { ) as JsonWebKeySet; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/clients/hydra/dart/lib/src/auth/basic_auth.dart b/clients/hydra/dart/lib/src/auth/basic_auth.dart index aaffd0403c3..5e776b736ad 100644 --- a/clients/hydra/dart/lib/src/auth/basic_auth.dart +++ b/clients/hydra/dart/lib/src/auth/basic_auth.dart @@ -22,7 +22,7 @@ class BasicAuthInterceptor extends AuthInterceptor { RequestOptions options, RequestInterceptorHandler handler, ) { - final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic'); + final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme']?.toLowerCase() == 'basic') || secure['type'] == 'basic'); for (final info in metadataAuthInfo) { final authName = info['name'] as String; final basicAuthInfo = authInfo[authName]; diff --git a/clients/hydra/dart/lib/src/auth/bearer_auth.dart b/clients/hydra/dart/lib/src/auth/bearer_auth.dart index 5940210cf8b..4c115d73124 100644 --- a/clients/hydra/dart/lib/src/auth/bearer_auth.dart +++ b/clients/hydra/dart/lib/src/auth/bearer_auth.dart @@ -13,7 +13,7 @@ class BearerAuthInterceptor extends AuthInterceptor { RequestOptions options, RequestInterceptorHandler handler, ) { - final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer'); + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme']?.toLowerCase() == 'bearer'); for (final info in authInfo) { final token = tokens[info['name']]; if (token != null) { diff --git a/clients/hydra/dart/pubspec.yaml b/clients/hydra/dart/pubspec.yaml index aa757968940..cc3a7f0ffc0 100644 --- a/clients/hydra/dart/pubspec.yaml +++ b/clients/hydra/dart/pubspec.yaml @@ -1,14 +1,14 @@ name: ory_hydra_client -version: 2.2.0 +version: 2.2.1 description: OpenAPI API client for Ory Hydra, Ory's open source OpenID Connect and OAuth provider. homepage: https://www.ory.sh repository: https://github.com/ory/sdk/tree/master/clients/hydra/dart environment: - sdk: '>=2.15.0 <3.0.0' + sdk: '>=2.15.0 <4.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' diff --git a/clients/hydra/dotnet/.openapi-generator/FILES b/clients/hydra/dotnet/.openapi-generator/FILES index 78434abefb2..6aef3576203 100644 --- a/clients/hydra/dotnet/.openapi-generator/FILES +++ b/clients/hydra/dotnet/.openapi-generator/FILES @@ -2,6 +2,7 @@ .openapi-generator-ignore Ory.Hydra.Client.sln README.md +api/openapi.yaml appveyor.yml docs/HydraAcceptOAuth2ConsentRequest.md docs/HydraAcceptOAuth2ConsentRequestSession.md @@ -11,12 +12,12 @@ docs/HydraCreateVerifiableCredentialRequestBody.md docs/HydraCredentialSupportedDraft00.md docs/HydraErrorOAuth2.md docs/HydraGenericError.md +docs/HydraGetVersion200Response.md docs/HydraHealthNotReadyStatus.md docs/HydraHealthStatus.md -docs/HydraInlineResponse200.md -docs/HydraInlineResponse2001.md -docs/HydraInlineResponse503.md docs/HydraIntrospectedOAuth2Token.md +docs/HydraIsReady200Response.md +docs/HydraIsReady503Response.md docs/HydraJsonPatch.md docs/HydraJsonWebKey.md docs/HydraJsonWebKeySet.md @@ -66,12 +67,12 @@ src/Ory.Hydra.Client.Test/Model/HydraCreateVerifiableCredentialRequestBodyTests. src/Ory.Hydra.Client.Test/Model/HydraCredentialSupportedDraft00Tests.cs src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs +src/Ory.Hydra.Client.Test/Model/HydraGetVersion200ResponseTests.cs src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs -src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs -src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs -src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs +src/Ory.Hydra.Client.Test/Model/HydraIsReady200ResponseTests.cs +src/Ory.Hydra.Client.Test/Model/HydraIsReady503ResponseTests.cs src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs @@ -111,6 +112,9 @@ src/Ory.Hydra.Client/Api/WellknownApi.cs src/Ory.Hydra.Client/Client/ApiClient.cs src/Ory.Hydra.Client/Client/ApiException.cs src/Ory.Hydra.Client/Client/ApiResponse.cs +src/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs +src/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs +src/Ory.Hydra.Client/Client/Auth/TokenResponse.cs src/Ory.Hydra.Client/Client/ClientUtils.cs src/Ory.Hydra.Client/Client/Configuration.cs src/Ory.Hydra.Client/Client/ExceptionFactory.cs @@ -133,12 +137,12 @@ src/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs src/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs src/Ory.Hydra.Client/Model/HydraGenericError.cs +src/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs src/Ory.Hydra.Client/Model/HydraHealthStatus.cs -src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs -src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs -src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs +src/Ory.Hydra.Client/Model/HydraIsReady200Response.cs +src/Ory.Hydra.Client/Model/HydraIsReady503Response.cs src/Ory.Hydra.Client/Model/HydraJsonPatch.cs src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs diff --git a/clients/hydra/dotnet/.openapi-generator/VERSION b/clients/hydra/dotnet/.openapi-generator/VERSION index 1e20ec35c64..1985849fb58 100644 --- a/clients/hydra/dotnet/.openapi-generator/VERSION +++ b/clients/hydra/dotnet/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/dotnet/Ory.Hydra.Client.sln b/clients/hydra/dotnet/Ory.Hydra.Client.sln index 42fdf94723f..ab39d6d4610 100644 --- a/clients/hydra/dotnet/Ory.Hydra.Client.sln +++ b/clients/hydra/dotnet/Ory.Hydra.Client.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Hydra.Client", "src\Ory.Hydra.Client\Ory.Hydra.Client.csproj", "{F1D5C4AB-ABA4-4D6F-9D91-6A1D8FD9C804}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Hydra.Client", "src\Ory.Hydra.Client\Ory.Hydra.Client.csproj", "{B2DD730A-29AB-45DE-9C94-E3CB52A900BD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Hydra.Client.Test", "src\Ory.Hydra.Client.Test\Ory.Hydra.Client.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F1D5C4AB-ABA4-4D6F-9D91-6A1D8FD9C804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F1D5C4AB-ABA4-4D6F-9D91-6A1D8FD9C804}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F1D5C4AB-ABA4-4D6F-9D91-6A1D8FD9C804}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F1D5C4AB-ABA4-4D6F-9D91-6A1D8FD9C804}.Release|Any CPU.Build.0 = Release|Any CPU + {B2DD730A-29AB-45DE-9C94-E3CB52A900BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2DD730A-29AB-45DE-9C94-E3CB52A900BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2DD730A-29AB-45DE-9C94-E3CB52A900BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2DD730A-29AB-45DE-9C94-E3CB52A900BD}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/clients/hydra/dotnet/README.md b/clients/hydra/dotnet/README.md index 9788a2d85c3..d7193cd5432 100644 --- a/clients/hydra/dotnet/README.md +++ b/clients/hydra/dotnet/README.md @@ -5,19 +5,20 @@ Documentation for all of Ory Hydra's APIs. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v2.2.0 -- SDK version: 2.2.0 -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen +- API version: v2.2.1 +- SDK version: 2.2.1 +- Generator version: 7.7.0 +- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit [https://www.ory.sh](https://www.ory.sh) - + ## Frameworks supported - + ## Dependencies - [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later @@ -32,7 +33,7 @@ Install-Package System.ComponentModel.Annotations NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). - + ## Installation Run the following command to generate the DLL - [Mac/Linux] `/bin/sh build.sh` @@ -44,7 +45,7 @@ using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Client; using Ory.Hydra.Client.Model; ``` - + ## Packaging A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. @@ -57,7 +58,7 @@ nuget pack -Build -OutputDirectory out Ory.Hydra.Client.csproj Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - + ## Usage To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` @@ -68,7 +69,7 @@ webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; c.Proxy = webProxy; ``` - + ## Getting Started ```csharp @@ -109,7 +110,7 @@ namespace Example } ``` - + ## Documentation for API Endpoints All URIs are relative to *http://localhost* @@ -165,7 +166,7 @@ Class | Method | HTTP request | Description *WellknownApi* | [**DiscoverJsonWebKeys**](docs/WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys - + ## Documentation for Models - [Model.HydraAcceptOAuth2ConsentRequest](docs/HydraAcceptOAuth2ConsentRequest.md) @@ -176,12 +177,12 @@ Class | Method | HTTP request | Description - [Model.HydraCredentialSupportedDraft00](docs/HydraCredentialSupportedDraft00.md) - [Model.HydraErrorOAuth2](docs/HydraErrorOAuth2.md) - [Model.HydraGenericError](docs/HydraGenericError.md) + - [Model.HydraGetVersion200Response](docs/HydraGetVersion200Response.md) - [Model.HydraHealthNotReadyStatus](docs/HydraHealthNotReadyStatus.md) - [Model.HydraHealthStatus](docs/HydraHealthStatus.md) - - [Model.HydraInlineResponse200](docs/HydraInlineResponse200.md) - - [Model.HydraInlineResponse2001](docs/HydraInlineResponse2001.md) - - [Model.HydraInlineResponse503](docs/HydraInlineResponse503.md) - [Model.HydraIntrospectedOAuth2Token](docs/HydraIntrospectedOAuth2Token.md) + - [Model.HydraIsReady200Response](docs/HydraIsReady200Response.md) + - [Model.HydraIsReady503Response](docs/HydraIsReady503Response.md) - [Model.HydraJsonPatch](docs/HydraJsonPatch.md) - [Model.HydraJsonWebKey](docs/HydraJsonWebKey.md) - [Model.HydraJsonWebKeySet](docs/HydraJsonWebKeySet.md) @@ -214,20 +215,22 @@ Class | Method | HTTP request | Description - [Model.HydraVersion](docs/HydraVersion.md) - + ## Documentation for Authorization - + +Authentication schemes defined for the API: + ### basic - **Type**: HTTP basic authentication - + ### bearer - **Type**: Bearer Authentication - + ### oauth2 - **Type**: OAuth diff --git a/clients/hydra/dotnet/api/openapi.yaml b/clients/hydra/dotnet/api/openapi.yaml new file mode 100644 index 00000000000..4b1140a1303 --- /dev/null +++ b/clients/hydra/dotnet/api/openapi.yaml @@ -0,0 +1,4621 @@ +openapi: 3.0.3 +info: + contact: + email: hi@ory.sh + description: | + Documentation for all of Ory Hydra's APIs. + license: + name: Apache 2.0 + title: Ory Hydra API + version: v2.2.1 +servers: +- url: / +tags: +- description: OAuth 2.0 + name: oAuth2 +- description: OpenID Connect + name: oidc +- description: JSON Web Keys + name: jwk +- description: Well-Known Endpoints + name: wellknown +- description: Service Metadata + name: metadata +paths: + /.well-known/jwks.json: + get: + description: |- + This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, + if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like + [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + operationId: discoverJsonWebKeys + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Discover Well-Known JSON Web Keys + tags: + - wellknown + /.well-known/openid-configuration: + get: + description: |- + A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. + + Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. + For a full list of clients go here: https://openid.net/developers/certified/ + operationId: discoverOidcConfiguration + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oidcConfiguration' + description: oidcConfiguration + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: OpenID Connect Discovery + tags: + - oidc + /admin/clients: + get: + description: |- + This endpoint lists all clients in the database, and never returns client secrets. + As a default it lists the first 100 clients. + operationId: listOAuth2Clients + parameters: + - description: |- + Items per Page + + This is the number of items per page to return. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + explode: true + in: query + name: page_size + required: false + schema: + default: 250 + format: int64 + maximum: 500 + minimum: 1 + type: integer + style: form + - description: |- + Next Page Token + + The next page token. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + explode: true + in: query + name: page_token + required: false + schema: + default: "1" + minimum: 1 + type: string + style: form + - description: The name of the clients to filter by. + explode: true + in: query + name: client_name + required: false + schema: + type: string + style: form + - description: The owner of the clients to filter by. + explode: true + in: query + name: owner + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/oAuth2Client' + type: array + description: Paginated OAuth2 Client List Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: List OAuth 2.0 Clients + tags: + - oAuth2 + post: + description: |- + Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret + is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + operationId: createOAuth2Client + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: OAuth 2.0 Client Request Body + required: true + x-originalParamName: Body + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Create OAuth 2.0 Client + tags: + - oAuth2 + /admin/clients/{id}: + delete: + description: |- + Delete an existing OAuth 2.0 Client by its ID. + + OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + Make sure that this endpoint is well protected and only callable by first-party components. + operationId: deleteOAuth2Client + parameters: + - description: The id of the OAuth 2.0 Client. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete OAuth 2.0 Client + tags: + - oAuth2 + get: + description: |- + Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. + + OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + operationId: getOAuth2Client + parameters: + - description: The id of the OAuth 2.0 Client. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Get an OAuth 2.0 Client + tags: + - oAuth2 + patch: + description: |- + Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` + the secret will be updated and returned via the API. This is the + only time you will be able to retrieve the client secret, so write it down and keep it safe. + + OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + operationId: patchOAuth2Client + parameters: + - description: The id of the OAuth 2.0 Client. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/jsonPatchDocument' + description: OAuth 2.0 Client JSON Patch Body + required: true + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Patch OAuth 2.0 Client + tags: + - oAuth2 + put: + description: |- + Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, + otherwise the existing secret is used. + + If set, the secret is echoed in the response. It is not possible to retrieve it later on. + + OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + operationId: setOAuth2Client + parameters: + - description: OAuth 2.0 Client ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: OAuth 2.0 Client Request Body + required: true + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Set OAuth 2.0 Client + tags: + - oAuth2 + /admin/clients/{id}/lifespans: + put: + description: Set lifespans of different token types issued for this OAuth 2.0 + client. Does not modify other fields. + operationId: setOAuth2ClientLifespans + parameters: + - description: OAuth 2.0 Client ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2ClientTokenLifespans' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Set OAuth2 Client Token Lifespans + tags: + - oAuth2 + /admin/keys/{set}: + delete: + description: |- + Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + operationId: deleteJsonWebKeySet + parameters: + - description: The JSON Web Key Set + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key Set + tags: + - jwk + get: + description: |- + This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + operationId: getJsonWebKeySet + parameters: + - description: JSON Web Key Set ID + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Retrieve a JSON Web Key Set + tags: + - jwk + post: + description: |- + This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + operationId: createJsonWebKeySet + parameters: + - description: The JSON Web Key Set ID + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createJsonWebKeySet' + required: true + x-originalParamName: Body + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Create JSON Web Key + tags: + - jwk + put: + description: |- + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + operationId: setJsonWebKeySet + parameters: + - description: The JSON Web Key Set ID + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Update a JSON Web Key Set + tags: + - jwk + /admin/keys/{set}/{kid}: + delete: + description: |- + Use this endpoint to delete a single JSON Web Key. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A + JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses + this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), + and allows storing user-defined keys as well. + operationId: deleteJsonWebKey + parameters: + - description: The JSON Web Key Set + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + - description: The JSON Web Key ID (kid) + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key + tags: + - jwk + get: + description: This endpoint returns a singular JSON Web Key contained in a set. + It is identified by the set and the specific key ID (kid). + operationId: getJsonWebKey + parameters: + - description: JSON Web Key Set ID + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + - description: JSON Web Key ID + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get JSON Web Key + tags: + - jwk + put: + description: |- + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. + + A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + operationId: setJsonWebKey + parameters: + - description: The JSON Web Key Set ID + explode: false + in: path + name: set + required: true + schema: + type: string + style: simple + - description: JSON Web Key ID + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKey' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/jsonWebKey' + description: jsonWebKey + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Set JSON Web Key + tags: + - jwk + /admin/oauth2/auth/requests/consent: + get: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if + the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. + + The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent + provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted + or rejected the request. + + The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please + head over to the OAuth 2.0 documentation. + operationId: getOAuth2ConsentRequest + parameters: + - description: OAuth 2.0 Consent Request Challenge + explode: true + in: query + name: consent_challenge + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2ConsentRequest' + description: oAuth2ConsentRequest + "410": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Consent Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/consent/accept: + put: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if + the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. + + The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent + provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted + or rejected the request. + + This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. + The consent provider includes additional information, such as session data for access and ID tokens, and if the + consent request should be used as basis for future requests. + + The response contains a redirect URL which the consent provider should redirect the user-agent to. + + The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please + head over to the OAuth 2.0 documentation. + operationId: acceptOAuth2ConsentRequest + parameters: + - description: OAuth 2.0 Consent Request Challenge + explode: true + in: query + name: consent_challenge + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/acceptOAuth2ConsentRequest' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Consent Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/consent/reject: + put: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if + the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. + + The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent + provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted + or rejected the request. + + This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. + The consent provider must include a reason why the consent was not granted. + + The response contains a redirect URL which the consent provider should redirect the user-agent to. + + The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please + head over to the OAuth 2.0 documentation. + operationId: rejectOAuth2ConsentRequest + parameters: + - description: OAuth 2.0 Consent Request Challenge + explode: true + in: query + name: consent_challenge + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Consent Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/login: + get: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell the Ory OAuth2 Service about it. + + Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app + you write and host, and it must be able to authenticate ("show the subject a login screen") + a subject (in OAuth2 the proper name for subject is "resource owner"). + + The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login + provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + operationId: getOAuth2LoginRequest + parameters: + - description: OAuth 2.0 Login Request Challenge + explode: true + in: query + name: login_challenge + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2LoginRequest' + description: oAuth2LoginRequest + "410": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Login Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/login/accept: + put: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell the Ory OAuth2 Service about it. + + The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login + provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + + This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as + the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting + a cookie. + + The response contains a redirect URL which the login provider should redirect the user-agent to. + operationId: acceptOAuth2LoginRequest + parameters: + - description: OAuth 2.0 Login Request Challenge + explode: true + in: query + name: login_challenge + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/acceptOAuth2LoginRequest' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Login Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/login/reject: + put: + description: |- + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider + to authenticate the subject and then tell the Ory OAuth2 Service about it. + + The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login + provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + + This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication + was denied. + + The response contains a redirect URL which the login provider should redirect the user-agent to. + operationId: rejectOAuth2LoginRequest + parameters: + - description: OAuth 2.0 Login Request Challenge + explode: true + in: query + name: login_challenge + required: true + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Login Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/logout: + get: + description: Use this endpoint to fetch an Ory OAuth 2.0 logout request. + operationId: getOAuth2LogoutRequest + parameters: + - explode: true + in: query + name: logout_challenge + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2LogoutRequest' + description: oAuth2LogoutRequest + "410": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Session Logout Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/logout/accept: + put: + description: |- + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. + + The response contains a redirect URL which the consent provider should redirect the user-agent to. + operationId: acceptOAuth2LogoutRequest + parameters: + - description: OAuth 2.0 Logout Request Challenge + explode: true + in: query + name: logout_challenge + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Session Logout Request + tags: + - oAuth2 + /admin/oauth2/auth/requests/logout/reject: + put: + description: |- + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. + No HTTP request body is required. + + The response is empty as the logout provider has to chose what action to perform next. + operationId: rejectOAuth2LogoutRequest + parameters: + - explode: true + in: query + name: logout_challenge + required: true + schema: + type: string + style: form + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Session Logout Request + tags: + - oAuth2 + /admin/oauth2/auth/sessions/consent: + delete: + description: |- + This endpoint revokes a subject's granted consent sessions and invalidates all + associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + operationId: revokeOAuth2ConsentSessions + parameters: + - description: |- + OAuth 2.0 Consent Subject + + The subject whose consent sessions should be deleted. + explode: true + in: query + name: subject + required: true + schema: + type: string + style: form + - description: |- + OAuth 2.0 Client ID + + If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. + explode: true + in: query + name: client + required: false + schema: + type: string + style: form + - description: |- + Revoke All Consent Sessions + + If set to `true` deletes all consent sessions by the Subject that have been granted. + explode: true + in: query + name: all + required: false + schema: + type: boolean + style: form + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revoke OAuth 2.0 Consent Sessions of a Subject + tags: + - oAuth2 + get: + description: |- + This endpoint lists all subject's granted consent sessions, including client and granted scope. + If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an + empty JSON array with status code 200 OK. + operationId: listOAuth2ConsentSessions + parameters: + - description: |- + Items per Page + + This is the number of items per page to return. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + explode: true + in: query + name: page_size + required: false + schema: + default: 250 + format: int64 + maximum: 500 + minimum: 1 + type: integer + style: form + - description: |- + Next Page Token + + The next page token. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + explode: true + in: query + name: page_token + required: false + schema: + default: "1" + minimum: 1 + type: string + style: form + - description: The subject to list the consent sessions for. + explode: true + in: query + name: subject + required: true + schema: + type: string + style: form + - description: The login session id to list the consent sessions for. + explode: true + in: query + name: login_session_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2ConsentSessions' + description: oAuth2ConsentSessions + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: List OAuth 2.0 Consent Sessions of a Subject + tags: + - oAuth2 + /admin/oauth2/auth/sessions/login: + delete: + description: |- + This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject + has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. + + If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. + No OpenID Connect Front- or Back-channel logout is performed in this case. + + Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected + to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + operationId: revokeOAuth2LoginSessions + parameters: + - description: |- + OAuth 2.0 Subject + + The subject to revoke authentication sessions for. + explode: true + in: query + name: subject + required: false + schema: + type: string + style: form + - description: |- + OAuth 2.0 Subject + + The subject to revoke authentication sessions for. + explode: true + in: query + name: sid + required: false + schema: + type: string + style: form + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + tags: + - oAuth2 + /admin/oauth2/introspect: + post: + description: |- + The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token + is neither expired nor revoked. If a token is active, additional information on the token will be included. You can + set additional data for a token by setting `session.access_token` during the consent flow. + operationId: introspectOAuth2Token + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/introspectOAuth2Token_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/introspectedOAuth2Token' + description: introspectedOAuth2Token + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Introspect OAuth2 Access and Refresh Tokens + tags: + - oAuth2 + /admin/oauth2/tokens: + delete: + description: This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 + Client from the database. + operationId: deleteOAuth2Token + parameters: + - description: OAuth 2.0 Client ID + explode: true + in: query + name: client_id + required: true + schema: + type: string + style: form + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + tags: + - oAuth2 + /admin/trust/grants/jwt-bearer/issuers: + get: + description: Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + operationId: listTrustedOAuth2JwtGrantIssuers + parameters: + - explode: true + in: query + name: MaxItems + required: false + schema: + format: int64 + type: integer + style: form + - explode: true + in: query + name: DefaultItems + required: false + schema: + format: int64 + type: integer + style: form + - description: "If optional \"issuer\" is supplied, only jwt-bearer grants with\ + \ this issuer will be returned." + explode: true + in: query + name: issuer + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuers' + description: trustedOAuth2JwtGrantIssuers + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers + tags: + - oAuth2 + post: + description: |- + Use this endpoint to establish a trust relationship for a JWT issuer + to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication + and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + operationId: trustOAuth2JwtGrantIssuer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/trustOAuth2JwtGrantIssuer' + x-originalParamName: Body + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Trust OAuth2 JWT Bearer Grant Type Issuer + tags: + - oAuth2 + /admin/trust/grants/jwt-bearer/issuers/{id}: + delete: + description: |- + Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you + created the trust relationship. + + Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile + for OAuth 2.0 Client Authentication and Authorization Grant. + operationId: deleteTrustedOAuth2JwtGrantIssuer + parameters: + - description: The id of the desired grant + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + tags: + - oAuth2 + get: + description: |- + Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you + created the trust relationship. + operationId: getTrustedOAuth2JwtGrantIssuer + parameters: + - description: The id of the desired grant + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get Trusted OAuth2 JWT Bearer Grant Type Issuer + tags: + - oAuth2 + /credentials: + post: + description: |- + This endpoint creates a verifiable credential that attests that the user + authenticated with the provided access token owns a certain public/private key + pair. + + More information can be found at + https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + operationId: createVerifiableCredential + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateVerifiableCredentialRequestBody' + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/verifiableCredentialResponse' + description: verifiableCredentialResponse + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/verifiableCredentialPrimingResponse' + description: verifiableCredentialPrimingResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Issues a Verifiable Credential + tags: + - oidc + /health/alive: + get: + description: |- + This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming + HTTP requests. This status does currently not include checks whether the database connection is working. + + If the service supports TLS Edge Termination, this endpoint does not require the + `X-Forwarded-Proto` header to be set. + + Be aware that if you are running multiple nodes of this service, the health status will never + refer to the cluster state, only to a single instance. + operationId: isAlive + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/healthStatus' + description: Ory Hydra is ready to accept connections. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check HTTP Server Status + tags: + - metadata + /health/ready: + get: + description: |- + This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. + the database) are responsive as well. + + If the service supports TLS Edge Termination, this endpoint does not require the + `X-Forwarded-Proto` header to be set. + + Be aware that if you are running multiple nodes of Ory Hydra, the health status will never + refer to the cluster state, only to a single instance. + operationId: isReady + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/isReady_200_response' + description: Ory Hydra is ready to accept requests. + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/isReady_503_response' + description: Ory Kratos is not yet ready to accept requests. + summary: Check HTTP Server and Database Status + tags: + - metadata + /oauth2/auth: + get: + description: |- + Use open source libraries to perform OAuth 2.0 and OpenID Connect + available for any programming language. You can find a list of libraries at https://oauth.net/code/ + + The Ory SDK is not yet able to this endpoint properly. + operationId: oAuth2Authorize + responses: + "302": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: OAuth 2.0 Authorize Endpoint + tags: + - oAuth2 + /oauth2/register: + post: + description: |- + This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the + public internet directly and can be used in self-service. It implements the OpenID Connect + Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint + is disabled by default. It can be enabled by an administrator. + + Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those + values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or + `client_secret_post`. + + The `client_secret` will be returned in the response and you will not be able to retrieve it later on. + Write the secret down and keep it somewhere safe. + operationId: createOidcDynamicClient + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: Dynamic Client Registration Request Body + required: true + x-originalParamName: Body + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Register OAuth2 Client using OpenID Dynamic Client Registration + tags: + - oidc + /oauth2/register/{id}: + delete: + description: |- + This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the + public internet directly and can be used in self-service. It implements the OpenID Connect + Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint + is disabled by default. It can be enabled by an administrator. + + To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client + uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. + If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + + OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + operationId: deleteOidcDynamicClient + parameters: + - description: The id of the OAuth 2.0 Client. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + security: + - bearer: [] + summary: Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration + Management Protocol + tags: + - oidc + get: + description: |- + This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the + public internet directly and can be used in self-service. It implements the OpenID Connect + Dynamic Client Registration Protocol. + + To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client + uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. + If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + operationId: getOidcDynamicClient + parameters: + - description: The id of the OAuth 2.0 Client. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Get OAuth2 Client using OpenID Dynamic Client Registration + tags: + - oidc + put: + description: |- + This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the + public internet directly to be used by third parties. It implements the OpenID Connect + Dynamic Client Registration Protocol. + + This feature is disabled per default. It can be enabled by a system administrator. + + If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. + It is not possible to retrieve it later on. + + To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client + uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. + If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + + OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + operationId: setOidcDynamicClient + parameters: + - description: OAuth 2.0 Client ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: OAuth 2.0 Client Request Body + required: true + x-originalParamName: Body + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Set OAuth2 Client using OpenID Dynamic Client Registration + tags: + - oidc + /oauth2/revoke: + post: + description: |- + Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no + longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. + Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by + the client the token was generated for. + operationId: revokeOAuth2Token + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/revokeOAuth2Token_request' + responses: + "200": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + security: + - basic: [] + - oauth2: [] + summary: Revoke OAuth 2.0 Access or Refresh Token + tags: + - oAuth2 + /oauth2/sessions/logout: + get: + description: |- + This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: + + https://openid.net/specs/openid-connect-frontchannel-1_0.html + https://openid.net/specs/openid-connect-backchannel-1_0.html + + Back-channel logout is performed asynchronously and does not affect logout flow. + operationId: revokeOidcSession + responses: + "302": + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + summary: OpenID Connect Front- and Back-channel Enabled Logout + tags: + - oidc + /oauth2/token: + post: + description: |- + Use open source libraries to perform OAuth 2.0 and OpenID Connect + available for any programming language. You can find a list of libraries here https://oauth.net/code/ + + The Ory SDK is not yet able to this endpoint properly. + operationId: oauth2TokenExchange + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/oauth2TokenExchange_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oAuth2TokenExchange' + description: oAuth2TokenExchange + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + security: + - basic: [] + - oauth2: [] + summary: The OAuth 2.0 Token Endpoint + tags: + - oAuth2 + /userinfo: + get: + description: |- + This endpoint returns the payload of the ID Token, including `session.id_token` values, of + the provided OAuth 2.0 Access Token's consent request. + + In the case of authentication error, a WWW-Authenticate header might be set in the response + with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) + for more details about header format. + operationId: getOidcUserInfo + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/oidcUserInfo' + description: oidcUserInfo + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + security: + - oauth2: [] + summary: OpenID Connect Userinfo + tags: + - oidc + /version: + get: + description: |- + This endpoint returns the version of Ory Hydra. + + If the service supports TLS Edge Termination, this endpoint does not require the + `X-Forwarded-Proto` header to be set. + + Be aware that if you are running multiple nodes of this service, the version will never + refer to the cluster state, only to a single instance. + operationId: getVersion + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getVersion_200_response' + description: Returns the Ory Hydra version. + summary: Return Running Software Version. + tags: + - metadata +components: + responses: + emptyResponse: + description: |- + Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is + typically 201. + errorOAuth2BadRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + errorOAuth2Default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + errorOAuth2NotFound: + content: + application/json: + schema: + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + listOAuth2Clients: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/oAuth2Client' + type: array + description: Paginated OAuth2 Client List Response + schemas: + CreateVerifiableCredentialRequestBody: + properties: + format: + type: string + proof: + $ref: '#/components/schemas/VerifiableCredentialProof' + types: + items: + type: string + type: array + title: CreateVerifiableCredentialRequestBody contains the request body to request + a verifiable credential. + type: object + DefaultError: {} + JSONRawMessage: + title: "JSONRawMessage represents a json.RawMessage that works well with JSON,\ + \ SQL, and Swagger." + NullBool: + nullable: true + type: boolean + NullDuration: + description: "Specify a time duration in milliseconds, seconds, minutes, hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + NullInt: + nullable: true + type: integer + NullString: + nullable: true + type: string + NullTime: + format: date-time + nullable: true + type: string + NullUUID: + format: uuid4 + nullable: true + type: string + RFC6749ErrorJson: + properties: + error: + type: string + error_debug: + type: string + error_description: + type: string + error_hint: + type: string + status_code: + format: int64 + type: integer + title: RFC6749ErrorJson is a helper struct for JSON encoding/decoding of RFC6749Error. + type: object + StringSliceJSONFormat: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + Time: + format: date-time + type: string + UUID: + format: uuid4 + type: string + VerifiableCredentialProof: + properties: + jwt: + type: string + proof_type: + type: string + title: VerifiableCredentialProof contains the proof of a verifiable credential. + type: object + acceptOAuth2ConsentRequest: + properties: + context: + title: "JSONRawMessage represents a json.RawMessage that works well with\ + \ JSON, SQL, and Swagger." + grant_access_token_audience: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + grant_scope: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + handled_at: + format: date-time + title: NullTime implements sql.NullTime functionality. + type: string + remember: + description: |- + Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same + client asks the same user for the same, or a subset of, scope. + type: boolean + remember_for: + description: |- + RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the + authorization will be remembered indefinitely. + format: int64 + type: integer + session: + $ref: '#/components/schemas/acceptOAuth2ConsentRequestSession' + title: The request payload used to accept a consent request. + type: object + acceptOAuth2ConsentRequestSession: + example: + access_token: "" + id_token: "" + properties: + access_token: + description: |- + AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the + refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. + If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties + can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! + id_token: + description: |- + IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable + by anyone that has access to the ID Challenge. Use with care! + title: Pass session data to a consent request. + type: object + acceptOAuth2LoginRequest: + properties: + acr: + description: |- + ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it + to express that, for example, a user authenticated using two factor authentication. + type: string + amr: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + context: + title: "JSONRawMessage represents a json.RawMessage that works well with\ + \ JSON, SQL, and Swagger." + extend_session_lifespan: + description: |- + Extend OAuth2 authentication session lifespan + + If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. + + This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. + type: boolean + force_subject_identifier: + description: |- + ForceSubjectIdentifier forces the "pairwise" user ID of the end-user that authenticated. The "pairwise" user ID refers to the + (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID + Connect specification. It allows you to set an obfuscated subject ("user") identifier that is unique to the client. + + Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the + sub claim in the OAuth 2.0 Introspection. + + Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself + you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in + ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's + configuration). + + Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies + that you have to compute this value on every authentication process (probably depending on the client ID or some + other unique value). + + If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. + type: string + identity_provider_session_id: + description: |- + IdentityProviderSessionID is the session ID of the end-user that authenticated. + If specified, we will use this value to propagate the logout. + type: string + remember: + description: |- + Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store + a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she + will not be asked to log in again. + type: boolean + remember_for: + description: |- + RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the + authorization will be remembered for the duration of the browser session (using a session cookie). + format: int64 + type: integer + subject: + description: Subject is the user ID of the end-user that authenticated. + type: string + required: + - subject + title: HandledLoginRequest is the request payload used to accept a login request. + type: object + createJsonWebKeySet: + description: Create JSON Web Key Set Request Body + properties: + alg: + description: |- + JSON Web Key Algorithm + + The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + type: string + kid: + description: |- + JSON Web Key ID + + The Key ID of the key to be created. + type: string + use: + description: |- + JSON Web Key Use + + The "use" (public key use) parameter identifies the intended use of + the public key. The "use" parameter is employed to indicate whether + a public key is used for encrypting data or verifying the signature + on data. Valid values are "enc" and "sig". + type: string + required: + - alg + - kid + - use + type: object + credentialSupportedDraft00: + description: Includes information about the supported verifiable credentials. + example: + types: + - types + - types + cryptographic_suites_supported: + - cryptographic_suites_supported + - cryptographic_suites_supported + cryptographic_binding_methods_supported: + - cryptographic_binding_methods_supported + - cryptographic_binding_methods_supported + format: format + properties: + cryptographic_binding_methods_supported: + description: |- + OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported + + Contains a list of cryptographic binding methods supported for signing the proof. + items: + type: string + type: array + cryptographic_suites_supported: + description: |- + OpenID Connect Verifiable Credentials Cryptographic Suites Supported + + Contains a list of cryptographic suites methods supported for signing the proof. + items: + type: string + type: array + format: + description: |- + OpenID Connect Verifiable Credentials Format + + Contains the format that is supported by this authorization server. + type: string + types: + description: |- + OpenID Connect Verifiable Credentials Types + + Contains the types of verifiable credentials supported. + items: + type: string + type: array + title: Verifiable Credentials Metadata (Draft 00) + type: object + errorOAuth2: + description: Error + example: + error_debug: error_debug + status_code: 401 + error_description: error_description + error: error + error_hint: The redirect URL is not allowed. + properties: + error: + description: Error + type: string + error_debug: + description: |- + Error Debug Information + + Only available in dev mode. + type: string + error_description: + description: Error Description + type: string + error_hint: + description: |- + Error Hint + + Helps the user identify the error cause. + example: The redirect URL is not allowed. + type: string + status_code: + description: HTTP Status Code + example: 401 + format: int64 + type: integer + type: object + genericError: + example: + reason: User with ID 1234 does not exist. + request: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + code: 404 + debug: SQL field "foo" is not a bool. + details: "" + id: id + message: The resource could not be found + status: Not Found + properties: + code: + description: The status code + example: 404 + format: int64 + type: integer + debug: + description: |- + Debug information + + This field is often not exposed to protect against leaking + sensitive information. + example: SQL field "foo" is not a bool. + type: string + details: + description: Further error details + id: + description: |- + The error ID + + Useful when trying to identify various errors in application logic. + type: string + message: + description: |- + Error message + + The error's message. + example: The resource could not be found + type: string + reason: + description: A human-readable reason for the error + example: User with ID 1234 does not exist. + type: string + request: + description: |- + The request ID + + The request ID is often exposed internally in order to trace + errors across service architectures. This is often a UUID. + example: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + type: string + status: + description: The status description + example: Not Found + type: string + required: + - message + type: object + healthNotReadyStatus: + properties: + errors: + additionalProperties: + type: string + description: Errors contains a list of errors that caused the not ready + status. + type: object + type: object + healthStatus: + example: + status: status + properties: + status: + description: Status always contains "ok". + type: string + type: object + introspectedOAuth2Token: + description: |- + Introspection contains an access token's session data as specified by + [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + example: + ext: + key: "" + sub: sub + iss: iss + active: true + obfuscated_subject: obfuscated_subject + token_type: token_type + client_id: client_id + aud: + - aud + - aud + nbf: 1 + token_use: token_use + scope: scope + exp: 0 + iat: 6 + username: username + properties: + active: + description: |- + Active is a boolean indicator of whether or not the presented token + is currently active. The specifics of a token's "active" state + will vary depending on the implementation of the authorization + server and the information it keeps about its tokens, but a "true" + value return for the "active" property will generally indicate + that a given token has been issued by this authorization server, + has not been revoked by the resource owner, and is within its + given time window of validity (e.g., after its issuance time and + before its expiration time). + type: boolean + aud: + description: Audience contains a list of the token's intended audiences. + items: + type: string + type: array + client_id: + description: |- + ID is aclient identifier for the OAuth 2.0 client that + requested this token. + type: string + exp: + description: |- + Expires at is an integer timestamp, measured in the number of seconds + since January 1 1970 UTC, indicating when this token will expire. + format: int64 + type: integer + ext: + additionalProperties: {} + description: Extra is arbitrary data set by the session. + type: object + iat: + description: |- + Issued at is an integer timestamp, measured in the number of seconds + since January 1 1970 UTC, indicating when this token was + originally issued. + format: int64 + type: integer + iss: + description: IssuerURL is a string representing the issuer of this token + type: string + nbf: + description: |- + NotBefore is an integer timestamp, measured in the number of seconds + since January 1 1970 UTC, indicating when this token is not to be + used before. + format: int64 + type: integer + obfuscated_subject: + description: |- + ObfuscatedSubject is set when the subject identifier algorithm was set to "pairwise" during authorization. + It is the `sub` value of the ID Token that was issued. + type: string + scope: + description: |- + Scope is a JSON string containing a space-separated list of + scopes associated with this token. + type: string + sub: + description: |- + Subject of the token, as defined in JWT [RFC7519]. + Usually a machine-readable identifier of the resource owner who + authorized this token. + type: string + token_type: + description: "TokenType is the introspected token's type, typically `Bearer`." + type: string + token_use: + description: "TokenUse is the introspected token's use, for example `access_token`\ + \ or `refresh_token`." + type: string + username: + description: |- + Username is a human-readable identifier for the resource owner who + authorized this token. + type: string + required: + - active + type: object + jsonPatch: + description: A JSONPatch document as defined by RFC 6902 + properties: + from: + description: |- + This field is used together with operation "move" and uses JSON Pointer notation. + + Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + example: /name + type: string + op: + description: "The operation to be performed. One of \"add\", \"remove\"\ + , \"replace\", \"move\", \"copy\", or \"test\"." + example: replace + type: string + path: + description: |- + The path to the target path. Uses JSON pointer notation. + + Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + example: /name + type: string + value: + description: |- + The value to be used within the operations. + + Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + example: foobar + required: + - op + - path + type: object + jsonPatchDocument: + description: A JSONPatchDocument request + items: + $ref: '#/components/schemas/jsonPatch' + type: array + jsonWebKey: + example: + d: T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE + e: AQAB + crv: P-256 + use: sig + kid: 1603dfe0af8f4596 + x5c: + - x5c + - x5c + k: GawgguFyGrWKav7AX4VKUg + dp: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + dq: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + "n": vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 + p: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ + kty: RSA + q: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ + qi: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU + x: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU + "y": x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 + alg: RS256 + properties: + alg: + description: |- + The "alg" (algorithm) parameter identifies the algorithm intended for + use with the key. The values used should either be registered in the + IANA "JSON Web Signature and Encryption Algorithms" registry + established by [JWA] or be a value that contains a Collision- + Resistant Name. + example: RS256 + type: string + crv: + example: P-256 + type: string + d: + example: T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE + type: string + dp: + example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + type: string + dq: + example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + type: string + e: + example: AQAB + type: string + k: + example: GawgguFyGrWKav7AX4VKUg + type: string + kid: + description: |- + The "kid" (key ID) parameter is used to match a specific key. This + is used, for instance, to choose among a set of keys within a JWK Set + during key rollover. The structure of the "kid" value is + unspecified. When "kid" values are used within a JWK Set, different + keys within the JWK Set SHOULD use distinct "kid" values. (One + example in which different keys might use the same "kid" value is if + they have different "kty" (key type) values but are considered to be + equivalent alternatives by the application using them.) The "kid" + value is a case-sensitive string. + example: 1603dfe0af8f4596 + type: string + kty: + description: |- + The "kty" (key type) parameter identifies the cryptographic algorithm + family used with the key, such as "RSA" or "EC". "kty" values should + either be registered in the IANA "JSON Web Key Types" registry + established by [JWA] or be a value that contains a Collision- + Resistant Name. The "kty" value is a case-sensitive string. + example: RSA + type: string + "n": + example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 + type: string + p: + example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ + type: string + q: + example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ + type: string + qi: + example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU + type: string + use: + description: |- + Use ("public key use") identifies the intended use of + the public key. The "use" parameter is employed to indicate whether + a public key is used for encrypting data or verifying the signature + on data. Values are commonly "sig" (signature) or "enc" (encryption). + example: sig + type: string + x: + example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU + type: string + x5c: + description: |- + The "x5c" (X.509 certificate chain) parameter contains a chain of one + or more PKIX certificates [RFC5280]. The certificate chain is + represented as a JSON array of certificate value strings. Each + string in the array is a base64-encoded (Section 4 of [RFC4648] -- + not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. + The PKIX certificate containing the key value MUST be the first + certificate. + items: + type: string + type: array + "y": + example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 + type: string + required: + - alg + - kid + - kty + - use + type: object + jsonWebKeySet: + description: JSON Web Key Set + example: + keys: + - d: T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE + e: AQAB + crv: P-256 + use: sig + kid: 1603dfe0af8f4596 + x5c: + - x5c + - x5c + k: GawgguFyGrWKav7AX4VKUg + dp: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + dq: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + "n": vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 + p: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ + kty: RSA + q: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ + qi: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU + x: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU + "y": x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 + alg: RS256 + - d: T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE + e: AQAB + crv: P-256 + use: sig + kid: 1603dfe0af8f4596 + x5c: + - x5c + - x5c + k: GawgguFyGrWKav7AX4VKUg + dp: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + dq: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + "n": vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 + p: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ + kty: RSA + q: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ + qi: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU + x: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU + "y": x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 + alg: RS256 + properties: + keys: + description: |- + List of JSON Web Keys + + The value of the "keys" parameter is an array of JSON Web Key (JWK) + values. By default, the order of the JWK values within the array does + not imply an order of preference among them, although applications + of JWK Sets can choose to assign a meaning to the order for their + purposes, if desired. + items: + $ref: '#/components/schemas/jsonWebKey' + type: array + type: object + nullDuration: + nullable: true + pattern: "^[0-9]+(ns|us|ms|s|m|h)$" + type: string + nullInt64: + nullable: true + type: integer + nullTime: + format: date-time + title: NullTime implements sql.NullTime functionality. + type: string + oAuth2Client: + description: |- + OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + example: + metadata: "" + token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg + client_uri: client_uri + jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan + jwks: "" + logo_uri: logo_uri + created_at: 2000-01-23T04:56:07.000+00:00 + registration_client_uri: registration_client_uri + allowed_cors_origins: + - allowed_cors_origins + - allowed_cors_origins + refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan + registration_access_token: registration_access_token + client_id: client_id + token_endpoint_auth_method: client_secret_basic + userinfo_signed_response_alg: userinfo_signed_response_alg + authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan + authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan + client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: scope1 scope-2 scope.3 scope:4 + request_uris: + - request_uris + - request_uris + client_secret: client_secret + backchannel_logout_session_required: true + backchannel_logout_uri: backchannel_logout_uri + client_name: client_name + policy_uri: policy_uri + owner: owner + skip_consent: true + audience: + - audience + - audience + authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan + post_logout_redirect_uris: + - post_logout_redirect_uris + - post_logout_redirect_uris + grant_types: + - grant_types + - grant_types + subject_type: subject_type + refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan + redirect_uris: + - redirect_uris + - redirect_uris + sector_identifier_uri: sector_identifier_uri + frontchannel_logout_session_required: true + frontchannel_logout_uri: frontchannel_logout_uri + skip_logout_consent: true + refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan + implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan + client_secret_expires_at: 0 + implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan + access_token_strategy: access_token_strategy + jwks_uri: jwks_uri + request_object_signing_alg: request_object_signing_alg + tos_uri: tos_uri + contacts: + - contacts + - contacts + response_types: + - response_types + - response_types + properties: + access_token_strategy: + description: |- + OAuth 2.0 Access Token Strategy + + AccessTokenStrategy is the strategy used to generate access tokens. + Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens + Setting the stragegy here overrides the global setting in `strategies.access_token`. + type: string + allowed_cors_origins: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + audience: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + authorization_code_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + authorization_code_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + authorization_code_grant_refresh_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + backchannel_logout_session_required: + description: |- + OpenID Connect Back-Channel Logout Session Required + + Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout + Token to identify the RP session with the OP when the backchannel_logout_uri is used. + If omitted, the default value is false. + type: boolean + backchannel_logout_uri: + description: |- + OpenID Connect Back-Channel Logout URI + + RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + type: string + client_credentials_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + client_id: + description: |- + OAuth 2.0 Client ID + + The ID is immutable. If no ID is provided, a UUID4 will be generated. + type: string + client_name: + description: |- + OAuth 2.0 Client Name + + The human-readable name of the client to be presented to the + end-user during authorization. + type: string + client_secret: + description: |- + OAuth 2.0 Client Secret + + The secret will be included in the create request as cleartext, and then + never again. The secret is kept in hashed format and is not recoverable once lost. + type: string + client_secret_expires_at: + description: |- + OAuth 2.0 Client Secret Expires At + + The field is currently not supported and its value is always 0. + format: int64 + type: integer + client_uri: + description: |- + OAuth 2.0 Client URI + + ClientURI is a URL string of a web page providing information about the client. + If present, the server SHOULD display this URL to the end-user in + a clickable fashion. + type: string + contacts: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + created_at: + description: |- + OAuth 2.0 Client Creation Date + + CreatedAt returns the timestamp of the client's creation. + format: date-time + type: string + frontchannel_logout_session_required: + description: |- + OpenID Connect Front-Channel Logout Session Required + + Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be + included to identify the RP session with the OP when the frontchannel_logout_uri is used. + If omitted, the default value is false. + type: boolean + frontchannel_logout_uri: + description: |- + OpenID Connect Front-Channel Logout URI + + RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query + parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the + request and to determine which of the potentially multiple sessions is to be logged out; if either is + included, both MUST be. + type: string + grant_types: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + implicit_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + implicit_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + jwks: + description: |- + OAuth 2.0 Client JSON Web Key Set + + Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as + the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter + is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for + instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client + can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation + (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks + parameters MUST NOT be used together. + jwks_uri: + description: |- + OAuth 2.0 Client JSON Web Key Set URL + + URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains + the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the + Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing + and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced + JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both + signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used + to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST + match those in the certificate. + type: string + jwt_bearer_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + logo_uri: + description: |- + OAuth 2.0 Client Logo URI + + A URL string referencing the client's logo. + type: string + metadata: + title: "JSONRawMessage represents a json.RawMessage that works well with\ + \ JSON, SQL, and Swagger." + owner: + description: |- + OAuth 2.0 Client Owner + + Owner is a string identifying the owner of the OAuth 2.0 Client. + type: string + policy_uri: + description: |- + OAuth 2.0 Client Policy URI + + PolicyURI is a URL string that points to a human-readable privacy policy document + that describes how the deployment organization collects, uses, + retains, and discloses personal data. + type: string + post_logout_redirect_uris: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + redirect_uris: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + refresh_token_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + refresh_token_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + refresh_token_grant_refresh_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + registration_access_token: + description: |- + OpenID Connect Dynamic Client Registration Access Token + + RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client + using Dynamic Client Registration. + type: string + registration_client_uri: + description: |- + OpenID Connect Dynamic Client Registration URL + + RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + type: string + request_object_signing_alg: + description: |- + OpenID Connect Request Object Signing Algorithm + + JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects + from this Client MUST be rejected, if not signed with this algorithm. + type: string + request_uris: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + response_types: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + scope: + description: |- + OAuth 2.0 Client Scope + + Scope is a string containing a space-separated list of scope values (as + described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client + can use when requesting access tokens. + example: scope1 scope-2 scope.3 scope:4 + type: string + sector_identifier_uri: + description: |- + OpenID Connect Sector Identifier URI + + URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a + file with a single JSON array of redirect_uri values. + type: string + skip_consent: + description: |- + SkipConsent skips the consent screen for this client. This field can only + be set from the admin API. + type: boolean + skip_logout_consent: + description: |- + SkipLogoutConsent skips the logout consent screen for this client. This field can only + be set from the admin API. + type: boolean + subject_type: + description: |- + OpenID Connect Subject Type + + The `subject_types_supported` Discovery parameter contains a + list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + type: string + token_endpoint_auth_method: + default: client_secret_basic + description: |- + OAuth 2.0 Token Endpoint Authentication Method + + Requested Client Authentication method for the Token Endpoint. The options are: + + `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. + `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. + `private_key_jwt`: Use JSON Web Tokens to authenticate the client. + `none`: Used for public clients (native apps, mobile apps) which can not have secrets. + type: string + token_endpoint_auth_signing_alg: + description: |- + OAuth 2.0 Token Endpoint Signing Algorithm + + Requested Client Authentication signing algorithm for the Token Endpoint. + type: string + tos_uri: + description: |- + OAuth 2.0 Client Terms of Service URI + + A URL string pointing to a human-readable terms of service + document for the client that describes a contractual relationship + between the end-user and the client that the end-user accepts when + authorizing the client. + type: string + updated_at: + description: |- + OAuth 2.0 Client Last Update Date + + UpdatedAt returns the timestamp of the last update. + format: date-time + type: string + userinfo_signed_response_alg: + description: |- + OpenID Connect Request Userinfo Signed Response Algorithm + + JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT + [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims + as a UTF-8 encoded JSON object using the application/json content-type. + type: string + title: OAuth 2.0 Client + type: object + oAuth2ClientTokenLifespans: + description: Lifespans of different token types issued for this OAuth 2.0 Client. + properties: + authorization_code_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + authorization_code_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + authorization_code_grant_refresh_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + client_credentials_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + implicit_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + implicit_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + jwt_bearer_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + refresh_token_grant_access_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + refresh_token_grant_id_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + refresh_token_grant_refresh_token_lifespan: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration + type: string + title: OAuth 2.0 Client Token Lifespans + type: object + oAuth2ConsentRequest: + example: + requested_access_token_audience: + - requested_access_token_audience + - requested_access_token_audience + login_challenge: login_challenge + subject: subject + amr: + - amr + - amr + oidc_context: + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display + skip: true + request_url: request_url + acr: acr + context: "" + challenge: challenge + client: + metadata: "" + token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg + client_uri: client_uri + jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan + jwks: "" + logo_uri: logo_uri + created_at: 2000-01-23T04:56:07.000+00:00 + registration_client_uri: registration_client_uri + allowed_cors_origins: + - allowed_cors_origins + - allowed_cors_origins + refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan + registration_access_token: registration_access_token + client_id: client_id + token_endpoint_auth_method: client_secret_basic + userinfo_signed_response_alg: userinfo_signed_response_alg + authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan + authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan + client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: scope1 scope-2 scope.3 scope:4 + request_uris: + - request_uris + - request_uris + client_secret: client_secret + backchannel_logout_session_required: true + backchannel_logout_uri: backchannel_logout_uri + client_name: client_name + policy_uri: policy_uri + owner: owner + skip_consent: true + audience: + - audience + - audience + authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan + post_logout_redirect_uris: + - post_logout_redirect_uris + - post_logout_redirect_uris + grant_types: + - grant_types + - grant_types + subject_type: subject_type + refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan + redirect_uris: + - redirect_uris + - redirect_uris + sector_identifier_uri: sector_identifier_uri + frontchannel_logout_session_required: true + frontchannel_logout_uri: frontchannel_logout_uri + skip_logout_consent: true + refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan + implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan + client_secret_expires_at: 0 + implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan + access_token_strategy: access_token_strategy + jwks_uri: jwks_uri + request_object_signing_alg: request_object_signing_alg + tos_uri: tos_uri + contacts: + - contacts + - contacts + response_types: + - response_types + - response_types + login_session_id: login_session_id + requested_scope: + - requested_scope + - requested_scope + properties: + acr: + description: |- + ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it + to express that, for example, a user authenticated using two factor authentication. + type: string + amr: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + challenge: + description: |- + ID is the identifier ("authorization challenge") of the consent authorization request. It is used to + identify the session. + type: string + client: + $ref: '#/components/schemas/oAuth2Client' + context: + title: "JSONRawMessage represents a json.RawMessage that works well with\ + \ JSON, SQL, and Swagger." + login_challenge: + description: |- + LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate + a login and consent request in the login & consent app. + type: string + login_session_id: + description: |- + LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) + this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) + this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC Front-/Back- + channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + type: string + oidc_context: + $ref: '#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext' + request_url: + description: |- + RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which + initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but + might come in handy if you want to deal with additional request parameters. + type: string + requested_access_token_audience: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + requested_scope: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + skip: + description: |- + Skip, if true, implies that the client has requested the same scopes from the same user previously. + If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the + consent request using the usual API call. + type: boolean + subject: + description: |- + Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope + requested by the OAuth 2.0 client. + type: string + required: + - challenge + title: Contains information on an ongoing consent request. + type: object + oAuth2ConsentRequestOpenIDConnectContext: + example: + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display + properties: + acr_values: + description: |- + ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. + It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. + + OpenID Connect defines it as follows: + > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values + that the Authorization Server is being requested to use for processing this Authentication Request, with the + values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication + performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a + Voluntary Claim by this parameter. + items: + type: string + type: array + display: + description: |- + Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. + The defined values are: + page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. + popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. + touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. + wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a "feature phone" type display. + + The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. + type: string + id_token_hint_claims: + additionalProperties: {} + description: |- + IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the + End-User's current or past authenticated session with the Client. + type: object + login_hint: + description: |- + LoginHint hints about the login identifier the End-User might use to log in (if necessary). + This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) + and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a + phone number in the format specified for the phone_number Claim. The use of this parameter is optional. + type: string + ui_locales: + description: |- + UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a + space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value + "fr-CA fr en" represents a preference for French as spoken in Canada, then French (without a region designation), + followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested + locales are not supported by the OpenID Provider. + items: + type: string + type: array + title: Contains optional information about the OpenID Connect request. + type: object + oAuth2ConsentSession: + description: A completed OAuth 2.0 Consent Session. + example: + remember: true + consent_request: + requested_access_token_audience: + - requested_access_token_audience + - requested_access_token_audience + login_challenge: login_challenge + subject: subject + amr: + - amr + - amr + oidc_context: + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display + skip: true + request_url: request_url + acr: acr + context: "" + challenge: challenge + client: + metadata: "" + token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg + client_uri: client_uri + jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan + jwks: "" + logo_uri: logo_uri + created_at: 2000-01-23T04:56:07.000+00:00 + registration_client_uri: registration_client_uri + allowed_cors_origins: + - allowed_cors_origins + - allowed_cors_origins + refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan + registration_access_token: registration_access_token + client_id: client_id + token_endpoint_auth_method: client_secret_basic + userinfo_signed_response_alg: userinfo_signed_response_alg + authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan + authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan + client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: scope1 scope-2 scope.3 scope:4 + request_uris: + - request_uris + - request_uris + client_secret: client_secret + backchannel_logout_session_required: true + backchannel_logout_uri: backchannel_logout_uri + client_name: client_name + policy_uri: policy_uri + owner: owner + skip_consent: true + audience: + - audience + - audience + authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan + post_logout_redirect_uris: + - post_logout_redirect_uris + - post_logout_redirect_uris + grant_types: + - grant_types + - grant_types + subject_type: subject_type + refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan + redirect_uris: + - redirect_uris + - redirect_uris + sector_identifier_uri: sector_identifier_uri + frontchannel_logout_session_required: true + frontchannel_logout_uri: frontchannel_logout_uri + skip_logout_consent: true + refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan + implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan + client_secret_expires_at: 0 + implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan + access_token_strategy: access_token_strategy + jwks_uri: jwks_uri + request_object_signing_alg: request_object_signing_alg + tos_uri: tos_uri + contacts: + - contacts + - contacts + response_types: + - response_types + - response_types + login_session_id: login_session_id + requested_scope: + - requested_scope + - requested_scope + expires_at: + access_token: 2000-01-23T04:56:07.000+00:00 + refresh_token: 2000-01-23T04:56:07.000+00:00 + par_context: 2000-01-23T04:56:07.000+00:00 + id_token: 2000-01-23T04:56:07.000+00:00 + authorize_code: 2000-01-23T04:56:07.000+00:00 + session: + access_token: "" + id_token: "" + context: "" + grant_access_token_audience: + - grant_access_token_audience + - grant_access_token_audience + handled_at: 2000-01-23T04:56:07.000+00:00 + grant_scope: + - grant_scope + - grant_scope + remember_for: 0 + properties: + consent_request: + $ref: '#/components/schemas/oAuth2ConsentRequest' + context: + title: "JSONRawMessage represents a json.RawMessage that works well with\ + \ JSON, SQL, and Swagger." + expires_at: + $ref: '#/components/schemas/oAuth2ConsentSession_expires_at' + grant_access_token_audience: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + grant_scope: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + handled_at: + format: date-time + title: NullTime implements sql.NullTime functionality. + type: string + remember: + description: |- + Remember Consent + + Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same + client asks the same user for the same, or a subset of, scope. + type: boolean + remember_for: + description: |- + Remember Consent For + + RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the + authorization will be remembered indefinitely. + format: int64 + type: integer + session: + $ref: '#/components/schemas/acceptOAuth2ConsentRequestSession' + title: OAuth 2.0 Consent Session + type: object + oAuth2ConsentSessions: + description: List of OAuth 2.0 Consent Sessions + items: + $ref: '#/components/schemas/oAuth2ConsentSession' + type: array + oAuth2LoginRequest: + example: + requested_access_token_audience: + - requested_access_token_audience + - requested_access_token_audience + subject: subject + oidc_context: + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display + challenge: challenge + client: + metadata: "" + token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg + client_uri: client_uri + jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan + jwks: "" + logo_uri: logo_uri + created_at: 2000-01-23T04:56:07.000+00:00 + registration_client_uri: registration_client_uri + allowed_cors_origins: + - allowed_cors_origins + - allowed_cors_origins + refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan + registration_access_token: registration_access_token + client_id: client_id + token_endpoint_auth_method: client_secret_basic + userinfo_signed_response_alg: userinfo_signed_response_alg + authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan + authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan + client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: scope1 scope-2 scope.3 scope:4 + request_uris: + - request_uris + - request_uris + client_secret: client_secret + backchannel_logout_session_required: true + backchannel_logout_uri: backchannel_logout_uri + client_name: client_name + policy_uri: policy_uri + owner: owner + skip_consent: true + audience: + - audience + - audience + authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan + post_logout_redirect_uris: + - post_logout_redirect_uris + - post_logout_redirect_uris + grant_types: + - grant_types + - grant_types + subject_type: subject_type + refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan + redirect_uris: + - redirect_uris + - redirect_uris + sector_identifier_uri: sector_identifier_uri + frontchannel_logout_session_required: true + frontchannel_logout_uri: frontchannel_logout_uri + skip_logout_consent: true + refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan + implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan + client_secret_expires_at: 0 + implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan + access_token_strategy: access_token_strategy + jwks_uri: jwks_uri + request_object_signing_alg: request_object_signing_alg + tos_uri: tos_uri + contacts: + - contacts + - contacts + response_types: + - response_types + - response_types + session_id: session_id + skip: true + request_url: request_url + requested_scope: + - requested_scope + - requested_scope + properties: + challenge: + description: |- + ID is the identifier ("login challenge") of the login request. It is used to + identify the session. + type: string + client: + $ref: '#/components/schemas/oAuth2Client' + oidc_context: + $ref: '#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext' + request_url: + description: |- + RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which + initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but + might come in handy if you want to deal with additional request parameters. + type: string + requested_access_token_audience: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + requested_scope: + items: + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." + type: array + session_id: + description: |- + SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) + this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) + this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC Front-/Back- + channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + type: string + skip: + description: |- + Skip, if true, implies that the client has requested the same scopes from the same user previously. + If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. + + This feature allows you to update / set session information. + type: boolean + subject: + description: |- + Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope + requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type + when accepting the login request, or the request will fail. + type: string + required: + - challenge + - client + - request_url + - skip + - subject + title: Contains information on an ongoing login request. + type: object + oAuth2LogoutRequest: + example: + subject: subject + challenge: challenge + client: + metadata: "" + token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg + client_uri: client_uri + jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan + jwks: "" + logo_uri: logo_uri + created_at: 2000-01-23T04:56:07.000+00:00 + registration_client_uri: registration_client_uri + allowed_cors_origins: + - allowed_cors_origins + - allowed_cors_origins + refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan + registration_access_token: registration_access_token + client_id: client_id + token_endpoint_auth_method: client_secret_basic + userinfo_signed_response_alg: userinfo_signed_response_alg + authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan + authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan + client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: scope1 scope-2 scope.3 scope:4 + request_uris: + - request_uris + - request_uris + client_secret: client_secret + backchannel_logout_session_required: true + backchannel_logout_uri: backchannel_logout_uri + client_name: client_name + policy_uri: policy_uri + owner: owner + skip_consent: true + audience: + - audience + - audience + authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan + post_logout_redirect_uris: + - post_logout_redirect_uris + - post_logout_redirect_uris + grant_types: + - grant_types + - grant_types + subject_type: subject_type + refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan + redirect_uris: + - redirect_uris + - redirect_uris + sector_identifier_uri: sector_identifier_uri + frontchannel_logout_session_required: true + frontchannel_logout_uri: frontchannel_logout_uri + skip_logout_consent: true + refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan + implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan + client_secret_expires_at: 0 + implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan + access_token_strategy: access_token_strategy + jwks_uri: jwks_uri + request_object_signing_alg: request_object_signing_alg + tos_uri: tos_uri + contacts: + - contacts + - contacts + response_types: + - response_types + - response_types + rp_initiated: true + request_url: request_url + sid: sid + properties: + challenge: + description: |- + Challenge is the identifier ("logout challenge") of the logout authentication request. It is used to + identify the session. + type: string + client: + $ref: '#/components/schemas/oAuth2Client' + request_url: + description: RequestURL is the original Logout URL requested. + type: string + rp_initiated: + description: "RPInitiated is set to true if the request was initiated by\ + \ a Relying Party (RP), also known as an OAuth 2.0 Client." + type: boolean + sid: + description: SessionID is the login session ID that was requested to log + out. + type: string + subject: + description: Subject is the user for whom the logout was request. + type: string + title: Contains information about an ongoing logout request. + type: object + oAuth2RedirectTo: + description: "Contains a redirect URL used to complete a login, consent, or\ + \ logout request." + example: + redirect_to: redirect_to + properties: + redirect_to: + description: RedirectURL is the URL which you should redirect the user's + browser to once the authentication process is completed. + type: string + required: + - redirect_to + title: OAuth 2.0 Redirect Browser To + type: object + oAuth2TokenExchange: + description: OAuth2 Token Exchange Result + example: + access_token: access_token + refresh_token: refresh_token + scope: scope + id_token: id_token + token_type: token_type + expires_in: 0 + properties: + access_token: + description: The access token issued by the authorization server. + type: string + expires_in: + description: |- + The lifetime in seconds of the access token. For + example, the value "3600" denotes that the access token will + expire in one hour from the time the response was generated. + format: int64 + type: integer + id_token: + description: To retrieve a refresh token request the id_token scope. + type: string + refresh_token: + description: |- + The refresh token, which can be used to obtain new + access tokens. To retrieve it add the scope "offline" to your access token request. + type: string + scope: + description: The scope of the access token + type: string + token_type: + description: The type of the token issued + type: string + type: object + oidcConfiguration: + description: |- + Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms + among others. + example: + request_parameter_supported: true + claims_parameter_supported: true + backchannel_logout_supported: true + scopes_supported: + - scopes_supported + - scopes_supported + issuer: https://playground.ory.sh/ory-hydra/public/ + userinfo_signed_response_alg: + - userinfo_signed_response_alg + - userinfo_signed_response_alg + authorization_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/auth + claims_supported: + - claims_supported + - claims_supported + userinfo_signing_alg_values_supported: + - userinfo_signing_alg_values_supported + - userinfo_signing_alg_values_supported + token_endpoint_auth_methods_supported: + - token_endpoint_auth_methods_supported + - token_endpoint_auth_methods_supported + backchannel_logout_session_supported: true + response_modes_supported: + - response_modes_supported + - response_modes_supported + id_token_signed_response_alg: + - id_token_signed_response_alg + - id_token_signed_response_alg + token_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/token + response_types_supported: + - response_types_supported + - response_types_supported + request_uri_parameter_supported: true + grant_types_supported: + - grant_types_supported + - grant_types_supported + end_session_endpoint: end_session_endpoint + revocation_endpoint: revocation_endpoint + userinfo_endpoint: userinfo_endpoint + frontchannel_logout_supported: true + require_request_uri_registration: true + code_challenge_methods_supported: + - code_challenge_methods_supported + - code_challenge_methods_supported + credentials_endpoint_draft_00: credentials_endpoint_draft_00 + frontchannel_logout_session_supported: true + jwks_uri: "https://{slug}.projects.oryapis.com/.well-known/jwks.json" + credentials_supported_draft_00: + - types: + - types + - types + cryptographic_suites_supported: + - cryptographic_suites_supported + - cryptographic_suites_supported + cryptographic_binding_methods_supported: + - cryptographic_binding_methods_supported + - cryptographic_binding_methods_supported + format: format + - types: + - types + - types + cryptographic_suites_supported: + - cryptographic_suites_supported + - cryptographic_suites_supported + cryptographic_binding_methods_supported: + - cryptographic_binding_methods_supported + - cryptographic_binding_methods_supported + format: format + subject_types_supported: + - subject_types_supported + - subject_types_supported + id_token_signing_alg_values_supported: + - id_token_signing_alg_values_supported + - id_token_signing_alg_values_supported + registration_endpoint: https://playground.ory.sh/ory-hydra/admin/client + request_object_signing_alg_values_supported: + - request_object_signing_alg_values_supported + - request_object_signing_alg_values_supported + properties: + authorization_endpoint: + description: OAuth 2.0 Authorization Endpoint URL + example: https://playground.ory.sh/ory-hydra/public/oauth2/auth + type: string + backchannel_logout_session_supported: + description: |- + OpenID Connect Back-Channel Logout Session Required + + Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP + session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP + type: boolean + backchannel_logout_supported: + description: |- + OpenID Connect Back-Channel Logout Supported + + Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + type: boolean + claims_parameter_supported: + description: |- + OpenID Connect Claims Parameter Parameter Supported + + Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + type: boolean + claims_supported: + description: |- + OpenID Connect Supported Claims + + JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply + values for. Note that for privacy or other reasons, this might not be an exhaustive list. + items: + type: string + type: array + code_challenge_methods_supported: + description: |- + OAuth 2.0 PKCE Supported Code Challenge Methods + + JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported + by this authorization server. + items: + type: string + type: array + credentials_endpoint_draft_00: + description: |- + OpenID Connect Verifiable Credentials Endpoint + + Contains the URL of the Verifiable Credentials Endpoint. + type: string + credentials_supported_draft_00: + description: |- + OpenID Connect Verifiable Credentials Supported + + JSON array containing a list of the Verifiable Credentials supported by this authorization server. + items: + $ref: '#/components/schemas/credentialSupportedDraft00' + type: array + end_session_endpoint: + description: |- + OpenID Connect End-Session Endpoint + + URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + type: string + frontchannel_logout_session_supported: + description: |- + OpenID Connect Front-Channel Logout Session Required + + Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify + the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also + included in ID Tokens issued by the OP. + type: boolean + frontchannel_logout_supported: + description: |- + OpenID Connect Front-Channel Logout Supported + + Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + type: boolean + grant_types_supported: + description: |- + OAuth 2.0 Supported Grant Types + + JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + items: + type: string + type: array + id_token_signed_response_alg: + description: |- + OpenID Connect Default ID Token Signing Algorithms + + Algorithm used to sign OpenID Connect ID Tokens. + items: + type: string + type: array + id_token_signing_alg_values_supported: + description: |- + OpenID Connect Supported ID Token Signing Algorithms + + JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token + to encode the Claims in a JWT. + items: + type: string + type: array + issuer: + description: |- + OpenID Connect Issuer URL + + An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. + If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned + by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. + example: https://playground.ory.sh/ory-hydra/public/ + type: string + jwks_uri: + description: |- + OpenID Connect Well-Known JSON Web Keys URL + + URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate + signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs + to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) + parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. + Although some algorithms allow the same key to be used for both signatures and encryption, doing so is + NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of + keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + example: "https://{slug}.projects.oryapis.com/.well-known/jwks.json" + type: string + registration_endpoint: + description: OpenID Connect Dynamic Client Registration Endpoint URL + example: https://playground.ory.sh/ory-hydra/admin/client + type: string + request_object_signing_alg_values_supported: + description: |- + OpenID Connect Supported Request Object Signing Algorithms + + JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, + which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when + the Request Object is passed by value (using the request parameter) and when it is passed by reference + (using the request_uri parameter). + items: + type: string + type: array + request_parameter_supported: + description: |- + OpenID Connect Request Parameter Supported + + Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + type: boolean + request_uri_parameter_supported: + description: |- + OpenID Connect Request URI Parameter Supported + + Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + type: boolean + require_request_uri_registration: + description: |- + OpenID Connect Requires Request URI Registration + + Boolean value specifying whether the OP requires any request_uri values used to be pre-registered + using the request_uris registration parameter. + type: boolean + response_modes_supported: + description: |- + OAuth 2.0 Supported Response Modes + + JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + items: + type: string + type: array + response_types_supported: + description: |- + OAuth 2.0 Supported Response Types + + JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID + Providers MUST support the code, id_token, and the token id_token Response Type values. + items: + type: string + type: array + revocation_endpoint: + description: |- + OAuth 2.0 Token Revocation URL + + URL of the authorization server's OAuth 2.0 revocation endpoint. + type: string + scopes_supported: + description: |- + OAuth 2.0 Supported Scope Values + + JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST + support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used + items: + type: string + type: array + subject_types_supported: + description: |- + OpenID Connect Supported Subject Types + + JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include + pairwise and public. + items: + type: string + type: array + token_endpoint: + description: OAuth 2.0 Token Endpoint URL + example: https://playground.ory.sh/ory-hydra/public/oauth2/token + type: string + token_endpoint_auth_methods_supported: + description: |- + OAuth 2.0 Supported Client Authentication Methods + + JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are + client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 + items: + type: string + type: array + userinfo_endpoint: + description: |- + OpenID Connect Userinfo URL + + URL of the OP's UserInfo Endpoint. + type: string + userinfo_signed_response_alg: + description: |- + OpenID Connect User Userinfo Signing Algorithm + + Algorithm used to sign OpenID Connect Userinfo Responses. + items: + type: string + type: array + userinfo_signing_alg_values_supported: + description: |- + OpenID Connect Supported Userinfo Signing Algorithm + + JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + items: + type: string + type: array + required: + - authorization_endpoint + - id_token_signed_response_alg + - id_token_signing_alg_values_supported + - issuer + - jwks_uri + - response_types_supported + - subject_types_supported + - token_endpoint + - userinfo_signed_response_alg + title: OpenID Connect Discovery Metadata + type: object + oidcUserInfo: + description: OpenID Connect Userinfo + example: + sub: sub + website: website + zoneinfo: zoneinfo + birthdate: birthdate + email_verified: true + gender: gender + profile: profile + phone_number_verified: true + preferred_username: preferred_username + given_name: given_name + locale: locale + middle_name: middle_name + picture: picture + updated_at: 0 + name: name + nickname: nickname + phone_number: phone_number + family_name: family_name + email: email + properties: + birthdate: + description: "End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑\ + 2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted.\ + \ To represent only the year, YYYY format is allowed. Note that depending\ + \ on the underlying platform's date related function, providing just year\ + \ can result in varying month and day, so the implementers need to take\ + \ this factor into account to correctly process the dates." + type: string + email: + description: "End-User's preferred e-mail address. Its value MUST conform\ + \ to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon\ + \ this value being unique, as discussed in Section 5.7." + type: string + email_verified: + description: "True if the End-User's e-mail address has been verified; otherwise\ + \ false. When this Claim Value is true, this means that the OP took affirmative\ + \ steps to ensure that this e-mail address was controlled by the End-User\ + \ at the time the verification was performed. The means by which an e-mail\ + \ address is verified is context-specific, and dependent upon the trust\ + \ framework or contractual agreements within which the parties are operating." + type: boolean + family_name: + description: "Surname(s) or last name(s) of the End-User. Note that in some\ + \ cultures, people can have multiple family names or no family name; all\ + \ can be present, with the names being separated by space characters." + type: string + gender: + description: End-User's gender. Values defined by this specification are + female and male. Other values MAY be used when neither of the defined + values are applicable. + type: string + given_name: + description: "Given name(s) or first name(s) of the End-User. Note that\ + \ in some cultures, people can have multiple given names; all can be present,\ + \ with the names being separated by space characters." + type: string + locale: + description: "End-User's locale, represented as a BCP47 [RFC5646] language\ + \ tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code\ + \ in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase,\ + \ separated by a dash. For example, en-US or fr-CA. As a compatibility\ + \ note, some implementations have used an underscore as the separator\ + \ rather than a dash, for example, en_US; Relying Parties MAY choose to\ + \ accept this locale syntax as well." + type: string + middle_name: + description: "Middle name(s) of the End-User. Note that in some cultures,\ + \ people can have multiple middle names; all can be present, with the\ + \ names being separated by space characters. Also note that in some cultures,\ + \ middle names are not used." + type: string + name: + description: "End-User's full name in displayable form including all name\ + \ parts, possibly including titles and suffixes, ordered according to\ + \ the End-User's locale and preferences." + type: string + nickname: + description: "Casual name of the End-User that may or may not be the same\ + \ as the given_name. For instance, a nickname value of Mike might be returned\ + \ alongside a given_name value of Michael." + type: string + phone_number: + description: "End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED\ + \ as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2)\ + \ 687 2400. If the phone number contains an extension, it is RECOMMENDED\ + \ that the extension be represented using the RFC 3966 [RFC3966] extension\ + \ syntax, for example, +1 (604) 555-1234;ext=5678." + type: string + phone_number_verified: + description: "True if the End-User's phone number has been verified; otherwise\ + \ false. When this Claim Value is true, this means that the OP took affirmative\ + \ steps to ensure that this phone number was controlled by the End-User\ + \ at the time the verification was performed. The means by which a phone\ + \ number is verified is context-specific, and dependent upon the trust\ + \ framework or contractual agreements within which the parties are operating.\ + \ When true, the phone_number Claim MUST be in E.164 format and any extensions\ + \ MUST be represented in RFC 3966 format." + type: boolean + picture: + description: "URL of the End-User's profile picture. This URL MUST refer\ + \ to an image file (for example, a PNG, JPEG, or GIF image file), rather\ + \ than to a Web page containing an image. Note that this URL SHOULD specifically\ + \ reference a profile photo of the End-User suitable for displaying when\ + \ describing the End-User, rather than an arbitrary photo taken by the\ + \ End-User." + type: string + preferred_username: + description: "Non-unique shorthand name by which the End-User wishes to\ + \ be referred to at the RP, such as janedoe or j.doe. This value MAY be\ + \ any valid JSON string including special characters such as @, /, or\ + \ whitespace." + type: string + profile: + description: URL of the End-User's profile page. The contents of this Web + page SHOULD be about the End-User. + type: string + sub: + description: Subject - Identifier for the End-User at the IssuerURL. + type: string + updated_at: + description: Time the End-User's information was last updated. Its value + is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z + as measured in UTC until the date/time. + format: int64 + type: integer + website: + description: URL of the End-User's Web page or blog. This Web page SHOULD + contain information published by the End-User or an organization that + the End-User is affiliated with. + type: string + zoneinfo: + description: "String from zoneinfo [zoneinfo] time zone database representing\ + \ the End-User's time zone. For example, Europe/Paris or America/Los_Angeles." + type: string + type: object + pagination: + properties: + page_size: + default: 250 + description: |- + Items per page + + This is the number of items per page to return. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + format: int64 + maximum: 1000 + minimum: 1 + type: integer + page_token: + default: "1" + description: |- + Next Page Token + + The next page token. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + minimum: 1 + type: string + type: object + paginationHeaders: + properties: + link: + description: |- + The link header contains pagination links. + + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + + in: header + type: string + x-total-count: + description: |- + The total number of clients. + + in: header + type: string + type: object + rejectOAuth2Request: + properties: + error: + description: |- + The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). + + Defaults to `request_denied`. + type: string + error_debug: + description: |- + Debug contains information to help resolve the problem as a developer. Usually not exposed + to the public but only in the server logs. + type: string + error_description: + description: Description of the error in a human readable format. + type: string + error_hint: + description: Hint to help resolve the error. + type: string + status_code: + description: |- + Represents the HTTP status code of the error (e.g. 401 or 403) + + Defaults to 400 + format: int64 + type: integer + title: The request payload used to accept a login or consent request. + type: object + tokenPagination: + properties: + page_size: + default: 250 + description: |- + Items per page + + This is the number of items per page to return. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + format: int64 + maximum: 1000 + minimum: 1 + type: integer + page_token: + default: "1" + description: |- + Next Page Token + + The next page token. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + minimum: 1 + type: string + type: object + tokenPaginationHeaders: + properties: + link: + description: |- + The link header contains pagination links. + + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + + in: header + type: string + x-total-count: + description: |- + The total number of clients. + + in: header + type: string + type: object + tokenPaginationRequestParameters: + description: |- + The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: + `; rel="{page}"` + + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + properties: + page_size: + default: 250 + description: |- + Items per Page + + This is the number of items per page to return. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + format: int64 + maximum: 500 + minimum: 1 + type: integer + page_token: + default: "1" + description: |- + Next Page Token + + The next page token. + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + minimum: 1 + type: string + title: Pagination Request Parameters + type: object + tokenPaginationResponseHeaders: + description: |- + The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: + `; rel="{page}"` + + For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + properties: + link: + description: |- + The Link HTTP Header + + The `Link` header contains a comma-delimited list of links to the following pages: + + first: The first page of results. + next: The next page of results. + prev: The previous page of results. + last: The last page of results. + + Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: + + ; rel="first",; rel="next",; rel="prev",; rel="last" + type: string + x-total-count: + description: |- + The X-Total-Count HTTP Header + + The `X-Total-Count` header contains the total number of items in the collection. + format: int64 + type: integer + title: Pagination Response Header + type: object + trustOAuth2JwtGrantIssuer: + description: Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + properties: + allow_any_subject: + description: The "allow_any_subject" indicates that the issuer is allowed + to have any principal as the subject of the JWT. + type: boolean + expires_at: + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." + format: date-time + type: string + issuer: + description: The "issuer" identifies the principal that issued the JWT assertion + (same as "iss" claim in JWT). + example: https://jwt-idp.example.com + type: string + jwk: + $ref: '#/components/schemas/jsonWebKey' + scope: + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" + example: + - openid + - offline + items: + type: string + type: array + subject: + description: The "subject" identifies the principal that is the subject + of the JWT. + example: mike@example.com + type: string + required: + - expires_at + - issuer + - jwk + - scope + type: object + trustedOAuth2JwtGrantIssuer: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + example: + public_key: + set: https://jwt-idp.example.com + kid: 123e4567-e89b-12d3-a456-426655440000 + expires_at: 2000-01-23T04:56:07.000+00:00 + subject: mike@example.com + scope: + - openid + - offline + created_at: 2000-01-23T04:56:07.000+00:00 + id: 9edc811f-4e28-453c-9b46-4de65f00217f + allow_any_subject: true + issuer: https://jwt-idp.example.com + properties: + allow_any_subject: + description: The "allow_any_subject" indicates that the issuer is allowed + to have any principal as the subject of the JWT. + type: boolean + created_at: + description: "The \"created_at\" indicates, when grant was created." + format: date-time + type: string + expires_at: + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." + format: date-time + type: string + id: + example: 9edc811f-4e28-453c-9b46-4de65f00217f + type: string + issuer: + description: The "issuer" identifies the principal that issued the JWT assertion + (same as "iss" claim in JWT). + example: https://jwt-idp.example.com + type: string + public_key: + $ref: '#/components/schemas/trustedOAuth2JwtGrantJsonWebKey' + scope: + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" + example: + - openid + - offline + items: + type: string + type: array + subject: + description: The "subject" identifies the principal that is the subject + of the JWT. + example: mike@example.com + type: string + type: object + trustedOAuth2JwtGrantIssuers: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationships + items: + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + type: array + trustedOAuth2JwtGrantJsonWebKey: + description: OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + example: + set: https://jwt-idp.example.com + kid: 123e4567-e89b-12d3-a456-426655440000 + properties: + kid: + description: The "key_id" is key unique identifier (same as kid header in + jws/jwt). + example: 123e4567-e89b-12d3-a456-426655440000 + type: string + set: + description: The "set" is basically a name for a group(set) of keys. Will + be the same as "issuer" in grant. + example: https://jwt-idp.example.com + type: string + type: object + unexpectedError: + type: string + verifiableCredentialPrimingResponse: + example: + c_nonce_expires_in: 0 + error_debug: error_debug + status_code: 6 + c_nonce: c_nonce + error_description: error_description + format: format + error: error + error_hint: error_hint + properties: + c_nonce: + type: string + c_nonce_expires_in: + format: int64 + type: integer + error: + type: string + error_debug: + type: string + error_description: + type: string + error_hint: + type: string + format: + type: string + status_code: + format: int64 + type: integer + title: VerifiableCredentialPrimingResponse contains the nonce to include in + the proof-of-possession JWT. + type: object + verifiableCredentialResponse: + example: + credential_draft_00: credential_draft_00 + format: format + properties: + credential_draft_00: + type: string + format: + type: string + title: VerifiableCredentialResponse contains the verifiable credential. + type: object + version: + properties: + version: + description: Version is the service's version. + type: string + type: object + introspectOAuth2Token_request: + properties: + scope: + description: |- + An optional, space separated list of required scopes. If the access token was not granted one of the + scopes, the result of active will be false. + type: string + x-formData-name: scope + token: + description: |- + The string value of the token. For access tokens, this + is the "access_token" value returned from the token endpoint + defined in OAuth 2.0. For refresh tokens, this is the "refresh_token" + value returned. + required: + - token + type: string + x-formData-name: token + required: + - token + type: object + isReady_200_response: + example: + status: status + properties: + status: + description: Always "ok". + type: string + type: object + isReady_503_response: + example: + errors: + key: errors + properties: + errors: + additionalProperties: + type: string + description: Errors contains a list of errors that caused the not ready + status. + type: object + type: object + revokeOAuth2Token_request: + properties: + client_id: + type: string + x-formData-name: client_id + client_secret: + type: string + x-formData-name: client_secret + token: + required: + - token + type: string + x-formData-name: token + required: + - token + type: object + oauth2TokenExchange_request: + properties: + client_id: + type: string + x-formData-name: client_id + code: + type: string + x-formData-name: code + grant_type: + required: + - grant_type + type: string + x-formData-name: grant_type + redirect_uri: + type: string + x-formData-name: redirect_uri + refresh_token: + type: string + x-formData-name: refresh_token + required: + - grant_type + type: object + getVersion_200_response: + example: + version: version + properties: + version: + description: The version of Ory Hydra. + type: string + type: object + oAuth2ConsentSession_expires_at: + example: + access_token: 2000-01-23T04:56:07.000+00:00 + refresh_token: 2000-01-23T04:56:07.000+00:00 + par_context: 2000-01-23T04:56:07.000+00:00 + id_token: 2000-01-23T04:56:07.000+00:00 + authorize_code: 2000-01-23T04:56:07.000+00:00 + properties: + access_token: + format: date-time + type: string + authorize_code: + format: date-time + type: string + id_token: + format: date-time + type: string + par_context: + format: date-time + type: string + refresh_token: + format: date-time + type: string + type: object + securitySchemes: + basic: + scheme: basic + type: http + bearer: + scheme: bearer + type: http + oauth2: + flows: + authorizationCode: + authorizationUrl: https://hydra.demo.ory.sh/oauth2/auth + scopes: + offline: A scope required when requesting refresh tokens (alias for `offline_access`) + offline_access: A scope required when requesting refresh tokens + openid: Request an OpenID Connect ID Token + tokenUrl: https://hydra.demo.ory.sh/oauth2/token + type: oauth2 +x-forwarded-proto: string +x-request-id: string + diff --git a/clients/hydra/dotnet/docs/HydraInlineResponse2001.md b/clients/hydra/dotnet/docs/HydraGetVersion200Response.md similarity index 69% rename from clients/hydra/dotnet/docs/HydraInlineResponse2001.md rename to clients/hydra/dotnet/docs/HydraGetVersion200Response.md index 14e84d510e4..d08c5907462 100644 --- a/clients/hydra/dotnet/docs/HydraInlineResponse2001.md +++ b/clients/hydra/dotnet/docs/HydraGetVersion200Response.md @@ -1,10 +1,10 @@ -# Ory.Hydra.Client.Model.HydraInlineResponse2001 +# Ory.Hydra.Client.Model.HydraGetVersion200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Version** | **string** | The version of Ory Hydra. | [optional] +**VarVersion** | **string** | The version of Ory Hydra. | [optional] [[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/clients/hydra/dotnet/docs/HydraInlineResponse200.md b/clients/hydra/dotnet/docs/HydraIsReady200Response.md similarity index 87% rename from clients/hydra/dotnet/docs/HydraInlineResponse200.md rename to clients/hydra/dotnet/docs/HydraIsReady200Response.md index 12c6a4d78dd..673a7166cb3 100644 --- a/clients/hydra/dotnet/docs/HydraInlineResponse200.md +++ b/clients/hydra/dotnet/docs/HydraIsReady200Response.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraInlineResponse200 +# Ory.Hydra.Client.Model.HydraIsReady200Response ## Properties diff --git a/clients/hydra/dotnet/docs/HydraInlineResponse503.md b/clients/hydra/dotnet/docs/HydraIsReady503Response.md similarity index 89% rename from clients/hydra/dotnet/docs/HydraInlineResponse503.md rename to clients/hydra/dotnet/docs/HydraIsReady503Response.md index ffd2182c17c..65e015c0e55 100644 --- a/clients/hydra/dotnet/docs/HydraInlineResponse503.md +++ b/clients/hydra/dotnet/docs/HydraIsReady503Response.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraInlineResponse503 +# Ory.Hydra.Client.Model.HydraIsReady503Response ## Properties diff --git a/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md index db7c6efe61e..a7946cfa70a 100644 --- a/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Acr** | **string** | ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. | [optional] **Amr** | **List<string>** | | [optional] **Challenge** | **string** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | -**_Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | [optional] +**VarClient** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | [optional] **Context** | **Object** | | [optional] **LoginChallenge** | **string** | LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. | [optional] **LoginSessionId** | **string** | LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional] diff --git a/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md index 0c3dbbb26a6..427f9b4ef4f 100644 --- a/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Challenge** | **string** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | -**_Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | +**VarClient** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | **OidcContext** | [**HydraOAuth2ConsentRequestOpenIDConnectContext**](HydraOAuth2ConsentRequestOpenIDConnectContext.md) | | [optional] **RequestUrl** | **string** | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. | **RequestedAccessTokenAudience** | **List<string>** | | [optional] diff --git a/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md index 6c5bf7acfb5..c5b6851fd3d 100644 --- a/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Challenge** | **string** | Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. | [optional] -**_Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | [optional] +**VarClient** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | | [optional] **RequestUrl** | **string** | RequestURL is the original Logout URL requested. | [optional] **RpInitiated** | **bool** | RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. | [optional] **Sid** | **string** | SessionID is the login session ID that was requested to log out. | [optional] diff --git a/clients/hydra/dotnet/docs/HydraVersion.md b/clients/hydra/dotnet/docs/HydraVersion.md index 685c912d0bb..cc345248b85 100644 --- a/clients/hydra/dotnet/docs/HydraVersion.md +++ b/clients/hydra/dotnet/docs/HydraVersion.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Version** | **string** | Version is the service's version. | [optional] +**VarVersion** | **string** | Version is the service's version. | [optional] [[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/clients/hydra/dotnet/docs/JwkApi.md b/clients/hydra/dotnet/docs/JwkApi.md index a072d577202..d51c9451858 100644 --- a/clients/hydra/dotnet/docs/JwkApi.md +++ b/clients/hydra/dotnet/docs/JwkApi.md @@ -2,18 +2,17 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateJsonWebKeySet**](JwkApi.md#createjsonwebkeyset) | **POST** /admin/keys/{set} | Create JSON Web Key -[**DeleteJsonWebKey**](JwkApi.md#deletejsonwebkey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key -[**DeleteJsonWebKeySet**](JwkApi.md#deletejsonwebkeyset) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set -[**GetJsonWebKey**](JwkApi.md#getjsonwebkey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key -[**GetJsonWebKeySet**](JwkApi.md#getjsonwebkeyset) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set -[**SetJsonWebKey**](JwkApi.md#setjsonwebkey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key -[**SetJsonWebKeySet**](JwkApi.md#setjsonwebkeyset) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set - - - +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateJsonWebKeySet**](JwkApi.md#createjsonwebkeyset) | **POST** /admin/keys/{set} | Create JSON Web Key | +| [**DeleteJsonWebKey**](JwkApi.md#deletejsonwebkey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key | +| [**DeleteJsonWebKeySet**](JwkApi.md#deletejsonwebkeyset) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set | +| [**GetJsonWebKey**](JwkApi.md#getjsonwebkey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key | +| [**GetJsonWebKeySet**](JwkApi.md#getjsonwebkeyset) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set | +| [**SetJsonWebKey**](JwkApi.md#setjsonwebkey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key | +| [**SetJsonWebKeySet**](JwkApi.md#setjsonwebkeyset) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set | + + # **CreateJsonWebKeySet** > HydraJsonWebKeySet CreateJsonWebKeySet (string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) @@ -49,8 +48,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.CreateJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.CreateJsonWebKeySet: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -58,12 +57,32 @@ namespace Example } ``` +#### Using the CreateJsonWebKeySetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create JSON Web Key + ApiResponse response = apiInstance.CreateJsonWebKeySetWithHttpInfo(set, hydraCreateJsonWebKeySet); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.CreateJsonWebKeySetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **hydraCreateJsonWebKeySet** | [**HydraCreateJsonWebKeySet**](HydraCreateJsonWebKeySet.md)| | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | The JSON Web Key Set ID | | +| **hydraCreateJsonWebKeySet** | [**HydraCreateJsonWebKeySet**](HydraCreateJsonWebKeySet.md) | | | ### Return type @@ -87,7 +106,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteJsonWebKey** > void DeleteJsonWebKey (string set, string kid) @@ -122,8 +141,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.DeleteJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKey: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -131,12 +150,29 @@ namespace Example } ``` +#### Using the DeleteJsonWebKeyWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete JSON Web Key + apiInstance.DeleteJsonWebKeyWithHttpInfo(set, kid); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKeyWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set | - **kid** | **string**| The JSON Web Key ID (kid) | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | The JSON Web Key Set | | +| **kid** | **string** | The JSON Web Key ID (kid) | | ### Return type @@ -160,7 +196,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteJsonWebKeySet** > void DeleteJsonWebKeySet (string set) @@ -194,8 +230,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.DeleteJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKeySet: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -203,11 +239,28 @@ namespace Example } ``` +#### Using the DeleteJsonWebKeySetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete JSON Web Key Set + apiInstance.DeleteJsonWebKeySetWithHttpInfo(set); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKeySetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | The JSON Web Key Set | | ### Return type @@ -231,7 +284,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetJsonWebKey** > HydraJsonWebKeySet GetJsonWebKey (string set, string kid) @@ -267,8 +320,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.GetJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.GetJsonWebKey: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -276,12 +329,32 @@ namespace Example } ``` +#### Using the GetJsonWebKeyWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get JSON Web Key + ApiResponse response = apiInstance.GetJsonWebKeyWithHttpInfo(set, kid); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.GetJsonWebKeyWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| JSON Web Key Set ID | - **kid** | **string**| JSON Web Key ID | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | JSON Web Key Set ID | | +| **kid** | **string** | JSON Web Key ID | | ### Return type @@ -305,7 +378,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetJsonWebKeySet** > HydraJsonWebKeySet GetJsonWebKeySet (string set) @@ -340,8 +413,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.GetJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.GetJsonWebKeySet: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -349,11 +422,31 @@ namespace Example } ``` +#### Using the GetJsonWebKeySetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieve a JSON Web Key Set + ApiResponse response = apiInstance.GetJsonWebKeySetWithHttpInfo(set); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.GetJsonWebKeySetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| JSON Web Key Set ID | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | JSON Web Key Set ID | | ### Return type @@ -377,9 +470,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **SetJsonWebKey** -> HydraJsonWebKey SetJsonWebKey (string set, string kid, HydraJsonWebKey hydraJsonWebKey = null) +> HydraJsonWebKey SetJsonWebKey (string set, string kid, HydraJsonWebKey? hydraJsonWebKey = null) Set JSON Web Key @@ -404,7 +497,7 @@ namespace Example var apiInstance = new JwkApi(config); var set = "set_example"; // string | The JSON Web Key Set ID var kid = "kid_example"; // string | JSON Web Key ID - var hydraJsonWebKey = new HydraJsonWebKey(); // HydraJsonWebKey | (optional) + var hydraJsonWebKey = new HydraJsonWebKey?(); // HydraJsonWebKey? | (optional) try { @@ -414,8 +507,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.SetJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.SetJsonWebKey: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -423,13 +516,33 @@ namespace Example } ``` +#### Using the SetJsonWebKeyWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set JSON Web Key + ApiResponse response = apiInstance.SetJsonWebKeyWithHttpInfo(set, kid, hydraJsonWebKey); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.SetJsonWebKeyWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **kid** | **string**| JSON Web Key ID | - **hydraJsonWebKey** | [**HydraJsonWebKey**](HydraJsonWebKey.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | The JSON Web Key Set ID | | +| **kid** | **string** | JSON Web Key ID | | +| **hydraJsonWebKey** | [**HydraJsonWebKey?**](HydraJsonWebKey?.md) | | [optional] | ### Return type @@ -453,9 +566,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **SetJsonWebKeySet** -> HydraJsonWebKeySet SetJsonWebKeySet (string set, HydraJsonWebKeySet hydraJsonWebKeySet = null) +> HydraJsonWebKeySet SetJsonWebKeySet (string set, HydraJsonWebKeySet? hydraJsonWebKeySet = null) Update a JSON Web Key Set @@ -479,7 +592,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new JwkApi(config); var set = "set_example"; // string | The JSON Web Key Set ID - var hydraJsonWebKeySet = new HydraJsonWebKeySet(); // HydraJsonWebKeySet | (optional) + var hydraJsonWebKeySet = new HydraJsonWebKeySet?(); // HydraJsonWebKeySet? | (optional) try { @@ -489,8 +602,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling JwkApi.SetJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling JwkApi.SetJsonWebKeySet: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -498,12 +611,32 @@ namespace Example } ``` +#### Using the SetJsonWebKeySetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a JSON Web Key Set + ApiResponse response = apiInstance.SetJsonWebKeySetWithHttpInfo(set, hydraJsonWebKeySet); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling JwkApi.SetJsonWebKeySetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **hydraJsonWebKeySet** | [**HydraJsonWebKeySet**](HydraJsonWebKeySet.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **set** | **string** | The JSON Web Key Set ID | | +| **hydraJsonWebKeySet** | [**HydraJsonWebKeySet?**](HydraJsonWebKeySet?.md) | | [optional] | ### Return type diff --git a/clients/hydra/dotnet/docs/MetadataApi.md b/clients/hydra/dotnet/docs/MetadataApi.md index 61d3704fdd5..00f34121a28 100644 --- a/clients/hydra/dotnet/docs/MetadataApi.md +++ b/clients/hydra/dotnet/docs/MetadataApi.md @@ -2,16 +2,15 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetVersion**](MetadataApi.md#getversion) | **GET** /version | Return Running Software Version. -[**IsAlive**](MetadataApi.md#isalive) | **GET** /health/alive | Check HTTP Server Status -[**IsReady**](MetadataApi.md#isready) | **GET** /health/ready | Check HTTP Server and Database Status +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetVersion**](MetadataApi.md#getversion) | **GET** /version | Return Running Software Version. | +| [**IsAlive**](MetadataApi.md#isalive) | **GET** /health/alive | Check HTTP Server Status | +| [**IsReady**](MetadataApi.md#isready) | **GET** /health/ready | Check HTTP Server and Database Status | - - + # **GetVersion** -> HydraInlineResponse2001 GetVersion () +> HydraGetVersion200Response GetVersion () Return Running Software Version. @@ -38,13 +37,13 @@ namespace Example try { // Return Running Software Version. - HydraInlineResponse2001 result = apiInstance.GetVersion(); + HydraGetVersion200Response result = apiInstance.GetVersion(); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling MetadataApi.GetVersion: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling MetadataApi.GetVersion: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -52,12 +51,31 @@ namespace Example } ``` +#### Using the GetVersionWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Return Running Software Version. + ApiResponse response = apiInstance.GetVersionWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MetadataApi.GetVersionWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type -[**HydraInlineResponse2001**](HydraInlineResponse2001.md) +[**HydraGetVersion200Response**](HydraGetVersion200Response.md) ### Authorization @@ -76,7 +94,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **IsAlive** > HydraHealthStatus IsAlive () @@ -110,8 +128,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling MetadataApi.IsAlive: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling MetadataApi.IsAlive: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -119,9 +137,28 @@ namespace Example } ``` +#### Using the IsAliveWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Check HTTP Server Status + ApiResponse response = apiInstance.IsAliveWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MetadataApi.IsAliveWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type [**HydraHealthStatus**](HydraHealthStatus.md) @@ -144,9 +181,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **IsReady** -> HydraInlineResponse200 IsReady () +> HydraIsReady200Response IsReady () Check HTTP Server and Database Status @@ -173,13 +210,13 @@ namespace Example try { // Check HTTP Server and Database Status - HydraInlineResponse200 result = apiInstance.IsReady(); + HydraIsReady200Response result = apiInstance.IsReady(); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling MetadataApi.IsReady: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling MetadataApi.IsReady: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -187,12 +224,31 @@ namespace Example } ``` +#### Using the IsReadyWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Check HTTP Server and Database Status + ApiResponse response = apiInstance.IsReadyWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MetadataApi.IsReadyWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type -[**HydraInlineResponse200**](HydraInlineResponse200.md) +[**HydraIsReady200Response**](HydraIsReady200Response.md) ### Authorization diff --git a/clients/hydra/dotnet/docs/OAuth2Api.md b/clients/hydra/dotnet/docs/OAuth2Api.md index 443c49f2a50..93a5769f789 100644 --- a/clients/hydra/dotnet/docs/OAuth2Api.md +++ b/clients/hydra/dotnet/docs/OAuth2Api.md @@ -2,41 +2,40 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AcceptOAuth2ConsentRequest**](OAuth2Api.md#acceptoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request -[**AcceptOAuth2LoginRequest**](OAuth2Api.md#acceptoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request -[**AcceptOAuth2LogoutRequest**](OAuth2Api.md#acceptoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request -[**CreateOAuth2Client**](OAuth2Api.md#createoauth2client) | **POST** /admin/clients | Create OAuth 2.0 Client -[**DeleteOAuth2Client**](OAuth2Api.md#deleteoauth2client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client -[**DeleteOAuth2Token**](OAuth2Api.md#deleteoauth2token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client -[**DeleteTrustedOAuth2JwtGrantIssuer**](OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer -[**GetOAuth2Client**](OAuth2Api.md#getoauth2client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client -[**GetOAuth2ConsentRequest**](OAuth2Api.md#getoauth2consentrequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request -[**GetOAuth2LoginRequest**](OAuth2Api.md#getoauth2loginrequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request -[**GetOAuth2LogoutRequest**](OAuth2Api.md#getoauth2logoutrequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request -[**GetTrustedOAuth2JwtGrantIssuer**](OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer -[**IntrospectOAuth2Token**](OAuth2Api.md#introspectoauth2token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens -[**ListOAuth2Clients**](OAuth2Api.md#listoauth2clients) | **GET** /admin/clients | List OAuth 2.0 Clients -[**ListOAuth2ConsentSessions**](OAuth2Api.md#listoauth2consentsessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject -[**ListTrustedOAuth2JwtGrantIssuers**](OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**OAuth2Authorize**](OAuth2Api.md#oauth2authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint -[**Oauth2TokenExchange**](OAuth2Api.md#oauth2tokenexchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**PatchOAuth2Client**](OAuth2Api.md#patchoauth2client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client -[**RejectOAuth2ConsentRequest**](OAuth2Api.md#rejectoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request -[**RejectOAuth2LoginRequest**](OAuth2Api.md#rejectoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request -[**RejectOAuth2LogoutRequest**](OAuth2Api.md#rejectoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request -[**RevokeOAuth2ConsentSessions**](OAuth2Api.md#revokeoauth2consentsessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject -[**RevokeOAuth2LoginSessions**](OAuth2Api.md#revokeoauth2loginsessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID -[**RevokeOAuth2Token**](OAuth2Api.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token -[**SetOAuth2Client**](OAuth2Api.md#setoauth2client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client -[**SetOAuth2ClientLifespans**](OAuth2Api.md#setoauth2clientlifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans -[**TrustOAuth2JwtGrantIssuer**](OAuth2Api.md#trustoauth2jwtgrantissuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer - - - +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AcceptOAuth2ConsentRequest**](OAuth2Api.md#acceptoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request | +| [**AcceptOAuth2LoginRequest**](OAuth2Api.md#acceptoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request | +| [**AcceptOAuth2LogoutRequest**](OAuth2Api.md#acceptoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request | +| [**CreateOAuth2Client**](OAuth2Api.md#createoauth2client) | **POST** /admin/clients | Create OAuth 2.0 Client | +| [**DeleteOAuth2Client**](OAuth2Api.md#deleteoauth2client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client | +| [**DeleteOAuth2Token**](OAuth2Api.md#deleteoauth2token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client | +| [**DeleteTrustedOAuth2JwtGrantIssuer**](OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**GetOAuth2Client**](OAuth2Api.md#getoauth2client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client | +| [**GetOAuth2ConsentRequest**](OAuth2Api.md#getoauth2consentrequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request | +| [**GetOAuth2LoginRequest**](OAuth2Api.md#getoauth2loginrequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request | +| [**GetOAuth2LogoutRequest**](OAuth2Api.md#getoauth2logoutrequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request | +| [**GetTrustedOAuth2JwtGrantIssuer**](OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**IntrospectOAuth2Token**](OAuth2Api.md#introspectoauth2token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens | +| [**ListOAuth2Clients**](OAuth2Api.md#listoauth2clients) | **GET** /admin/clients | List OAuth 2.0 Clients | +| [**ListOAuth2ConsentSessions**](OAuth2Api.md#listoauth2consentsessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | +| [**ListTrustedOAuth2JwtGrantIssuers**](OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | +| [**OAuth2Authorize**](OAuth2Api.md#oauth2authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint | +| [**Oauth2TokenExchange**](OAuth2Api.md#oauth2tokenexchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint | +| [**PatchOAuth2Client**](OAuth2Api.md#patchoauth2client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client | +| [**RejectOAuth2ConsentRequest**](OAuth2Api.md#rejectoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request | +| [**RejectOAuth2LoginRequest**](OAuth2Api.md#rejectoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request | +| [**RejectOAuth2LogoutRequest**](OAuth2Api.md#rejectoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request | +| [**RevokeOAuth2ConsentSessions**](OAuth2Api.md#revokeoauth2consentsessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject | +| [**RevokeOAuth2LoginSessions**](OAuth2Api.md#revokeoauth2loginsessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID | +| [**RevokeOAuth2Token**](OAuth2Api.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token | +| [**SetOAuth2Client**](OAuth2Api.md#setoauth2client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client | +| [**SetOAuth2ClientLifespans**](OAuth2Api.md#setoauth2clientlifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans | +| [**TrustOAuth2JwtGrantIssuer**](OAuth2Api.md#trustoauth2jwtgrantissuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer | + + # **AcceptOAuth2ConsentRequest** -> HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest (string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = null) +> HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest (string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = null) Accept OAuth 2.0 Consent Request @@ -60,7 +59,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var consentChallenge = "consentChallenge_example"; // string | OAuth 2.0 Consent Request Challenge - var hydraAcceptOAuth2ConsentRequest = new HydraAcceptOAuth2ConsentRequest(); // HydraAcceptOAuth2ConsentRequest | (optional) + var hydraAcceptOAuth2ConsentRequest = new HydraAcceptOAuth2ConsentRequest?(); // HydraAcceptOAuth2ConsentRequest? | (optional) try { @@ -70,8 +69,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2ConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2ConsentRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -79,12 +78,32 @@ namespace Example } ``` +#### Using the AcceptOAuth2ConsentRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Accept OAuth 2.0 Consent Request + ApiResponse response = apiInstance.AcceptOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraAcceptOAuth2ConsentRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2ConsentRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | - **hydraAcceptOAuth2ConsentRequest** | [**HydraAcceptOAuth2ConsentRequest**](HydraAcceptOAuth2ConsentRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | | +| **hydraAcceptOAuth2ConsentRequest** | [**HydraAcceptOAuth2ConsentRequest?**](HydraAcceptOAuth2ConsentRequest?.md) | | [optional] | ### Return type @@ -108,9 +127,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **AcceptOAuth2LoginRequest** -> HydraOAuth2RedirectTo AcceptOAuth2LoginRequest (string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = null) +> HydraOAuth2RedirectTo AcceptOAuth2LoginRequest (string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = null) Accept OAuth 2.0 Login Request @@ -134,7 +153,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var loginChallenge = "loginChallenge_example"; // string | OAuth 2.0 Login Request Challenge - var hydraAcceptOAuth2LoginRequest = new HydraAcceptOAuth2LoginRequest(); // HydraAcceptOAuth2LoginRequest | (optional) + var hydraAcceptOAuth2LoginRequest = new HydraAcceptOAuth2LoginRequest?(); // HydraAcceptOAuth2LoginRequest? | (optional) try { @@ -144,8 +163,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LoginRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -153,12 +172,32 @@ namespace Example } ``` +#### Using the AcceptOAuth2LoginRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Accept OAuth 2.0 Login Request + ApiResponse response = apiInstance.AcceptOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraAcceptOAuth2LoginRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LoginRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | - **hydraAcceptOAuth2LoginRequest** | [**HydraAcceptOAuth2LoginRequest**](HydraAcceptOAuth2LoginRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | | +| **hydraAcceptOAuth2LoginRequest** | [**HydraAcceptOAuth2LoginRequest?**](HydraAcceptOAuth2LoginRequest?.md) | | [optional] | ### Return type @@ -182,7 +221,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **AcceptOAuth2LogoutRequest** > HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest (string logoutChallenge) @@ -217,8 +256,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LogoutRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -226,11 +265,31 @@ namespace Example } ``` +#### Using the AcceptOAuth2LogoutRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Accept OAuth 2.0 Session Logout Request + ApiResponse response = apiInstance.AcceptOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LogoutRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| OAuth 2.0 Logout Request Challenge | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **logoutChallenge** | **string** | OAuth 2.0 Logout Request Challenge | | ### Return type @@ -254,7 +313,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **CreateOAuth2Client** > HydraOAuth2Client CreateOAuth2Client (HydraOAuth2Client hydraOAuth2Client) @@ -289,8 +348,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.CreateOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.CreateOAuth2Client: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -298,11 +357,31 @@ namespace Example } ``` +#### Using the CreateOAuth2ClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create OAuth 2.0 Client + ApiResponse response = apiInstance.CreateOAuth2ClientWithHttpInfo(hydraOAuth2Client); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.CreateOAuth2ClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | OAuth 2.0 Client Request Body | | ### Return type @@ -327,7 +406,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteOAuth2Client** > void DeleteOAuth2Client (string id) @@ -361,8 +440,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Client: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -370,11 +449,28 @@ namespace Example } ``` +#### Using the DeleteOAuth2ClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete OAuth 2.0 Client + apiInstance.DeleteOAuth2ClientWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2ClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the OAuth 2.0 Client. | | ### Return type @@ -398,7 +494,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteOAuth2Token** > void DeleteOAuth2Token (string clientId) @@ -432,8 +528,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Token: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -441,11 +537,28 @@ namespace Example } ``` +#### Using the DeleteOAuth2TokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + apiInstance.DeleteOAuth2TokenWithHttpInfo(clientId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2TokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **string**| OAuth 2.0 Client ID | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **clientId** | **string** | OAuth 2.0 Client ID | | ### Return type @@ -469,7 +582,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteTrustedOAuth2JwtGrantIssuer** > void DeleteTrustedOAuth2JwtGrantIssuer (string id) @@ -503,8 +616,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -512,11 +625,28 @@ namespace Example } ``` +#### Using the DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + apiInstance.DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the desired grant | | ### Return type @@ -540,7 +670,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOAuth2Client** > HydraOAuth2Client GetOAuth2Client (string id) @@ -575,8 +705,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.GetOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.GetOAuth2Client: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -584,11 +714,31 @@ namespace Example } ``` +#### Using the GetOAuth2ClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an OAuth 2.0 Client + ApiResponse response = apiInstance.GetOAuth2ClientWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.GetOAuth2ClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the OAuth 2.0 Client. | | ### Return type @@ -612,7 +762,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOAuth2ConsentRequest** > HydraOAuth2ConsentRequest GetOAuth2ConsentRequest (string consentChallenge) @@ -647,8 +797,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.GetOAuth2ConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.GetOAuth2ConsentRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -656,11 +806,31 @@ namespace Example } ``` +#### Using the GetOAuth2ConsentRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get OAuth 2.0 Consent Request + ApiResponse response = apiInstance.GetOAuth2ConsentRequestWithHttpInfo(consentChallenge); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.GetOAuth2ConsentRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | | ### Return type @@ -685,7 +855,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOAuth2LoginRequest** > HydraOAuth2LoginRequest GetOAuth2LoginRequest (string loginChallenge) @@ -720,8 +890,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.GetOAuth2LoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LoginRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -729,11 +899,31 @@ namespace Example } ``` +#### Using the GetOAuth2LoginRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get OAuth 2.0 Login Request + ApiResponse response = apiInstance.GetOAuth2LoginRequestWithHttpInfo(loginChallenge); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LoginRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | | ### Return type @@ -758,7 +948,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOAuth2LogoutRequest** > HydraOAuth2LogoutRequest GetOAuth2LogoutRequest (string logoutChallenge) @@ -793,8 +983,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.GetOAuth2LogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LogoutRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -802,11 +992,31 @@ namespace Example } ``` +#### Using the GetOAuth2LogoutRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get OAuth 2.0 Session Logout Request + ApiResponse response = apiInstance.GetOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LogoutRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **logoutChallenge** | **string** | | | ### Return type @@ -831,7 +1041,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetTrustedOAuth2JwtGrantIssuer** > HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer (string id) @@ -866,8 +1076,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.GetTrustedOAuth2JwtGrantIssuer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.GetTrustedOAuth2JwtGrantIssuer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -875,11 +1085,31 @@ namespace Example } ``` +#### Using the GetTrustedOAuth2JwtGrantIssuerWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Trusted OAuth2 JWT Bearer Grant Type Issuer + ApiResponse response = apiInstance.GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.GetTrustedOAuth2JwtGrantIssuerWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the desired grant | | ### Return type @@ -903,9 +1133,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **IntrospectOAuth2Token** -> HydraIntrospectedOAuth2Token IntrospectOAuth2Token (string token, string scope = null) +> HydraIntrospectedOAuth2Token IntrospectOAuth2Token (string token, string? scope = null) Introspect OAuth2 Access and Refresh Tokens @@ -929,7 +1159,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var token = "token_example"; // string | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. - var scope = "scope_example"; // string | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + var scope = "scope_example"; // string? | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) try { @@ -939,8 +1169,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.IntrospectOAuth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.IntrospectOAuth2Token: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -948,12 +1178,32 @@ namespace Example } ``` +#### Using the IntrospectOAuth2TokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Introspect OAuth2 Access and Refresh Tokens + ApiResponse response = apiInstance.IntrospectOAuth2TokenWithHttpInfo(token, scope); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.IntrospectOAuth2TokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | - **scope** | **string**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **token** | **string** | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | | +| **scope** | **string?** | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] | ### Return type @@ -977,9 +1227,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **ListOAuth2Clients** -> List<HydraOAuth2Client> ListOAuth2Clients (long? pageSize = null, string pageToken = null, string clientName = null, string owner = null) +> List<HydraOAuth2Client> ListOAuth2Clients (long? pageSize = null, string? pageToken = null, string? clientName = null, string? owner = null) List OAuth 2.0 Clients @@ -1003,9 +1253,9 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var pageSize = 250L; // long? | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) - var pageToken = "\"1\""; // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") - var clientName = "clientName_example"; // string | The name of the clients to filter by. (optional) - var owner = "owner_example"; // string | The owner of the clients to filter by. (optional) + var pageToken = "\"1\""; // string? | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") + var clientName = "clientName_example"; // string? | The name of the clients to filter by. (optional) + var owner = "owner_example"; // string? | The owner of the clients to filter by. (optional) try { @@ -1015,8 +1265,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.ListOAuth2Clients: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.ListOAuth2Clients: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1024,14 +1274,34 @@ namespace Example } ``` +#### Using the ListOAuth2ClientsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List OAuth 2.0 Clients + ApiResponse> response = apiInstance.ListOAuth2ClientsWithHttpInfo(pageSize, pageToken, clientName, owner); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.ListOAuth2ClientsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pageSize** | **long?**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] - **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to "1"] - **clientName** | **string**| The name of the clients to filter by. | [optional] - **owner** | **string**| The owner of the clients to filter by. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **pageSize** | **long?** | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] | +| **pageToken** | **string?** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to "1"] | +| **clientName** | **string?** | The name of the clients to filter by. | [optional] | +| **owner** | **string?** | The owner of the clients to filter by. | [optional] | ### Return type @@ -1055,9 +1325,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **ListOAuth2ConsentSessions** -> List<HydraOAuth2ConsentSession> ListOAuth2ConsentSessions (string subject, long? pageSize = null, string pageToken = null, string loginSessionId = null) +> List<HydraOAuth2ConsentSession> ListOAuth2ConsentSessions (string subject, long? pageSize = null, string? pageToken = null, string? loginSessionId = null) List OAuth 2.0 Consent Sessions of a Subject @@ -1082,8 +1352,8 @@ namespace Example var apiInstance = new OAuth2Api(config); var subject = "subject_example"; // string | The subject to list the consent sessions for. var pageSize = 250L; // long? | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) - var pageToken = "\"1\""; // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") - var loginSessionId = "loginSessionId_example"; // string | The login session id to list the consent sessions for. (optional) + var pageToken = "\"1\""; // string? | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") + var loginSessionId = "loginSessionId_example"; // string? | The login session id to list the consent sessions for. (optional) try { @@ -1093,8 +1363,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.ListOAuth2ConsentSessions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.ListOAuth2ConsentSessions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1102,14 +1372,34 @@ namespace Example } ``` +#### Using the ListOAuth2ConsentSessionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List OAuth 2.0 Consent Sessions of a Subject + ApiResponse> response = apiInstance.ListOAuth2ConsentSessionsWithHttpInfo(subject, pageSize, pageToken, loginSessionId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.ListOAuth2ConsentSessionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| The subject to list the consent sessions for. | - **pageSize** | **long?**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] - **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to "1"] - **loginSessionId** | **string**| The login session id to list the consent sessions for. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **subject** | **string** | The subject to list the consent sessions for. | | +| **pageSize** | **long?** | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] | +| **pageToken** | **string?** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to "1"] | +| **loginSessionId** | **string?** | The login session id to list the consent sessions for. | [optional] | ### Return type @@ -1133,9 +1423,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **ListTrustedOAuth2JwtGrantIssuers** -> List<HydraTrustedOAuth2JwtGrantIssuer> ListTrustedOAuth2JwtGrantIssuers (long? maxItems = null, long? defaultItems = null, string issuer = null) +> List<HydraTrustedOAuth2JwtGrantIssuer> ListTrustedOAuth2JwtGrantIssuers (long? maxItems = null, long? defaultItems = null, string? issuer = null) List Trusted OAuth2 JWT Bearer Grant Type Issuers @@ -1160,7 +1450,7 @@ namespace Example var apiInstance = new OAuth2Api(config); var maxItems = 789L; // long? | (optional) var defaultItems = 789L; // long? | (optional) - var issuer = "issuer_example"; // string | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + var issuer = "issuer_example"; // string? | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) try { @@ -1170,8 +1460,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.ListTrustedOAuth2JwtGrantIssuers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.ListTrustedOAuth2JwtGrantIssuers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1179,13 +1469,33 @@ namespace Example } ``` +#### Using the ListTrustedOAuth2JwtGrantIssuersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Trusted OAuth2 JWT Bearer Grant Type Issuers + ApiResponse> response = apiInstance.ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(maxItems, defaultItems, issuer); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.ListTrustedOAuth2JwtGrantIssuersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **maxItems** | **long?**| | [optional] - **defaultItems** | **long?**| | [optional] - **issuer** | **string**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **maxItems** | **long?** | | [optional] | +| **defaultItems** | **long?** | | [optional] | +| **issuer** | **string?** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] | ### Return type @@ -1209,7 +1519,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **OAuth2Authorize** > HydraErrorOAuth2 OAuth2Authorize () @@ -1243,8 +1553,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.OAuth2Authorize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.OAuth2Authorize: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1252,9 +1562,28 @@ namespace Example } ``` +#### Using the OAuth2AuthorizeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // OAuth 2.0 Authorize Endpoint + ApiResponse response = apiInstance.OAuth2AuthorizeWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.OAuth2AuthorizeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type [**HydraErrorOAuth2**](HydraErrorOAuth2.md) @@ -1277,9 +1606,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **Oauth2TokenExchange** -> HydraOAuth2TokenExchange Oauth2TokenExchange (string grantType, string clientId = null, string code = null, string redirectUri = null, string refreshToken = null) +> HydraOAuth2TokenExchange Oauth2TokenExchange (string grantType, string? clientId = null, string? code = null, string? redirectUri = null, string? refreshToken = null) The OAuth 2.0 Token Endpoint @@ -1309,10 +1638,10 @@ namespace Example var apiInstance = new OAuth2Api(config); var grantType = "grantType_example"; // string | - var clientId = "clientId_example"; // string | (optional) - var code = "code_example"; // string | (optional) - var redirectUri = "redirectUri_example"; // string | (optional) - var refreshToken = "refreshToken_example"; // string | (optional) + var clientId = "clientId_example"; // string? | (optional) + var code = "code_example"; // string? | (optional) + var redirectUri = "redirectUri_example"; // string? | (optional) + var refreshToken = "refreshToken_example"; // string? | (optional) try { @@ -1322,8 +1651,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.Oauth2TokenExchange: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.Oauth2TokenExchange: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1331,15 +1660,35 @@ namespace Example } ``` +#### Using the Oauth2TokenExchangeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // The OAuth 2.0 Token Endpoint + ApiResponse response = apiInstance.Oauth2TokenExchangeWithHttpInfo(grantType, clientId, code, redirectUri, refreshToken); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.Oauth2TokenExchangeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string**| | - **clientId** | **string**| | [optional] - **code** | **string**| | [optional] - **redirectUri** | **string**| | [optional] - **refreshToken** | **string**| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **grantType** | **string** | | | +| **clientId** | **string?** | | [optional] | +| **code** | **string?** | | [optional] | +| **redirectUri** | **string?** | | [optional] | +| **refreshToken** | **string?** | | [optional] | ### Return type @@ -1363,7 +1712,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **PatchOAuth2Client** > HydraOAuth2Client PatchOAuth2Client (string id, List hydraJsonPatch) @@ -1399,8 +1748,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.PatchOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.PatchOAuth2Client: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1408,12 +1757,32 @@ namespace Example } ``` +#### Using the PatchOAuth2ClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Patch OAuth 2.0 Client + ApiResponse response = apiInstance.PatchOAuth2ClientWithHttpInfo(id, hydraJsonPatch); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.PatchOAuth2ClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - **hydraJsonPatch** | [**List<HydraJsonPatch>**](HydraJsonPatch.md)| OAuth 2.0 Client JSON Patch Body | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the OAuth 2.0 Client. | | +| **hydraJsonPatch** | [**List<HydraJsonPatch>**](HydraJsonPatch.md) | OAuth 2.0 Client JSON Patch Body | | ### Return type @@ -1438,9 +1807,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RejectOAuth2ConsentRequest** -> HydraOAuth2RedirectTo RejectOAuth2ConsentRequest (string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = null) +> HydraOAuth2RedirectTo RejectOAuth2ConsentRequest (string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = null) Reject OAuth 2.0 Consent Request @@ -1464,7 +1833,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var consentChallenge = "consentChallenge_example"; // string | OAuth 2.0 Consent Request Challenge - var hydraRejectOAuth2Request = new HydraRejectOAuth2Request(); // HydraRejectOAuth2Request | (optional) + var hydraRejectOAuth2Request = new HydraRejectOAuth2Request?(); // HydraRejectOAuth2Request? | (optional) try { @@ -1474,8 +1843,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RejectOAuth2ConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2ConsentRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1483,12 +1852,32 @@ namespace Example } ``` +#### Using the RejectOAuth2ConsentRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Reject OAuth 2.0 Consent Request + ApiResponse response = apiInstance.RejectOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraRejectOAuth2Request); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2ConsentRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | - **hydraRejectOAuth2Request** | [**HydraRejectOAuth2Request**](HydraRejectOAuth2Request.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | | +| **hydraRejectOAuth2Request** | [**HydraRejectOAuth2Request?**](HydraRejectOAuth2Request?.md) | | [optional] | ### Return type @@ -1512,9 +1901,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RejectOAuth2LoginRequest** -> HydraOAuth2RedirectTo RejectOAuth2LoginRequest (string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = null) +> HydraOAuth2RedirectTo RejectOAuth2LoginRequest (string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = null) Reject OAuth 2.0 Login Request @@ -1538,7 +1927,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var loginChallenge = "loginChallenge_example"; // string | OAuth 2.0 Login Request Challenge - var hydraRejectOAuth2Request = new HydraRejectOAuth2Request(); // HydraRejectOAuth2Request | (optional) + var hydraRejectOAuth2Request = new HydraRejectOAuth2Request?(); // HydraRejectOAuth2Request? | (optional) try { @@ -1548,8 +1937,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LoginRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1557,12 +1946,32 @@ namespace Example } ``` +#### Using the RejectOAuth2LoginRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Reject OAuth 2.0 Login Request + ApiResponse response = apiInstance.RejectOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraRejectOAuth2Request); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LoginRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | - **hydraRejectOAuth2Request** | [**HydraRejectOAuth2Request**](HydraRejectOAuth2Request.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | | +| **hydraRejectOAuth2Request** | [**HydraRejectOAuth2Request?**](HydraRejectOAuth2Request?.md) | | [optional] | ### Return type @@ -1586,7 +1995,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RejectOAuth2LogoutRequest** > void RejectOAuth2LogoutRequest (string logoutChallenge) @@ -1620,8 +2029,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LogoutRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1629,11 +2038,28 @@ namespace Example } ``` +#### Using the RejectOAuth2LogoutRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Reject OAuth 2.0 Session Logout Request + apiInstance.RejectOAuth2LogoutRequestWithHttpInfo(logoutChallenge); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LogoutRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **logoutChallenge** | **string** | | | ### Return type @@ -1657,9 +2083,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RevokeOAuth2ConsentSessions** -> void RevokeOAuth2ConsentSessions (string subject, string _client = null, bool? all = null) +> void RevokeOAuth2ConsentSessions (string subject, string? varClient = null, bool? all = null) Revoke OAuth 2.0 Consent Sessions of a Subject @@ -1683,18 +2109,18 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var subject = "subject_example"; // string | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - var _client = "_client_example"; // string | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + var varClient = "varClient_example"; // string? | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) var all = true; // bool? | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) try { // Revoke OAuth 2.0 Consent Sessions of a Subject - apiInstance.RevokeOAuth2ConsentSessions(subject, _client, all); + apiInstance.RevokeOAuth2ConsentSessions(subject, varClient, all); } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2ConsentSessions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2ConsentSessions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1702,13 +2128,30 @@ namespace Example } ``` +#### Using the RevokeOAuth2ConsentSessionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Revoke OAuth 2.0 Consent Sessions of a Subject + apiInstance.RevokeOAuth2ConsentSessionsWithHttpInfo(subject, varClient, all); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2ConsentSessionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | - **_client** | **string**| OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] - **all** | **bool?**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **subject** | **string** | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | | +| **varClient** | **string?** | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] | +| **all** | **bool?** | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] | ### Return type @@ -1732,9 +2175,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RevokeOAuth2LoginSessions** -> void RevokeOAuth2LoginSessions (string subject = null, string sid = null) +> void RevokeOAuth2LoginSessions (string? subject = null, string? sid = null) Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID @@ -1757,8 +2200,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); - var subject = "subject_example"; // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) - var sid = "sid_example"; // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + var subject = "subject_example"; // string? | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + var sid = "sid_example"; // string? | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) try { @@ -1767,8 +2210,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2LoginSessions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2LoginSessions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1776,12 +2219,29 @@ namespace Example } ``` +#### Using the RevokeOAuth2LoginSessionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + apiInstance.RevokeOAuth2LoginSessionsWithHttpInfo(subject, sid); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2LoginSessionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] - **sid** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **subject** | **string?** | OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] | +| **sid** | **string?** | OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] | ### Return type @@ -1805,9 +2265,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RevokeOAuth2Token** -> void RevokeOAuth2Token (string token, string clientId = null, string clientSecret = null) +> void RevokeOAuth2Token (string token, string? clientId = null, string? clientSecret = null) Revoke OAuth 2.0 Access or Refresh Token @@ -1837,8 +2297,8 @@ namespace Example var apiInstance = new OAuth2Api(config); var token = "token_example"; // string | - var clientId = "clientId_example"; // string | (optional) - var clientSecret = "clientSecret_example"; // string | (optional) + var clientId = "clientId_example"; // string? | (optional) + var clientSecret = "clientSecret_example"; // string? | (optional) try { @@ -1847,8 +2307,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2Token: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1856,13 +2316,30 @@ namespace Example } ``` +#### Using the RevokeOAuth2TokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Revoke OAuth 2.0 Access or Refresh Token + apiInstance.RevokeOAuth2TokenWithHttpInfo(token, clientId, clientSecret); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2TokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| | - **clientId** | **string**| | [optional] - **clientSecret** | **string**| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **token** | **string** | | | +| **clientId** | **string?** | | [optional] | +| **clientSecret** | **string?** | | [optional] | ### Return type @@ -1886,7 +2363,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **SetOAuth2Client** > HydraOAuth2Client SetOAuth2Client (string id, HydraOAuth2Client hydraOAuth2Client) @@ -1922,8 +2399,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.SetOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.SetOAuth2Client: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1931,12 +2408,32 @@ namespace Example } ``` +#### Using the SetOAuth2ClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set OAuth 2.0 Client + ApiResponse response = apiInstance.SetOAuth2ClientWithHttpInfo(id, hydraOAuth2Client); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.SetOAuth2ClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | OAuth 2.0 Client ID | | +| **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | OAuth 2.0 Client Request Body | | ### Return type @@ -1962,9 +2459,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **SetOAuth2ClientLifespans** -> HydraOAuth2Client SetOAuth2ClientLifespans (string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = null) +> HydraOAuth2Client SetOAuth2ClientLifespans (string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = null) Set OAuth2 Client Token Lifespans @@ -1988,7 +2485,7 @@ namespace Example config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); var id = "id_example"; // string | OAuth 2.0 Client ID - var hydraOAuth2ClientTokenLifespans = new HydraOAuth2ClientTokenLifespans(); // HydraOAuth2ClientTokenLifespans | (optional) + var hydraOAuth2ClientTokenLifespans = new HydraOAuth2ClientTokenLifespans?(); // HydraOAuth2ClientTokenLifespans? | (optional) try { @@ -1998,8 +2495,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.SetOAuth2ClientLifespans: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.SetOAuth2ClientLifespans: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2007,12 +2504,32 @@ namespace Example } ``` +#### Using the SetOAuth2ClientLifespansWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set OAuth2 Client Token Lifespans + ApiResponse response = apiInstance.SetOAuth2ClientLifespansWithHttpInfo(id, hydraOAuth2ClientTokenLifespans); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.SetOAuth2ClientLifespansWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **hydraOAuth2ClientTokenLifespans** | [**HydraOAuth2ClientTokenLifespans**](HydraOAuth2ClientTokenLifespans.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | OAuth 2.0 Client ID | | +| **hydraOAuth2ClientTokenLifespans** | [**HydraOAuth2ClientTokenLifespans?**](HydraOAuth2ClientTokenLifespans?.md) | | [optional] | ### Return type @@ -2036,9 +2553,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **TrustOAuth2JwtGrantIssuer** -> HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer (HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = null) +> HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer (HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = null) Trust OAuth2 JWT Bearer Grant Type Issuer @@ -2061,7 +2578,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new OAuth2Api(config); - var hydraTrustOAuth2JwtGrantIssuer = new HydraTrustOAuth2JwtGrantIssuer(); // HydraTrustOAuth2JwtGrantIssuer | (optional) + var hydraTrustOAuth2JwtGrantIssuer = new HydraTrustOAuth2JwtGrantIssuer?(); // HydraTrustOAuth2JwtGrantIssuer? | (optional) try { @@ -2071,8 +2588,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OAuth2Api.TrustOAuth2JwtGrantIssuer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OAuth2Api.TrustOAuth2JwtGrantIssuer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2080,11 +2597,31 @@ namespace Example } ``` +#### Using the TrustOAuth2JwtGrantIssuerWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Trust OAuth2 JWT Bearer Grant Type Issuer + ApiResponse response = apiInstance.TrustOAuth2JwtGrantIssuerWithHttpInfo(hydraTrustOAuth2JwtGrantIssuer); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OAuth2Api.TrustOAuth2JwtGrantIssuerWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hydraTrustOAuth2JwtGrantIssuer** | [**HydraTrustOAuth2JwtGrantIssuer**](HydraTrustOAuth2JwtGrantIssuer.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **hydraTrustOAuth2JwtGrantIssuer** | [**HydraTrustOAuth2JwtGrantIssuer?**](HydraTrustOAuth2JwtGrantIssuer?.md) | | [optional] | ### Return type diff --git a/clients/hydra/dotnet/docs/OidcApi.md b/clients/hydra/dotnet/docs/OidcApi.md index 2babceaf34a..6c831cb1eac 100644 --- a/clients/hydra/dotnet/docs/OidcApi.md +++ b/clients/hydra/dotnet/docs/OidcApi.md @@ -2,19 +2,18 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOidcDynamicClient**](OidcApi.md#createoidcdynamicclient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration -[**CreateVerifiableCredential**](OidcApi.md#createverifiablecredential) | **POST** /credentials | Issues a Verifiable Credential -[**DeleteOidcDynamicClient**](OidcApi.md#deleteoidcdynamicclient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol -[**DiscoverOidcConfiguration**](OidcApi.md#discoveroidcconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**GetOidcDynamicClient**](OidcApi.md#getoidcdynamicclient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration -[**GetOidcUserInfo**](OidcApi.md#getoidcuserinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**RevokeOidcSession**](OidcApi.md#revokeoidcsession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout -[**SetOidcDynamicClient**](OidcApi.md#setoidcdynamicclient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration - - - +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateOidcDynamicClient**](OidcApi.md#createoidcdynamicclient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration | +| [**CreateVerifiableCredential**](OidcApi.md#createverifiablecredential) | **POST** /credentials | Issues a Verifiable Credential | +| [**DeleteOidcDynamicClient**](OidcApi.md#deleteoidcdynamicclient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol | +| [**DiscoverOidcConfiguration**](OidcApi.md#discoveroidcconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery | +| [**GetOidcDynamicClient**](OidcApi.md#getoidcdynamicclient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration | +| [**GetOidcUserInfo**](OidcApi.md#getoidcuserinfo) | **GET** /userinfo | OpenID Connect Userinfo | +| [**RevokeOidcSession**](OidcApi.md#revokeoidcsession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout | +| [**SetOidcDynamicClient**](OidcApi.md#setoidcdynamicclient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration | + + # **CreateOidcDynamicClient** > HydraOAuth2Client CreateOidcDynamicClient (HydraOAuth2Client hydraOAuth2Client) @@ -49,8 +48,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.CreateOidcDynamicClient: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.CreateOidcDynamicClient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -58,11 +57,31 @@ namespace Example } ``` +#### Using the CreateOidcDynamicClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Register OAuth2 Client using OpenID Dynamic Client Registration + ApiResponse response = apiInstance.CreateOidcDynamicClientWithHttpInfo(hydraOAuth2Client); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.CreateOidcDynamicClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| Dynamic Client Registration Request Body | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | Dynamic Client Registration Request Body | | ### Return type @@ -87,9 +106,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **CreateVerifiableCredential** -> HydraVerifiableCredentialResponse CreateVerifiableCredential (HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = null) +> HydraVerifiableCredentialResponse CreateVerifiableCredential (HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = null) Issues a Verifiable Credential @@ -112,7 +131,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new OidcApi(config); - var hydraCreateVerifiableCredentialRequestBody = new HydraCreateVerifiableCredentialRequestBody(); // HydraCreateVerifiableCredentialRequestBody | (optional) + var hydraCreateVerifiableCredentialRequestBody = new HydraCreateVerifiableCredentialRequestBody?(); // HydraCreateVerifiableCredentialRequestBody? | (optional) try { @@ -122,8 +141,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.CreateVerifiableCredential: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.CreateVerifiableCredential: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -131,11 +150,31 @@ namespace Example } ``` +#### Using the CreateVerifiableCredentialWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Issues a Verifiable Credential + ApiResponse response = apiInstance.CreateVerifiableCredentialWithHttpInfo(hydraCreateVerifiableCredentialRequestBody); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.CreateVerifiableCredentialWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hydraCreateVerifiableCredentialRequestBody** | [**HydraCreateVerifiableCredentialRequestBody**](HydraCreateVerifiableCredentialRequestBody.md)| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **hydraCreateVerifiableCredentialRequestBody** | [**HydraCreateVerifiableCredentialRequestBody?**](HydraCreateVerifiableCredentialRequestBody?.md) | | [optional] | ### Return type @@ -160,7 +199,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DeleteOidcDynamicClient** > void DeleteOidcDynamicClient (string id) @@ -197,8 +236,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.DeleteOidcDynamicClient: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.DeleteOidcDynamicClient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -206,11 +245,28 @@ namespace Example } ``` +#### Using the DeleteOidcDynamicClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + apiInstance.DeleteOidcDynamicClientWithHttpInfo(id); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.DeleteOidcDynamicClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the OAuth 2.0 Client. | | ### Return type @@ -234,7 +290,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **DiscoverOidcConfiguration** > HydraOidcConfiguration DiscoverOidcConfiguration () @@ -268,8 +324,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.DiscoverOidcConfiguration: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.DiscoverOidcConfiguration: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -277,9 +333,28 @@ namespace Example } ``` +#### Using the DiscoverOidcConfigurationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // OpenID Connect Discovery + ApiResponse response = apiInstance.DiscoverOidcConfigurationWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.DiscoverOidcConfigurationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type [**HydraOidcConfiguration**](HydraOidcConfiguration.md) @@ -302,7 +377,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOidcDynamicClient** > HydraOAuth2Client GetOidcDynamicClient (string id) @@ -340,8 +415,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.GetOidcDynamicClient: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.GetOidcDynamicClient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -349,11 +424,31 @@ namespace Example } ``` +#### Using the GetOidcDynamicClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get OAuth2 Client using OpenID Dynamic Client Registration + ApiResponse response = apiInstance.GetOidcDynamicClientWithHttpInfo(id); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.GetOidcDynamicClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | The id of the OAuth 2.0 Client. | | ### Return type @@ -377,7 +472,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetOidcUserInfo** > HydraOidcUserInfo GetOidcUserInfo () @@ -414,8 +509,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.GetOidcUserInfo: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.GetOidcUserInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -423,9 +518,28 @@ namespace Example } ``` +#### Using the GetOidcUserInfoWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // OpenID Connect Userinfo + ApiResponse response = apiInstance.GetOidcUserInfoWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.GetOidcUserInfoWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type [**HydraOidcUserInfo**](HydraOidcUserInfo.md) @@ -448,7 +562,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **RevokeOidcSession** > void RevokeOidcSession () @@ -481,8 +595,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.RevokeOidcSession: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.RevokeOidcSession: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -490,9 +604,25 @@ namespace Example } ``` +#### Using the RevokeOidcSessionWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // OpenID Connect Front- and Back-channel Enabled Logout + apiInstance.RevokeOidcSessionWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.RevokeOidcSessionWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type void (empty response body) @@ -514,7 +644,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **SetOidcDynamicClient** > HydraOAuth2Client SetOidcDynamicClient (string id, HydraOAuth2Client hydraOAuth2Client) @@ -553,8 +683,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling OidcApi.SetOidcDynamicClient: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling OidcApi.SetOidcDynamicClient: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -562,12 +692,32 @@ namespace Example } ``` +#### Using the SetOidcDynamicClientWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Set OAuth2 Client using OpenID Dynamic Client Registration + ApiResponse response = apiInstance.SetOidcDynamicClientWithHttpInfo(id, hydraOAuth2Client); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OidcApi.SetOidcDynamicClientWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | OAuth 2.0 Client ID | | +| **hydraOAuth2Client** | [**HydraOAuth2Client**](HydraOAuth2Client.md) | OAuth 2.0 Client Request Body | | ### Return type diff --git a/clients/hydra/dotnet/docs/WellknownApi.md b/clients/hydra/dotnet/docs/WellknownApi.md index 59a26805c79..d1a008310c5 100644 --- a/clients/hydra/dotnet/docs/WellknownApi.md +++ b/clients/hydra/dotnet/docs/WellknownApi.md @@ -2,12 +2,11 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DiscoverJsonWebKeys**](WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**DiscoverJsonWebKeys**](WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys | - - + # **DiscoverJsonWebKeys** > HydraJsonWebKeySet DiscoverJsonWebKeys () @@ -41,8 +40,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WellknownApi.DiscoverJsonWebKeys: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling WellknownApi.DiscoverJsonWebKeys: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -50,9 +49,28 @@ namespace Example } ``` +#### Using the DiscoverJsonWebKeysWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Discover Well-Known JSON Web Keys + ApiResponse response = apiInstance.DiscoverJsonWebKeysWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling WellknownApi.DiscoverJsonWebKeysWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters This endpoint does not need any parameter. - ### Return type [**HydraJsonWebKeySet**](HydraJsonWebKeySet.md) diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs index 83d7051a230..07513b47f31 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -125,7 +125,7 @@ public void SetJsonWebKeyTest() // TODO uncomment below to test the method and replace null with proper value //string set = null; //string kid = null; - //HydraJsonWebKey hydraJsonWebKey = null; + //HydraJsonWebKey? hydraJsonWebKey = null; //var response = instance.SetJsonWebKey(set, kid, hydraJsonWebKey); //Assert.IsType(response); } @@ -138,7 +138,7 @@ public void SetJsonWebKeySetTest() { // TODO uncomment below to test the method and replace null with proper value //string set = null; - //HydraJsonWebKeySet hydraJsonWebKeySet = null; + //HydraJsonWebKeySet? hydraJsonWebKeySet = null; //var response = instance.SetJsonWebKeySet(set, hydraJsonWebKeySet); //Assert.IsType(response); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/MetadataApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/MetadataApiTests.cs index 88619113b8e..7a4207155d1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/MetadataApiTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/MetadataApiTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public void GetVersionTest() { // TODO uncomment below to test the method and replace null with proper value //var response = instance.GetVersion(); - //Assert.IsType(response); + //Assert.IsType(response); } /// @@ -85,7 +85,7 @@ public void IsReadyTest() { // TODO uncomment below to test the method and replace null with proper value //var response = instance.IsReady(); - //Assert.IsType(response); + //Assert.IsType(response); } } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs index 277f17ab033..dbf5a2018b3 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public void AcceptOAuth2ConsentRequestTest() { // TODO uncomment below to test the method and replace null with proper value //string consentChallenge = null; - //HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = null; + //HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = null; //var response = instance.AcceptOAuth2ConsentRequest(consentChallenge, hydraAcceptOAuth2ConsentRequest); //Assert.IsType(response); } @@ -76,7 +76,7 @@ public void AcceptOAuth2LoginRequestTest() { // TODO uncomment below to test the method and replace null with proper value //string loginChallenge = null; - //HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = null; + //HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = null; //var response = instance.AcceptOAuth2LoginRequest(loginChallenge, hydraAcceptOAuth2LoginRequest); //Assert.IsType(response); } @@ -206,7 +206,7 @@ public void IntrospectOAuth2TokenTest() { // TODO uncomment below to test the method and replace null with proper value //string token = null; - //string scope = null; + //string? scope = null; //var response = instance.IntrospectOAuth2Token(token, scope); //Assert.IsType(response); } @@ -219,9 +219,9 @@ public void ListOAuth2ClientsTest() { // TODO uncomment below to test the method and replace null with proper value //long? pageSize = null; - //string pageToken = null; - //string clientName = null; - //string owner = null; + //string? pageToken = null; + //string? clientName = null; + //string? owner = null; //var response = instance.ListOAuth2Clients(pageSize, pageToken, clientName, owner); //Assert.IsType>(response); } @@ -235,8 +235,8 @@ public void ListOAuth2ConsentSessionsTest() // TODO uncomment below to test the method and replace null with proper value //string subject = null; //long? pageSize = null; - //string pageToken = null; - //string loginSessionId = null; + //string? pageToken = null; + //string? loginSessionId = null; //var response = instance.ListOAuth2ConsentSessions(subject, pageSize, pageToken, loginSessionId); //Assert.IsType>(response); } @@ -250,7 +250,7 @@ public void ListTrustedOAuth2JwtGrantIssuersTest() // TODO uncomment below to test the method and replace null with proper value //long? maxItems = null; //long? defaultItems = null; - //string issuer = null; + //string? issuer = null; //var response = instance.ListTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); //Assert.IsType>(response); } @@ -274,10 +274,10 @@ public void Oauth2TokenExchangeTest() { // TODO uncomment below to test the method and replace null with proper value //string grantType = null; - //string clientId = null; - //string code = null; - //string redirectUri = null; - //string refreshToken = null; + //string? clientId = null; + //string? code = null; + //string? redirectUri = null; + //string? refreshToken = null; //var response = instance.Oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); //Assert.IsType(response); } @@ -303,7 +303,7 @@ public void RejectOAuth2ConsentRequestTest() { // TODO uncomment below to test the method and replace null with proper value //string consentChallenge = null; - //HydraRejectOAuth2Request hydraRejectOAuth2Request = null; + //HydraRejectOAuth2Request? hydraRejectOAuth2Request = null; //var response = instance.RejectOAuth2ConsentRequest(consentChallenge, hydraRejectOAuth2Request); //Assert.IsType(response); } @@ -316,7 +316,7 @@ public void RejectOAuth2LoginRequestTest() { // TODO uncomment below to test the method and replace null with proper value //string loginChallenge = null; - //HydraRejectOAuth2Request hydraRejectOAuth2Request = null; + //HydraRejectOAuth2Request? hydraRejectOAuth2Request = null; //var response = instance.RejectOAuth2LoginRequest(loginChallenge, hydraRejectOAuth2Request); //Assert.IsType(response); } @@ -340,9 +340,9 @@ public void RevokeOAuth2ConsentSessionsTest() { // TODO uncomment below to test the method and replace null with proper value //string subject = null; - //string _client = null; + //string? varClient = null; //bool? all = null; - //instance.RevokeOAuth2ConsentSessions(subject, _client, all); + //instance.RevokeOAuth2ConsentSessions(subject, varClient, all); } /// @@ -352,8 +352,8 @@ public void RevokeOAuth2ConsentSessionsTest() public void RevokeOAuth2LoginSessionsTest() { // TODO uncomment below to test the method and replace null with proper value - //string subject = null; - //string sid = null; + //string? subject = null; + //string? sid = null; //instance.RevokeOAuth2LoginSessions(subject, sid); } @@ -365,8 +365,8 @@ public void RevokeOAuth2TokenTest() { // TODO uncomment below to test the method and replace null with proper value //string token = null; - //string clientId = null; - //string clientSecret = null; + //string? clientId = null; + //string? clientSecret = null; //instance.RevokeOAuth2Token(token, clientId, clientSecret); } @@ -391,7 +391,7 @@ public void SetOAuth2ClientLifespansTest() { // TODO uncomment below to test the method and replace null with proper value //string id = null; - //HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = null; + //HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = null; //var response = instance.SetOAuth2ClientLifespans(id, hydraOAuth2ClientTokenLifespans); //Assert.IsType(response); } @@ -403,7 +403,7 @@ public void SetOAuth2ClientLifespansTest() public void TrustOAuth2JwtGrantIssuerTest() { // TODO uncomment below to test the method and replace null with proper value - //HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = null; + //HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = null; //var response = instance.TrustOAuth2JwtGrantIssuer(hydraTrustOAuth2JwtGrantIssuer); //Assert.IsType(response); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs index 6b8bed9a4ae..dcbab597710 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -74,7 +74,7 @@ public void CreateOidcDynamicClientTest() public void CreateVerifiableCredentialTest() { // TODO uncomment below to test the method and replace null with proper value - //HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = null; + //HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = null; //var response = instance.CreateVerifiableCredential(hydraCreateVerifiableCredentialRequestBody); //Assert.IsType(response); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs index 4534022852b..501fdb6bf4a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs index 5662fc7c03b..e73011e274c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraAcceptOAuth2ConsentRequestSessionInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AccessToken' /// @@ -65,6 +63,7 @@ public void AccessTokenTest() { // TODO unit test for the property 'AccessToken' } + /// /// Test the property 'IdToken' /// @@ -73,7 +72,5 @@ public void IdTokenTest() { // TODO unit test for the property 'IdToken' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs index f074666b889..e8a7cb13031 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraAcceptOAuth2ConsentRequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Context' /// @@ -65,6 +63,7 @@ public void ContextTest() { // TODO unit test for the property 'Context' } + /// /// Test the property 'GrantAccessTokenAudience' /// @@ -73,6 +72,7 @@ public void GrantAccessTokenAudienceTest() { // TODO unit test for the property 'GrantAccessTokenAudience' } + /// /// Test the property 'GrantScope' /// @@ -81,6 +81,7 @@ public void GrantScopeTest() { // TODO unit test for the property 'GrantScope' } + /// /// Test the property 'HandledAt' /// @@ -89,6 +90,7 @@ public void HandledAtTest() { // TODO unit test for the property 'HandledAt' } + /// /// Test the property 'Remember' /// @@ -97,6 +99,7 @@ public void RememberTest() { // TODO unit test for the property 'Remember' } + /// /// Test the property 'RememberFor' /// @@ -105,6 +108,7 @@ public void RememberForTest() { // TODO unit test for the property 'RememberFor' } + /// /// Test the property 'Session' /// @@ -113,7 +117,5 @@ public void SessionTest() { // TODO unit test for the property 'Session' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs index 13ca434644a..1b5c6e853c1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraAcceptOAuth2LoginRequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Acr' /// @@ -65,6 +63,7 @@ public void AcrTest() { // TODO unit test for the property 'Acr' } + /// /// Test the property 'Amr' /// @@ -73,6 +72,7 @@ public void AmrTest() { // TODO unit test for the property 'Amr' } + /// /// Test the property 'Context' /// @@ -81,6 +81,7 @@ public void ContextTest() { // TODO unit test for the property 'Context' } + /// /// Test the property 'ExtendSessionLifespan' /// @@ -89,6 +90,7 @@ public void ExtendSessionLifespanTest() { // TODO unit test for the property 'ExtendSessionLifespan' } + /// /// Test the property 'ForceSubjectIdentifier' /// @@ -97,6 +99,7 @@ public void ForceSubjectIdentifierTest() { // TODO unit test for the property 'ForceSubjectIdentifier' } + /// /// Test the property 'IdentityProviderSessionId' /// @@ -105,6 +108,7 @@ public void IdentityProviderSessionIdTest() { // TODO unit test for the property 'IdentityProviderSessionId' } + /// /// Test the property 'Remember' /// @@ -113,6 +117,7 @@ public void RememberTest() { // TODO unit test for the property 'Remember' } + /// /// Test the property 'RememberFor' /// @@ -121,6 +126,7 @@ public void RememberForTest() { // TODO unit test for the property 'RememberFor' } + /// /// Test the property 'Subject' /// @@ -129,7 +135,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs index 19b56cb9ae5..fdece2bcd35 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraCreateJsonWebKeySetInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Alg' /// @@ -65,6 +63,7 @@ public void AlgTest() { // TODO unit test for the property 'Alg' } + /// /// Test the property 'Kid' /// @@ -73,6 +72,7 @@ public void KidTest() { // TODO unit test for the property 'Kid' } + /// /// Test the property 'Use' /// @@ -81,7 +81,5 @@ public void UseTest() { // TODO unit test for the property 'Use' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateVerifiableCredentialRequestBodyTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateVerifiableCredentialRequestBodyTests.cs index 5f6a2e34427..f17c9cb9ea1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateVerifiableCredentialRequestBodyTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateVerifiableCredentialRequestBodyTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraCreateVerifiableCredentialRequestBodyInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Format' /// @@ -65,6 +63,7 @@ public void FormatTest() { // TODO unit test for the property 'Format' } + /// /// Test the property 'Proof' /// @@ -73,6 +72,7 @@ public void ProofTest() { // TODO unit test for the property 'Proof' } + /// /// Test the property 'Types' /// @@ -81,7 +81,5 @@ public void TypesTest() { // TODO unit test for the property 'Types' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCredentialSupportedDraft00Tests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCredentialSupportedDraft00Tests.cs index 95144c194af..b733cb8d9a1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCredentialSupportedDraft00Tests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCredentialSupportedDraft00Tests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraCredentialSupportedDraft00InstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'CryptographicBindingMethodsSupported' /// @@ -65,6 +63,7 @@ public void CryptographicBindingMethodsSupportedTest() { // TODO unit test for the property 'CryptographicBindingMethodsSupported' } + /// /// Test the property 'CryptographicSuitesSupported' /// @@ -73,6 +72,7 @@ public void CryptographicSuitesSupportedTest() { // TODO unit test for the property 'CryptographicSuitesSupported' } + /// /// Test the property 'Format' /// @@ -81,6 +81,7 @@ public void FormatTest() { // TODO unit test for the property 'Format' } + /// /// Test the property 'Types' /// @@ -89,7 +90,5 @@ public void TypesTest() { // TODO unit test for the property 'Types' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs index ac807cb013d..a13e8eaf6f7 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraErrorOAuth2InstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Error' /// @@ -65,6 +63,7 @@ public void ErrorTest() { // TODO unit test for the property 'Error' } + /// /// Test the property 'ErrorDebug' /// @@ -73,6 +72,7 @@ public void ErrorDebugTest() { // TODO unit test for the property 'ErrorDebug' } + /// /// Test the property 'ErrorDescription' /// @@ -81,6 +81,7 @@ public void ErrorDescriptionTest() { // TODO unit test for the property 'ErrorDescription' } + /// /// Test the property 'ErrorHint' /// @@ -89,6 +90,7 @@ public void ErrorHintTest() { // TODO unit test for the property 'ErrorHint' } + /// /// Test the property 'StatusCode' /// @@ -97,7 +99,5 @@ public void StatusCodeTest() { // TODO unit test for the property 'StatusCode' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs index 3236cbf773e..0ec33cbbcdf 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraGenericErrorInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Code' /// @@ -65,6 +63,7 @@ public void CodeTest() { // TODO unit test for the property 'Code' } + /// /// Test the property 'Debug' /// @@ -73,6 +72,7 @@ public void DebugTest() { // TODO unit test for the property 'Debug' } + /// /// Test the property 'Details' /// @@ -81,6 +81,7 @@ public void DetailsTest() { // TODO unit test for the property 'Details' } + /// /// Test the property 'Id' /// @@ -89,6 +90,7 @@ public void IdTest() { // TODO unit test for the property 'Id' } + /// /// Test the property 'Message' /// @@ -97,6 +99,7 @@ public void MessageTest() { // TODO unit test for the property 'Message' } + /// /// Test the property 'Reason' /// @@ -105,6 +108,7 @@ public void ReasonTest() { // TODO unit test for the property 'Reason' } + /// /// Test the property 'Request' /// @@ -113,6 +117,7 @@ public void RequestTest() { // TODO unit test for the property 'Request' } + /// /// Test the property 'Status' /// @@ -121,7 +126,5 @@ public void StatusTest() { // TODO unit test for the property 'Status' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGetVersion200ResponseTests.cs similarity index 57% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGetVersion200ResponseTests.cs index fe534650bd3..b0bea858cbd 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraGetVersion200ResponseTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -24,21 +23,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraInlineResponse2001 + /// Class for testing HydraGetVersion200Response /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraInlineResponse2001Tests : IDisposable + public class HydraGetVersion200ResponseTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraInlineResponse2001 - //private HydraInlineResponse2001 instance; + // TODO uncomment below to declare an instance variable for HydraGetVersion200Response + //private HydraGetVersion200Response instance; - public HydraInlineResponse2001Tests() + public HydraGetVersion200ResponseTests() { - // TODO uncomment below to create an instance of HydraInlineResponse2001 - //instance = new HydraInlineResponse2001(); + // TODO uncomment below to create an instance of HydraGetVersion200Response + //instance = new HydraGetVersion200Response(); } public void Dispose() @@ -47,25 +46,22 @@ public void Dispose() } /// - /// Test an instance of HydraInlineResponse2001 + /// Test an instance of HydraGetVersion200Response /// [Fact] - public void HydraInlineResponse2001InstanceTest() + public void HydraGetVersion200ResponseInstanceTest() { - // TODO uncomment below to test "IsType" HydraInlineResponse2001 - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraGetVersion200Response + //Assert.IsType(instance); } - /// - /// Test the property '_Version' + /// Test the property 'VarVersion' /// [Fact] - public void _VersionTest() + public void VarVersionTest() { - // TODO unit test for the property '_Version' + // TODO unit test for the property 'VarVersion' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs index 939119b2185..6bb5a097784 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraHealthNotReadyStatusInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Errors' /// @@ -65,7 +63,5 @@ public void ErrorsTest() { // TODO unit test for the property 'Errors' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs index 7c1ece0329e..9034d812082 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraHealthStatusInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Status' /// @@ -65,7 +63,5 @@ public void StatusTest() { // TODO unit test for the property 'Status' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs index 36e1cd2db33..a9c05f3da7e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraIntrospectedOAuth2TokenInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Active' /// @@ -65,6 +63,7 @@ public void ActiveTest() { // TODO unit test for the property 'Active' } + /// /// Test the property 'Aud' /// @@ -73,6 +72,7 @@ public void AudTest() { // TODO unit test for the property 'Aud' } + /// /// Test the property 'ClientId' /// @@ -81,6 +81,7 @@ public void ClientIdTest() { // TODO unit test for the property 'ClientId' } + /// /// Test the property 'Exp' /// @@ -89,6 +90,7 @@ public void ExpTest() { // TODO unit test for the property 'Exp' } + /// /// Test the property 'Ext' /// @@ -97,6 +99,7 @@ public void ExtTest() { // TODO unit test for the property 'Ext' } + /// /// Test the property 'Iat' /// @@ -105,6 +108,7 @@ public void IatTest() { // TODO unit test for the property 'Iat' } + /// /// Test the property 'Iss' /// @@ -113,6 +117,7 @@ public void IssTest() { // TODO unit test for the property 'Iss' } + /// /// Test the property 'Nbf' /// @@ -121,6 +126,7 @@ public void NbfTest() { // TODO unit test for the property 'Nbf' } + /// /// Test the property 'ObfuscatedSubject' /// @@ -129,6 +135,7 @@ public void ObfuscatedSubjectTest() { // TODO unit test for the property 'ObfuscatedSubject' } + /// /// Test the property 'Scope' /// @@ -137,6 +144,7 @@ public void ScopeTest() { // TODO unit test for the property 'Scope' } + /// /// Test the property 'Sub' /// @@ -145,6 +153,7 @@ public void SubTest() { // TODO unit test for the property 'Sub' } + /// /// Test the property 'TokenType' /// @@ -153,6 +162,7 @@ public void TokenTypeTest() { // TODO unit test for the property 'TokenType' } + /// /// Test the property 'TokenUse' /// @@ -161,6 +171,7 @@ public void TokenUseTest() { // TODO unit test for the property 'TokenUse' } + /// /// Test the property 'Username' /// @@ -169,7 +180,5 @@ public void UsernameTest() { // TODO unit test for the property 'Username' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady200ResponseTests.cs similarity index 65% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady200ResponseTests.cs index 3522c9c7bd1..e51ca15b7b0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady200ResponseTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -24,21 +23,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraInlineResponse200 + /// Class for testing HydraIsReady200Response /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraInlineResponse200Tests : IDisposable + public class HydraIsReady200ResponseTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraInlineResponse200 - //private HydraInlineResponse200 instance; + // TODO uncomment below to declare an instance variable for HydraIsReady200Response + //private HydraIsReady200Response instance; - public HydraInlineResponse200Tests() + public HydraIsReady200ResponseTests() { - // TODO uncomment below to create an instance of HydraInlineResponse200 - //instance = new HydraInlineResponse200(); + // TODO uncomment below to create an instance of HydraIsReady200Response + //instance = new HydraIsReady200Response(); } public void Dispose() @@ -47,16 +46,15 @@ public void Dispose() } /// - /// Test an instance of HydraInlineResponse200 + /// Test an instance of HydraIsReady200Response /// [Fact] - public void HydraInlineResponse200InstanceTest() + public void HydraIsReady200ResponseInstanceTest() { - // TODO uncomment below to test "IsType" HydraInlineResponse200 - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraIsReady200Response + //Assert.IsType(instance); } - /// /// Test the property 'Status' /// @@ -65,7 +63,5 @@ public void StatusTest() { // TODO unit test for the property 'Status' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady503ResponseTests.cs similarity index 65% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady503ResponseTests.cs index 1d135c2f7d3..bfb766be26c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIsReady503ResponseTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -24,21 +23,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraInlineResponse503 + /// Class for testing HydraIsReady503Response /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraInlineResponse503Tests : IDisposable + public class HydraIsReady503ResponseTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraInlineResponse503 - //private HydraInlineResponse503 instance; + // TODO uncomment below to declare an instance variable for HydraIsReady503Response + //private HydraIsReady503Response instance; - public HydraInlineResponse503Tests() + public HydraIsReady503ResponseTests() { - // TODO uncomment below to create an instance of HydraInlineResponse503 - //instance = new HydraInlineResponse503(); + // TODO uncomment below to create an instance of HydraIsReady503Response + //instance = new HydraIsReady503Response(); } public void Dispose() @@ -47,16 +46,15 @@ public void Dispose() } /// - /// Test an instance of HydraInlineResponse503 + /// Test an instance of HydraIsReady503Response /// [Fact] - public void HydraInlineResponse503InstanceTest() + public void HydraIsReady503ResponseInstanceTest() { - // TODO uncomment below to test "IsType" HydraInlineResponse503 - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraIsReady503Response + //Assert.IsType(instance); } - /// /// Test the property 'Errors' /// @@ -65,7 +63,5 @@ public void ErrorsTest() { // TODO unit test for the property 'Errors' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs index 923d5bc5ca9..42d782b07d9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraJsonPatchInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'From' /// @@ -65,6 +63,7 @@ public void FromTest() { // TODO unit test for the property 'From' } + /// /// Test the property 'Op' /// @@ -73,6 +72,7 @@ public void OpTest() { // TODO unit test for the property 'Op' } + /// /// Test the property 'Path' /// @@ -81,6 +81,7 @@ public void PathTest() { // TODO unit test for the property 'Path' } + /// /// Test the property 'Value' /// @@ -89,7 +90,5 @@ public void ValueTest() { // TODO unit test for the property 'Value' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs index 2e5a8ac337f..d6c4c34eff3 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraJsonWebKeySetInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Keys' /// @@ -65,7 +63,5 @@ public void KeysTest() { // TODO unit test for the property 'Keys' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs index f999b0a6c35..af3f93b86d4 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraJsonWebKeyInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Alg' /// @@ -65,6 +63,7 @@ public void AlgTest() { // TODO unit test for the property 'Alg' } + /// /// Test the property 'Crv' /// @@ -73,6 +72,7 @@ public void CrvTest() { // TODO unit test for the property 'Crv' } + /// /// Test the property 'D' /// @@ -81,6 +81,7 @@ public void DTest() { // TODO unit test for the property 'D' } + /// /// Test the property 'Dp' /// @@ -89,6 +90,7 @@ public void DpTest() { // TODO unit test for the property 'Dp' } + /// /// Test the property 'Dq' /// @@ -97,6 +99,7 @@ public void DqTest() { // TODO unit test for the property 'Dq' } + /// /// Test the property 'E' /// @@ -105,6 +108,7 @@ public void ETest() { // TODO unit test for the property 'E' } + /// /// Test the property 'K' /// @@ -113,6 +117,7 @@ public void KTest() { // TODO unit test for the property 'K' } + /// /// Test the property 'Kid' /// @@ -121,6 +126,7 @@ public void KidTest() { // TODO unit test for the property 'Kid' } + /// /// Test the property 'Kty' /// @@ -129,6 +135,7 @@ public void KtyTest() { // TODO unit test for the property 'Kty' } + /// /// Test the property 'N' /// @@ -137,6 +144,7 @@ public void NTest() { // TODO unit test for the property 'N' } + /// /// Test the property 'P' /// @@ -145,6 +153,7 @@ public void PTest() { // TODO unit test for the property 'P' } + /// /// Test the property 'Q' /// @@ -153,6 +162,7 @@ public void QTest() { // TODO unit test for the property 'Q' } + /// /// Test the property 'Qi' /// @@ -161,6 +171,7 @@ public void QiTest() { // TODO unit test for the property 'Qi' } + /// /// Test the property 'Use' /// @@ -169,6 +180,7 @@ public void UseTest() { // TODO unit test for the property 'Use' } + /// /// Test the property 'X' /// @@ -177,6 +189,7 @@ public void XTest() { // TODO unit test for the property 'X' } + /// /// Test the property 'X5c' /// @@ -185,6 +198,7 @@ public void X5cTest() { // TODO unit test for the property 'X5c' } + /// /// Test the property 'Y' /// @@ -193,7 +207,5 @@ public void YTest() { // TODO unit test for the property 'Y' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTests.cs index 57a264013d4..1890c834826 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ClientInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AccessTokenStrategy' /// @@ -65,6 +63,7 @@ public void AccessTokenStrategyTest() { // TODO unit test for the property 'AccessTokenStrategy' } + /// /// Test the property 'AllowedCorsOrigins' /// @@ -73,6 +72,7 @@ public void AllowedCorsOriginsTest() { // TODO unit test for the property 'AllowedCorsOrigins' } + /// /// Test the property 'Audience' /// @@ -81,6 +81,7 @@ public void AudienceTest() { // TODO unit test for the property 'Audience' } + /// /// Test the property 'AuthorizationCodeGrantAccessTokenLifespan' /// @@ -89,6 +90,7 @@ public void AuthorizationCodeGrantAccessTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantAccessTokenLifespan' } + /// /// Test the property 'AuthorizationCodeGrantIdTokenLifespan' /// @@ -97,6 +99,7 @@ public void AuthorizationCodeGrantIdTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantIdTokenLifespan' } + /// /// Test the property 'AuthorizationCodeGrantRefreshTokenLifespan' /// @@ -105,6 +108,7 @@ public void AuthorizationCodeGrantRefreshTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantRefreshTokenLifespan' } + /// /// Test the property 'BackchannelLogoutSessionRequired' /// @@ -113,6 +117,7 @@ public void BackchannelLogoutSessionRequiredTest() { // TODO unit test for the property 'BackchannelLogoutSessionRequired' } + /// /// Test the property 'BackchannelLogoutUri' /// @@ -121,6 +126,7 @@ public void BackchannelLogoutUriTest() { // TODO unit test for the property 'BackchannelLogoutUri' } + /// /// Test the property 'ClientCredentialsGrantAccessTokenLifespan' /// @@ -129,6 +135,7 @@ public void ClientCredentialsGrantAccessTokenLifespanTest() { // TODO unit test for the property 'ClientCredentialsGrantAccessTokenLifespan' } + /// /// Test the property 'ClientId' /// @@ -137,6 +144,7 @@ public void ClientIdTest() { // TODO unit test for the property 'ClientId' } + /// /// Test the property 'ClientName' /// @@ -145,6 +153,7 @@ public void ClientNameTest() { // TODO unit test for the property 'ClientName' } + /// /// Test the property 'ClientSecret' /// @@ -153,6 +162,7 @@ public void ClientSecretTest() { // TODO unit test for the property 'ClientSecret' } + /// /// Test the property 'ClientSecretExpiresAt' /// @@ -161,6 +171,7 @@ public void ClientSecretExpiresAtTest() { // TODO unit test for the property 'ClientSecretExpiresAt' } + /// /// Test the property 'ClientUri' /// @@ -169,6 +180,7 @@ public void ClientUriTest() { // TODO unit test for the property 'ClientUri' } + /// /// Test the property 'Contacts' /// @@ -177,6 +189,7 @@ public void ContactsTest() { // TODO unit test for the property 'Contacts' } + /// /// Test the property 'CreatedAt' /// @@ -185,6 +198,7 @@ public void CreatedAtTest() { // TODO unit test for the property 'CreatedAt' } + /// /// Test the property 'FrontchannelLogoutSessionRequired' /// @@ -193,6 +207,7 @@ public void FrontchannelLogoutSessionRequiredTest() { // TODO unit test for the property 'FrontchannelLogoutSessionRequired' } + /// /// Test the property 'FrontchannelLogoutUri' /// @@ -201,6 +216,7 @@ public void FrontchannelLogoutUriTest() { // TODO unit test for the property 'FrontchannelLogoutUri' } + /// /// Test the property 'GrantTypes' /// @@ -209,6 +225,7 @@ public void GrantTypesTest() { // TODO unit test for the property 'GrantTypes' } + /// /// Test the property 'ImplicitGrantAccessTokenLifespan' /// @@ -217,6 +234,7 @@ public void ImplicitGrantAccessTokenLifespanTest() { // TODO unit test for the property 'ImplicitGrantAccessTokenLifespan' } + /// /// Test the property 'ImplicitGrantIdTokenLifespan' /// @@ -225,6 +243,7 @@ public void ImplicitGrantIdTokenLifespanTest() { // TODO unit test for the property 'ImplicitGrantIdTokenLifespan' } + /// /// Test the property 'Jwks' /// @@ -233,6 +252,7 @@ public void JwksTest() { // TODO unit test for the property 'Jwks' } + /// /// Test the property 'JwksUri' /// @@ -241,6 +261,7 @@ public void JwksUriTest() { // TODO unit test for the property 'JwksUri' } + /// /// Test the property 'JwtBearerGrantAccessTokenLifespan' /// @@ -249,6 +270,7 @@ public void JwtBearerGrantAccessTokenLifespanTest() { // TODO unit test for the property 'JwtBearerGrantAccessTokenLifespan' } + /// /// Test the property 'LogoUri' /// @@ -257,6 +279,7 @@ public void LogoUriTest() { // TODO unit test for the property 'LogoUri' } + /// /// Test the property 'Metadata' /// @@ -265,6 +288,7 @@ public void MetadataTest() { // TODO unit test for the property 'Metadata' } + /// /// Test the property 'Owner' /// @@ -273,6 +297,7 @@ public void OwnerTest() { // TODO unit test for the property 'Owner' } + /// /// Test the property 'PolicyUri' /// @@ -281,6 +306,7 @@ public void PolicyUriTest() { // TODO unit test for the property 'PolicyUri' } + /// /// Test the property 'PostLogoutRedirectUris' /// @@ -289,6 +315,7 @@ public void PostLogoutRedirectUrisTest() { // TODO unit test for the property 'PostLogoutRedirectUris' } + /// /// Test the property 'RedirectUris' /// @@ -297,6 +324,7 @@ public void RedirectUrisTest() { // TODO unit test for the property 'RedirectUris' } + /// /// Test the property 'RefreshTokenGrantAccessTokenLifespan' /// @@ -305,6 +333,7 @@ public void RefreshTokenGrantAccessTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantAccessTokenLifespan' } + /// /// Test the property 'RefreshTokenGrantIdTokenLifespan' /// @@ -313,6 +342,7 @@ public void RefreshTokenGrantIdTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantIdTokenLifespan' } + /// /// Test the property 'RefreshTokenGrantRefreshTokenLifespan' /// @@ -321,6 +351,7 @@ public void RefreshTokenGrantRefreshTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantRefreshTokenLifespan' } + /// /// Test the property 'RegistrationAccessToken' /// @@ -329,6 +360,7 @@ public void RegistrationAccessTokenTest() { // TODO unit test for the property 'RegistrationAccessToken' } + /// /// Test the property 'RegistrationClientUri' /// @@ -337,6 +369,7 @@ public void RegistrationClientUriTest() { // TODO unit test for the property 'RegistrationClientUri' } + /// /// Test the property 'RequestObjectSigningAlg' /// @@ -345,6 +378,7 @@ public void RequestObjectSigningAlgTest() { // TODO unit test for the property 'RequestObjectSigningAlg' } + /// /// Test the property 'RequestUris' /// @@ -353,6 +387,7 @@ public void RequestUrisTest() { // TODO unit test for the property 'RequestUris' } + /// /// Test the property 'ResponseTypes' /// @@ -361,6 +396,7 @@ public void ResponseTypesTest() { // TODO unit test for the property 'ResponseTypes' } + /// /// Test the property 'Scope' /// @@ -369,6 +405,7 @@ public void ScopeTest() { // TODO unit test for the property 'Scope' } + /// /// Test the property 'SectorIdentifierUri' /// @@ -377,6 +414,7 @@ public void SectorIdentifierUriTest() { // TODO unit test for the property 'SectorIdentifierUri' } + /// /// Test the property 'SkipConsent' /// @@ -385,6 +423,7 @@ public void SkipConsentTest() { // TODO unit test for the property 'SkipConsent' } + /// /// Test the property 'SkipLogoutConsent' /// @@ -393,6 +432,7 @@ public void SkipLogoutConsentTest() { // TODO unit test for the property 'SkipLogoutConsent' } + /// /// Test the property 'SubjectType' /// @@ -401,6 +441,7 @@ public void SubjectTypeTest() { // TODO unit test for the property 'SubjectType' } + /// /// Test the property 'TokenEndpointAuthMethod' /// @@ -409,6 +450,7 @@ public void TokenEndpointAuthMethodTest() { // TODO unit test for the property 'TokenEndpointAuthMethod' } + /// /// Test the property 'TokenEndpointAuthSigningAlg' /// @@ -417,6 +459,7 @@ public void TokenEndpointAuthSigningAlgTest() { // TODO unit test for the property 'TokenEndpointAuthSigningAlg' } + /// /// Test the property 'TosUri' /// @@ -425,6 +468,7 @@ public void TosUriTest() { // TODO unit test for the property 'TosUri' } + /// /// Test the property 'UpdatedAt' /// @@ -433,6 +477,7 @@ public void UpdatedAtTest() { // TODO unit test for the property 'UpdatedAt' } + /// /// Test the property 'UserinfoSignedResponseAlg' /// @@ -441,7 +486,5 @@ public void UserinfoSignedResponseAlgTest() { // TODO unit test for the property 'UserinfoSignedResponseAlg' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs index 3fa77154bd6..7c76cab85bb 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ClientTokenLifespansInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AuthorizationCodeGrantAccessTokenLifespan' /// @@ -65,6 +63,7 @@ public void AuthorizationCodeGrantAccessTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantAccessTokenLifespan' } + /// /// Test the property 'AuthorizationCodeGrantIdTokenLifespan' /// @@ -73,6 +72,7 @@ public void AuthorizationCodeGrantIdTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantIdTokenLifespan' } + /// /// Test the property 'AuthorizationCodeGrantRefreshTokenLifespan' /// @@ -81,6 +81,7 @@ public void AuthorizationCodeGrantRefreshTokenLifespanTest() { // TODO unit test for the property 'AuthorizationCodeGrantRefreshTokenLifespan' } + /// /// Test the property 'ClientCredentialsGrantAccessTokenLifespan' /// @@ -89,6 +90,7 @@ public void ClientCredentialsGrantAccessTokenLifespanTest() { // TODO unit test for the property 'ClientCredentialsGrantAccessTokenLifespan' } + /// /// Test the property 'ImplicitGrantAccessTokenLifespan' /// @@ -97,6 +99,7 @@ public void ImplicitGrantAccessTokenLifespanTest() { // TODO unit test for the property 'ImplicitGrantAccessTokenLifespan' } + /// /// Test the property 'ImplicitGrantIdTokenLifespan' /// @@ -105,6 +108,7 @@ public void ImplicitGrantIdTokenLifespanTest() { // TODO unit test for the property 'ImplicitGrantIdTokenLifespan' } + /// /// Test the property 'JwtBearerGrantAccessTokenLifespan' /// @@ -113,6 +117,7 @@ public void JwtBearerGrantAccessTokenLifespanTest() { // TODO unit test for the property 'JwtBearerGrantAccessTokenLifespan' } + /// /// Test the property 'RefreshTokenGrantAccessTokenLifespan' /// @@ -121,6 +126,7 @@ public void RefreshTokenGrantAccessTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantAccessTokenLifespan' } + /// /// Test the property 'RefreshTokenGrantIdTokenLifespan' /// @@ -129,6 +135,7 @@ public void RefreshTokenGrantIdTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantIdTokenLifespan' } + /// /// Test the property 'RefreshTokenGrantRefreshTokenLifespan' /// @@ -137,7 +144,5 @@ public void RefreshTokenGrantRefreshTokenLifespanTest() { // TODO unit test for the property 'RefreshTokenGrantRefreshTokenLifespan' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs index 8b7dedee0a9..ac440c195e3 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ConsentRequestOpenIDConnectContextInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AcrValues' /// @@ -65,6 +63,7 @@ public void AcrValuesTest() { // TODO unit test for the property 'AcrValues' } + /// /// Test the property 'Display' /// @@ -73,6 +72,7 @@ public void DisplayTest() { // TODO unit test for the property 'Display' } + /// /// Test the property 'IdTokenHintClaims' /// @@ -81,6 +81,7 @@ public void IdTokenHintClaimsTest() { // TODO unit test for the property 'IdTokenHintClaims' } + /// /// Test the property 'LoginHint' /// @@ -89,6 +90,7 @@ public void LoginHintTest() { // TODO unit test for the property 'LoginHint' } + /// /// Test the property 'UiLocales' /// @@ -97,7 +99,5 @@ public void UiLocalesTest() { // TODO unit test for the property 'UiLocales' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs index b8229ae4f5b..f62834a1c0c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ConsentRequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Acr' /// @@ -65,6 +63,7 @@ public void AcrTest() { // TODO unit test for the property 'Acr' } + /// /// Test the property 'Amr' /// @@ -73,6 +72,7 @@ public void AmrTest() { // TODO unit test for the property 'Amr' } + /// /// Test the property 'Challenge' /// @@ -81,14 +81,16 @@ public void ChallengeTest() { // TODO unit test for the property 'Challenge' } + /// - /// Test the property '_Client' + /// Test the property 'VarClient' /// [Fact] - public void _ClientTest() + public void VarClientTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property 'VarClient' } + /// /// Test the property 'Context' /// @@ -97,6 +99,7 @@ public void ContextTest() { // TODO unit test for the property 'Context' } + /// /// Test the property 'LoginChallenge' /// @@ -105,6 +108,7 @@ public void LoginChallengeTest() { // TODO unit test for the property 'LoginChallenge' } + /// /// Test the property 'LoginSessionId' /// @@ -113,6 +117,7 @@ public void LoginSessionIdTest() { // TODO unit test for the property 'LoginSessionId' } + /// /// Test the property 'OidcContext' /// @@ -121,6 +126,7 @@ public void OidcContextTest() { // TODO unit test for the property 'OidcContext' } + /// /// Test the property 'RequestUrl' /// @@ -129,6 +135,7 @@ public void RequestUrlTest() { // TODO unit test for the property 'RequestUrl' } + /// /// Test the property 'RequestedAccessTokenAudience' /// @@ -137,6 +144,7 @@ public void RequestedAccessTokenAudienceTest() { // TODO unit test for the property 'RequestedAccessTokenAudience' } + /// /// Test the property 'RequestedScope' /// @@ -145,6 +153,7 @@ public void RequestedScopeTest() { // TODO unit test for the property 'RequestedScope' } + /// /// Test the property 'Skip' /// @@ -153,6 +162,7 @@ public void SkipTest() { // TODO unit test for the property 'Skip' } + /// /// Test the property 'Subject' /// @@ -161,7 +171,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs index 4a585d9bf64..c0755b17d5d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ConsentSessionExpiresAtInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AccessToken' /// @@ -65,6 +63,7 @@ public void AccessTokenTest() { // TODO unit test for the property 'AccessToken' } + /// /// Test the property 'AuthorizeCode' /// @@ -73,6 +72,7 @@ public void AuthorizeCodeTest() { // TODO unit test for the property 'AuthorizeCode' } + /// /// Test the property 'IdToken' /// @@ -81,6 +81,7 @@ public void IdTokenTest() { // TODO unit test for the property 'IdToken' } + /// /// Test the property 'ParContext' /// @@ -89,6 +90,7 @@ public void ParContextTest() { // TODO unit test for the property 'ParContext' } + /// /// Test the property 'RefreshToken' /// @@ -97,7 +99,5 @@ public void RefreshTokenTest() { // TODO unit test for the property 'RefreshToken' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs index e420d9fc0fd..0a6bd62e601 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2ConsentSessionInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'ConsentRequest' /// @@ -65,6 +63,7 @@ public void ConsentRequestTest() { // TODO unit test for the property 'ConsentRequest' } + /// /// Test the property 'Context' /// @@ -73,6 +72,7 @@ public void ContextTest() { // TODO unit test for the property 'Context' } + /// /// Test the property 'ExpiresAt' /// @@ -81,6 +81,7 @@ public void ExpiresAtTest() { // TODO unit test for the property 'ExpiresAt' } + /// /// Test the property 'GrantAccessTokenAudience' /// @@ -89,6 +90,7 @@ public void GrantAccessTokenAudienceTest() { // TODO unit test for the property 'GrantAccessTokenAudience' } + /// /// Test the property 'GrantScope' /// @@ -97,6 +99,7 @@ public void GrantScopeTest() { // TODO unit test for the property 'GrantScope' } + /// /// Test the property 'HandledAt' /// @@ -105,6 +108,7 @@ public void HandledAtTest() { // TODO unit test for the property 'HandledAt' } + /// /// Test the property 'Remember' /// @@ -113,6 +117,7 @@ public void RememberTest() { // TODO unit test for the property 'Remember' } + /// /// Test the property 'RememberFor' /// @@ -121,6 +126,7 @@ public void RememberForTest() { // TODO unit test for the property 'RememberFor' } + /// /// Test the property 'Session' /// @@ -129,7 +135,5 @@ public void SessionTest() { // TODO unit test for the property 'Session' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs index ae901c1d823..7a49ff2c236 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2LoginRequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Challenge' /// @@ -65,14 +63,16 @@ public void ChallengeTest() { // TODO unit test for the property 'Challenge' } + /// - /// Test the property '_Client' + /// Test the property 'VarClient' /// [Fact] - public void _ClientTest() + public void VarClientTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property 'VarClient' } + /// /// Test the property 'OidcContext' /// @@ -81,6 +81,7 @@ public void OidcContextTest() { // TODO unit test for the property 'OidcContext' } + /// /// Test the property 'RequestUrl' /// @@ -89,6 +90,7 @@ public void RequestUrlTest() { // TODO unit test for the property 'RequestUrl' } + /// /// Test the property 'RequestedAccessTokenAudience' /// @@ -97,6 +99,7 @@ public void RequestedAccessTokenAudienceTest() { // TODO unit test for the property 'RequestedAccessTokenAudience' } + /// /// Test the property 'RequestedScope' /// @@ -105,6 +108,7 @@ public void RequestedScopeTest() { // TODO unit test for the property 'RequestedScope' } + /// /// Test the property 'SessionId' /// @@ -113,6 +117,7 @@ public void SessionIdTest() { // TODO unit test for the property 'SessionId' } + /// /// Test the property 'Skip' /// @@ -121,6 +126,7 @@ public void SkipTest() { // TODO unit test for the property 'Skip' } + /// /// Test the property 'Subject' /// @@ -129,7 +135,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs index 7133aafb74d..d1746ee918c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2LogoutRequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Challenge' /// @@ -65,14 +63,16 @@ public void ChallengeTest() { // TODO unit test for the property 'Challenge' } + /// - /// Test the property '_Client' + /// Test the property 'VarClient' /// [Fact] - public void _ClientTest() + public void VarClientTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property 'VarClient' } + /// /// Test the property 'RequestUrl' /// @@ -81,6 +81,7 @@ public void RequestUrlTest() { // TODO unit test for the property 'RequestUrl' } + /// /// Test the property 'RpInitiated' /// @@ -89,6 +90,7 @@ public void RpInitiatedTest() { // TODO unit test for the property 'RpInitiated' } + /// /// Test the property 'Sid' /// @@ -97,6 +99,7 @@ public void SidTest() { // TODO unit test for the property 'Sid' } + /// /// Test the property 'Subject' /// @@ -105,7 +108,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs index f1b66ee5dd2..eec3a64f419 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2RedirectToInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'RedirectTo' /// @@ -65,7 +63,5 @@ public void RedirectToTest() { // TODO unit test for the property 'RedirectTo' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs index 790de4b4eec..b33e1acd208 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOAuth2TokenExchangeInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AccessToken' /// @@ -65,6 +63,7 @@ public void AccessTokenTest() { // TODO unit test for the property 'AccessToken' } + /// /// Test the property 'ExpiresIn' /// @@ -73,6 +72,7 @@ public void ExpiresInTest() { // TODO unit test for the property 'ExpiresIn' } + /// /// Test the property 'IdToken' /// @@ -81,6 +81,7 @@ public void IdTokenTest() { // TODO unit test for the property 'IdToken' } + /// /// Test the property 'RefreshToken' /// @@ -89,6 +90,7 @@ public void RefreshTokenTest() { // TODO unit test for the property 'RefreshToken' } + /// /// Test the property 'Scope' /// @@ -97,6 +99,7 @@ public void ScopeTest() { // TODO unit test for the property 'Scope' } + /// /// Test the property 'TokenType' /// @@ -105,7 +108,5 @@ public void TokenTypeTest() { // TODO unit test for the property 'TokenType' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs index 9613914d92a..009ae2835b3 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOidcConfigurationInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AuthorizationEndpoint' /// @@ -65,6 +63,7 @@ public void AuthorizationEndpointTest() { // TODO unit test for the property 'AuthorizationEndpoint' } + /// /// Test the property 'BackchannelLogoutSessionSupported' /// @@ -73,6 +72,7 @@ public void BackchannelLogoutSessionSupportedTest() { // TODO unit test for the property 'BackchannelLogoutSessionSupported' } + /// /// Test the property 'BackchannelLogoutSupported' /// @@ -81,6 +81,7 @@ public void BackchannelLogoutSupportedTest() { // TODO unit test for the property 'BackchannelLogoutSupported' } + /// /// Test the property 'ClaimsParameterSupported' /// @@ -89,6 +90,7 @@ public void ClaimsParameterSupportedTest() { // TODO unit test for the property 'ClaimsParameterSupported' } + /// /// Test the property 'ClaimsSupported' /// @@ -97,6 +99,7 @@ public void ClaimsSupportedTest() { // TODO unit test for the property 'ClaimsSupported' } + /// /// Test the property 'CodeChallengeMethodsSupported' /// @@ -105,6 +108,7 @@ public void CodeChallengeMethodsSupportedTest() { // TODO unit test for the property 'CodeChallengeMethodsSupported' } + /// /// Test the property 'CredentialsEndpointDraft00' /// @@ -113,6 +117,7 @@ public void CredentialsEndpointDraft00Test() { // TODO unit test for the property 'CredentialsEndpointDraft00' } + /// /// Test the property 'CredentialsSupportedDraft00' /// @@ -121,6 +126,7 @@ public void CredentialsSupportedDraft00Test() { // TODO unit test for the property 'CredentialsSupportedDraft00' } + /// /// Test the property 'EndSessionEndpoint' /// @@ -129,6 +135,7 @@ public void EndSessionEndpointTest() { // TODO unit test for the property 'EndSessionEndpoint' } + /// /// Test the property 'FrontchannelLogoutSessionSupported' /// @@ -137,6 +144,7 @@ public void FrontchannelLogoutSessionSupportedTest() { // TODO unit test for the property 'FrontchannelLogoutSessionSupported' } + /// /// Test the property 'FrontchannelLogoutSupported' /// @@ -145,6 +153,7 @@ public void FrontchannelLogoutSupportedTest() { // TODO unit test for the property 'FrontchannelLogoutSupported' } + /// /// Test the property 'GrantTypesSupported' /// @@ -153,6 +162,7 @@ public void GrantTypesSupportedTest() { // TODO unit test for the property 'GrantTypesSupported' } + /// /// Test the property 'IdTokenSignedResponseAlg' /// @@ -161,6 +171,7 @@ public void IdTokenSignedResponseAlgTest() { // TODO unit test for the property 'IdTokenSignedResponseAlg' } + /// /// Test the property 'IdTokenSigningAlgValuesSupported' /// @@ -169,6 +180,7 @@ public void IdTokenSigningAlgValuesSupportedTest() { // TODO unit test for the property 'IdTokenSigningAlgValuesSupported' } + /// /// Test the property 'Issuer' /// @@ -177,6 +189,7 @@ public void IssuerTest() { // TODO unit test for the property 'Issuer' } + /// /// Test the property 'JwksUri' /// @@ -185,6 +198,7 @@ public void JwksUriTest() { // TODO unit test for the property 'JwksUri' } + /// /// Test the property 'RegistrationEndpoint' /// @@ -193,6 +207,7 @@ public void RegistrationEndpointTest() { // TODO unit test for the property 'RegistrationEndpoint' } + /// /// Test the property 'RequestObjectSigningAlgValuesSupported' /// @@ -201,6 +216,7 @@ public void RequestObjectSigningAlgValuesSupportedTest() { // TODO unit test for the property 'RequestObjectSigningAlgValuesSupported' } + /// /// Test the property 'RequestParameterSupported' /// @@ -209,6 +225,7 @@ public void RequestParameterSupportedTest() { // TODO unit test for the property 'RequestParameterSupported' } + /// /// Test the property 'RequestUriParameterSupported' /// @@ -217,6 +234,7 @@ public void RequestUriParameterSupportedTest() { // TODO unit test for the property 'RequestUriParameterSupported' } + /// /// Test the property 'RequireRequestUriRegistration' /// @@ -225,6 +243,7 @@ public void RequireRequestUriRegistrationTest() { // TODO unit test for the property 'RequireRequestUriRegistration' } + /// /// Test the property 'ResponseModesSupported' /// @@ -233,6 +252,7 @@ public void ResponseModesSupportedTest() { // TODO unit test for the property 'ResponseModesSupported' } + /// /// Test the property 'ResponseTypesSupported' /// @@ -241,6 +261,7 @@ public void ResponseTypesSupportedTest() { // TODO unit test for the property 'ResponseTypesSupported' } + /// /// Test the property 'RevocationEndpoint' /// @@ -249,6 +270,7 @@ public void RevocationEndpointTest() { // TODO unit test for the property 'RevocationEndpoint' } + /// /// Test the property 'ScopesSupported' /// @@ -257,6 +279,7 @@ public void ScopesSupportedTest() { // TODO unit test for the property 'ScopesSupported' } + /// /// Test the property 'SubjectTypesSupported' /// @@ -265,6 +288,7 @@ public void SubjectTypesSupportedTest() { // TODO unit test for the property 'SubjectTypesSupported' } + /// /// Test the property 'TokenEndpoint' /// @@ -273,6 +297,7 @@ public void TokenEndpointTest() { // TODO unit test for the property 'TokenEndpoint' } + /// /// Test the property 'TokenEndpointAuthMethodsSupported' /// @@ -281,6 +306,7 @@ public void TokenEndpointAuthMethodsSupportedTest() { // TODO unit test for the property 'TokenEndpointAuthMethodsSupported' } + /// /// Test the property 'UserinfoEndpoint' /// @@ -289,6 +315,7 @@ public void UserinfoEndpointTest() { // TODO unit test for the property 'UserinfoEndpoint' } + /// /// Test the property 'UserinfoSignedResponseAlg' /// @@ -297,6 +324,7 @@ public void UserinfoSignedResponseAlgTest() { // TODO unit test for the property 'UserinfoSignedResponseAlg' } + /// /// Test the property 'UserinfoSigningAlgValuesSupported' /// @@ -305,7 +333,5 @@ public void UserinfoSigningAlgValuesSupportedTest() { // TODO unit test for the property 'UserinfoSigningAlgValuesSupported' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs index 02de9dd5f2e..91fdb1fc9ad 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraOidcUserInfoInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Birthdate' /// @@ -65,6 +63,7 @@ public void BirthdateTest() { // TODO unit test for the property 'Birthdate' } + /// /// Test the property 'Email' /// @@ -73,6 +72,7 @@ public void EmailTest() { // TODO unit test for the property 'Email' } + /// /// Test the property 'EmailVerified' /// @@ -81,6 +81,7 @@ public void EmailVerifiedTest() { // TODO unit test for the property 'EmailVerified' } + /// /// Test the property 'FamilyName' /// @@ -89,6 +90,7 @@ public void FamilyNameTest() { // TODO unit test for the property 'FamilyName' } + /// /// Test the property 'Gender' /// @@ -97,6 +99,7 @@ public void GenderTest() { // TODO unit test for the property 'Gender' } + /// /// Test the property 'GivenName' /// @@ -105,6 +108,7 @@ public void GivenNameTest() { // TODO unit test for the property 'GivenName' } + /// /// Test the property 'Locale' /// @@ -113,6 +117,7 @@ public void LocaleTest() { // TODO unit test for the property 'Locale' } + /// /// Test the property 'MiddleName' /// @@ -121,6 +126,7 @@ public void MiddleNameTest() { // TODO unit test for the property 'MiddleName' } + /// /// Test the property 'Name' /// @@ -129,6 +135,7 @@ public void NameTest() { // TODO unit test for the property 'Name' } + /// /// Test the property 'Nickname' /// @@ -137,6 +144,7 @@ public void NicknameTest() { // TODO unit test for the property 'Nickname' } + /// /// Test the property 'PhoneNumber' /// @@ -145,6 +153,7 @@ public void PhoneNumberTest() { // TODO unit test for the property 'PhoneNumber' } + /// /// Test the property 'PhoneNumberVerified' /// @@ -153,6 +162,7 @@ public void PhoneNumberVerifiedTest() { // TODO unit test for the property 'PhoneNumberVerified' } + /// /// Test the property 'Picture' /// @@ -161,6 +171,7 @@ public void PictureTest() { // TODO unit test for the property 'Picture' } + /// /// Test the property 'PreferredUsername' /// @@ -169,6 +180,7 @@ public void PreferredUsernameTest() { // TODO unit test for the property 'PreferredUsername' } + /// /// Test the property 'Profile' /// @@ -177,6 +189,7 @@ public void ProfileTest() { // TODO unit test for the property 'Profile' } + /// /// Test the property 'Sub' /// @@ -185,6 +198,7 @@ public void SubTest() { // TODO unit test for the property 'Sub' } + /// /// Test the property 'UpdatedAt' /// @@ -193,6 +207,7 @@ public void UpdatedAtTest() { // TODO unit test for the property 'UpdatedAt' } + /// /// Test the property 'Website' /// @@ -201,6 +216,7 @@ public void WebsiteTest() { // TODO unit test for the property 'Website' } + /// /// Test the property 'Zoneinfo' /// @@ -209,7 +225,5 @@ public void ZoneinfoTest() { // TODO unit test for the property 'Zoneinfo' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs index 45469f3b689..24aae6349b3 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraPaginationHeadersInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Link' /// @@ -65,6 +63,7 @@ public void LinkTest() { // TODO unit test for the property 'Link' } + /// /// Test the property 'XTotalCount' /// @@ -73,7 +72,5 @@ public void XTotalCountTest() { // TODO unit test for the property 'XTotalCount' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs index 9cded71ded5..d349f3fce73 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraPaginationInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'PageSize' /// @@ -65,6 +63,7 @@ public void PageSizeTest() { // TODO unit test for the property 'PageSize' } + /// /// Test the property 'PageToken' /// @@ -73,7 +72,5 @@ public void PageTokenTest() { // TODO unit test for the property 'PageToken' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRFC6749ErrorJsonTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRFC6749ErrorJsonTests.cs index c44fb576a45..5b1e8bd31b9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRFC6749ErrorJsonTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRFC6749ErrorJsonTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraRFC6749ErrorJsonInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Error' /// @@ -65,6 +63,7 @@ public void ErrorTest() { // TODO unit test for the property 'Error' } + /// /// Test the property 'ErrorDebug' /// @@ -73,6 +72,7 @@ public void ErrorDebugTest() { // TODO unit test for the property 'ErrorDebug' } + /// /// Test the property 'ErrorDescription' /// @@ -81,6 +81,7 @@ public void ErrorDescriptionTest() { // TODO unit test for the property 'ErrorDescription' } + /// /// Test the property 'ErrorHint' /// @@ -89,6 +90,7 @@ public void ErrorHintTest() { // TODO unit test for the property 'ErrorHint' } + /// /// Test the property 'StatusCode' /// @@ -97,7 +99,5 @@ public void StatusCodeTest() { // TODO unit test for the property 'StatusCode' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs index 05291405368..71f5da586cb 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraRejectOAuth2RequestInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Error' /// @@ -65,6 +63,7 @@ public void ErrorTest() { // TODO unit test for the property 'Error' } + /// /// Test the property 'ErrorDebug' /// @@ -73,6 +72,7 @@ public void ErrorDebugTest() { // TODO unit test for the property 'ErrorDebug' } + /// /// Test the property 'ErrorDescription' /// @@ -81,6 +81,7 @@ public void ErrorDescriptionTest() { // TODO unit test for the property 'ErrorDescription' } + /// /// Test the property 'ErrorHint' /// @@ -89,6 +90,7 @@ public void ErrorHintTest() { // TODO unit test for the property 'ErrorHint' } + /// /// Test the property 'StatusCode' /// @@ -97,7 +99,5 @@ public void StatusCodeTest() { // TODO unit test for the property 'StatusCode' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs index 27486132d87..058dd30b353 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTokenPaginationHeadersInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Link' /// @@ -65,6 +63,7 @@ public void LinkTest() { // TODO unit test for the property 'Link' } + /// /// Test the property 'XTotalCount' /// @@ -73,7 +72,5 @@ public void XTotalCountTest() { // TODO unit test for the property 'XTotalCount' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs index 597e9461cf9..c94275e229e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTokenPaginationRequestParametersInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'PageSize' /// @@ -65,6 +63,7 @@ public void PageSizeTest() { // TODO unit test for the property 'PageSize' } + /// /// Test the property 'PageToken' /// @@ -73,7 +72,5 @@ public void PageTokenTest() { // TODO unit test for the property 'PageToken' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs index c691aab74f9..5d2ced93b5b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTokenPaginationResponseHeadersInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Link' /// @@ -65,6 +63,7 @@ public void LinkTest() { // TODO unit test for the property 'Link' } + /// /// Test the property 'XTotalCount' /// @@ -73,7 +72,5 @@ public void XTotalCountTest() { // TODO unit test for the property 'XTotalCount' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs index 5b067c923da..b5c2b328f7e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTokenPaginationInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'PageSize' /// @@ -65,6 +63,7 @@ public void PageSizeTest() { // TODO unit test for the property 'PageSize' } + /// /// Test the property 'PageToken' /// @@ -73,7 +72,5 @@ public void PageTokenTest() { // TODO unit test for the property 'PageToken' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs index 746217d3f33..9065f222d32 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTrustOAuth2JwtGrantIssuerInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AllowAnySubject' /// @@ -65,6 +63,7 @@ public void AllowAnySubjectTest() { // TODO unit test for the property 'AllowAnySubject' } + /// /// Test the property 'ExpiresAt' /// @@ -73,6 +72,7 @@ public void ExpiresAtTest() { // TODO unit test for the property 'ExpiresAt' } + /// /// Test the property 'Issuer' /// @@ -81,6 +81,7 @@ public void IssuerTest() { // TODO unit test for the property 'Issuer' } + /// /// Test the property 'Jwk' /// @@ -89,6 +90,7 @@ public void JwkTest() { // TODO unit test for the property 'Jwk' } + /// /// Test the property 'Scope' /// @@ -97,6 +99,7 @@ public void ScopeTest() { // TODO unit test for the property 'Scope' } + /// /// Test the property 'Subject' /// @@ -105,7 +108,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs index ab42a4234e9..b606585094d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTrustedOAuth2JwtGrantIssuerInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'AllowAnySubject' /// @@ -65,6 +63,7 @@ public void AllowAnySubjectTest() { // TODO unit test for the property 'AllowAnySubject' } + /// /// Test the property 'CreatedAt' /// @@ -73,6 +72,7 @@ public void CreatedAtTest() { // TODO unit test for the property 'CreatedAt' } + /// /// Test the property 'ExpiresAt' /// @@ -81,6 +81,7 @@ public void ExpiresAtTest() { // TODO unit test for the property 'ExpiresAt' } + /// /// Test the property 'Id' /// @@ -89,6 +90,7 @@ public void IdTest() { // TODO unit test for the property 'Id' } + /// /// Test the property 'Issuer' /// @@ -97,6 +99,7 @@ public void IssuerTest() { // TODO unit test for the property 'Issuer' } + /// /// Test the property 'PublicKey' /// @@ -105,6 +108,7 @@ public void PublicKeyTest() { // TODO unit test for the property 'PublicKey' } + /// /// Test the property 'Scope' /// @@ -113,6 +117,7 @@ public void ScopeTest() { // TODO unit test for the property 'Scope' } + /// /// Test the property 'Subject' /// @@ -121,7 +126,5 @@ public void SubjectTest() { // TODO unit test for the property 'Subject' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs index cf1a990b0a9..b54be60eb30 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraTrustedOAuth2JwtGrantJsonWebKeyInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Kid' /// @@ -65,6 +63,7 @@ public void KidTest() { // TODO unit test for the property 'Kid' } + /// /// Test the property 'Set' /// @@ -73,7 +72,5 @@ public void SetTest() { // TODO unit test for the property 'Set' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialPrimingResponseTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialPrimingResponseTests.cs index 24d0da56a9e..a4e91c07b2b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialPrimingResponseTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialPrimingResponseTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraVerifiableCredentialPrimingResponseInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'CNonce' /// @@ -65,6 +63,7 @@ public void CNonceTest() { // TODO unit test for the property 'CNonce' } + /// /// Test the property 'CNonceExpiresIn' /// @@ -73,6 +72,7 @@ public void CNonceExpiresInTest() { // TODO unit test for the property 'CNonceExpiresIn' } + /// /// Test the property 'Error' /// @@ -81,6 +81,7 @@ public void ErrorTest() { // TODO unit test for the property 'Error' } + /// /// Test the property 'ErrorDebug' /// @@ -89,6 +90,7 @@ public void ErrorDebugTest() { // TODO unit test for the property 'ErrorDebug' } + /// /// Test the property 'ErrorDescription' /// @@ -97,6 +99,7 @@ public void ErrorDescriptionTest() { // TODO unit test for the property 'ErrorDescription' } + /// /// Test the property 'ErrorHint' /// @@ -105,6 +108,7 @@ public void ErrorHintTest() { // TODO unit test for the property 'ErrorHint' } + /// /// Test the property 'Format' /// @@ -113,6 +117,7 @@ public void FormatTest() { // TODO unit test for the property 'Format' } + /// /// Test the property 'StatusCode' /// @@ -121,7 +126,5 @@ public void StatusCodeTest() { // TODO unit test for the property 'StatusCode' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialProofTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialProofTests.cs index 8b636cec265..560f8beb3d5 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialProofTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialProofTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraVerifiableCredentialProofInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'Jwt' /// @@ -65,6 +63,7 @@ public void JwtTest() { // TODO unit test for the property 'Jwt' } + /// /// Test the property 'ProofType' /// @@ -73,7 +72,5 @@ public void ProofTypeTest() { // TODO unit test for the property 'ProofType' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialResponseTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialResponseTests.cs index d16f9e6c8f9..5b120596e77 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialResponseTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVerifiableCredentialResponseTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,7 +55,6 @@ public void HydraVerifiableCredentialResponseInstanceTest() //Assert.IsType(instance); } - /// /// Test the property 'CredentialDraft00' /// @@ -65,6 +63,7 @@ public void CredentialDraft00Test() { // TODO unit test for the property 'CredentialDraft00' } + /// /// Test the property 'Format' /// @@ -73,7 +72,5 @@ public void FormatTest() { // TODO unit test for the property 'Format' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVersionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVersionTests.cs index 7daa2ae5b26..1ce13f278db 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVersionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVersionTests.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,7 +15,6 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using Ory.Hydra.Client.Api; using Ory.Hydra.Client.Model; using Ory.Hydra.Client.Client; using System.Reflection; @@ -56,16 +55,13 @@ public void HydraVersionInstanceTest() //Assert.IsType(instance); } - /// - /// Test the property '_Version' + /// Test the property 'VarVersion' /// [Fact] - public void _VersionTest() + public void VarVersionTest() { - // TODO unit test for the property '_Version' + // TODO unit test for the property 'VarVersion' } - } - } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Ory.Hydra.Client.Test.csproj b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Ory.Hydra.Client.Test.csproj index d2e61f7ce02..627f565146d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Ory.Hydra.Client.Test.csproj +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Ory.Hydra.Client.Test.csproj @@ -3,18 +3,18 @@ Ory.Hydra.Client.Test Ory.Hydra.Client.Test - net5.0 + net6.0 false + annotations - - - + + + - diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs index cc76f4d016a..8328184854b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api @@ -36,8 +37,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// HydraJsonWebKeySet - HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet); + HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0); /// /// Create JSON Web Key @@ -48,8 +50,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet); + ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0); /// /// Delete JSON Web Key /// @@ -59,8 +62,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// - void DeleteJsonWebKey(string set, string kid); + void DeleteJsonWebKey(string set, string kid, int operationIndex = 0); /// /// Delete JSON Web Key @@ -71,8 +75,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid); + ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0); /// /// Delete JSON Web Key Set /// @@ -81,8 +86,9 @@ public interface IJwkApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// - void DeleteJsonWebKeySet(string set); + void DeleteJsonWebKeySet(string set, int operationIndex = 0); /// /// Delete JSON Web Key Set @@ -92,8 +98,9 @@ public interface IJwkApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set); + ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0); /// /// Get JSON Web Key /// @@ -103,8 +110,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// HydraJsonWebKeySet - HydraJsonWebKeySet GetJsonWebKey(string set, string kid); + HydraJsonWebKeySet GetJsonWebKey(string set, string kid, int operationIndex = 0); /// /// Get JSON Web Key @@ -115,8 +123,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid); + ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0); /// /// Retrieve a JSON Web Key Set /// @@ -125,8 +134,9 @@ public interface IJwkApiSync : IApiAccessor /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// HydraJsonWebKeySet - HydraJsonWebKeySet GetJsonWebKeySet(string set); + HydraJsonWebKeySet GetJsonWebKeySet(string set, int operationIndex = 0); /// /// Retrieve a JSON Web Key Set @@ -136,8 +146,9 @@ public interface IJwkApiSync : IApiAccessor /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - ApiResponse GetJsonWebKeySetWithHttpInfo(string set); + ApiResponse GetJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0); /// /// Set JSON Web Key /// @@ -148,8 +159,9 @@ public interface IJwkApiSync : IApiAccessor /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// HydraJsonWebKey - HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)); + HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0); /// /// Set JSON Web Key @@ -161,8 +173,9 @@ public interface IJwkApiSync : IApiAccessor /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKey - ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)); + ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0); /// /// Update a JSON Web Key Set /// @@ -172,8 +185,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// HydraJsonWebKeySet - HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)); + HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0); /// /// Update a JSON Web Key Set @@ -184,8 +198,9 @@ public interface IJwkApiSync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)); + ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0); #endregion Synchronous Operations } @@ -204,9 +219,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create JSON Web Key @@ -217,9 +233,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete JSON Web Key /// @@ -229,9 +246,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete JSON Web Key @@ -242,9 +260,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete JSON Web Key Set /// @@ -253,9 +272,10 @@ public interface IJwkApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete JSON Web Key Set @@ -265,9 +285,10 @@ public interface IJwkApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get JSON Web Key /// @@ -277,9 +298,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get JSON Web Key @@ -290,9 +312,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Retrieve a JSON Web Key Set /// @@ -301,9 +324,10 @@ public interface IJwkApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Retrieve a JSON Web Key Set @@ -313,9 +337,10 @@ public interface IJwkApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set JSON Web Key /// @@ -326,9 +351,10 @@ public interface IJwkApiAsync : IApiAccessor /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKey - System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set JSON Web Key @@ -340,9 +366,10 @@ public interface IJwkApiAsync : IApiAccessor /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKey) - System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update a JSON Web Key Set /// @@ -352,9 +379,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update a JSON Web Key Set @@ -365,9 +393,10 @@ public interface IJwkApiAsync : IApiAccessor /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -494,8 +523,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// HydraJsonWebKeySet - public HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) + public HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateJsonWebKeySetWithHttpInfo(set, hydraCreateJsonWebKeySet); return localVarResponse.Data; @@ -507,8 +537,9 @@ public HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeyS /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) + public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -548,6 +579,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeyS localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + localVarRequestOptions.Operation = "JwkApi.CreateJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/admin/keys/{set}", localVarRequestOptions, this.Configuration); @@ -569,11 +603,12 @@ public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeyS /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - public async System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateJsonWebKeySetWithHttpInfoAsync(set, hydraCreateJsonWebKeySet, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateJsonWebKeySetWithHttpInfoAsync(set, hydraCreateJsonWebKeySet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -583,9 +618,10 @@ public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeyS /// Thrown when fails to make API call /// The JSON Web Key Set ID /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - public async System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -626,6 +662,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeyS localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + localVarRequestOptions.Operation = "JwkApi.CreateJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -648,8 +687,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeyS /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// - public void DeleteJsonWebKey(string set, string kid) + public void DeleteJsonWebKey(string set, string kid, int operationIndex = 0) { DeleteJsonWebKeyWithHttpInfo(set, kid); } @@ -660,8 +700,9 @@ public void DeleteJsonWebKey(string set, string kid) /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -700,6 +741,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo( localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); @@ -721,11 +765,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo( /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteJsonWebKeyWithHttpInfoAsync(set, kid, cancellationToken).ConfigureAwait(false); + await DeleteJsonWebKeyWithHttpInfoAsync(set, kid, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -734,9 +779,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo( /// Thrown when fails to make API call /// The JSON Web Key Set /// The JSON Web Key ID (kid) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -776,6 +822,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo( localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -797,8 +846,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo( /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// - public void DeleteJsonWebKeySet(string set) + public void DeleteJsonWebKeySet(string set, int operationIndex = 0) { DeleteJsonWebKeySetWithHttpInfo(set); } @@ -808,8 +858,9 @@ public void DeleteJsonWebKeySet(string set) /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -841,6 +892,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpIn localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/keys/{set}", localVarRequestOptions, this.Configuration); @@ -861,11 +915,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpIn /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); + await DeleteJsonWebKeySetWithHttpInfoAsync(set, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -873,9 +928,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpIn /// /// Thrown when fails to make API call /// The JSON Web Key Set + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -908,6 +964,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpIn localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -930,8 +989,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpIn /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// HydraJsonWebKeySet - public HydraJsonWebKeySet GetJsonWebKey(string set, string kid) + public HydraJsonWebKeySet GetJsonWebKey(string set, string kid, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeyWithHttpInfo(set, kid); return localVarResponse.Data; @@ -943,8 +1003,9 @@ public HydraJsonWebKeySet GetJsonWebKey(string set, string kid) /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid) + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -983,6 +1044,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWith localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); @@ -1004,11 +1068,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWith /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - public async System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeyWithHttpInfoAsync(set, kid, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeyWithHttpInfoAsync(set, kid, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1018,9 +1083,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWith /// Thrown when fails to make API call /// JSON Web Key Set ID /// JSON Web Key ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - public async System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -1060,6 +1126,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWith localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1081,8 +1150,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWith /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// HydraJsonWebKeySet - public HydraJsonWebKeySet GetJsonWebKeySet(string set) + public HydraJsonWebKeySet GetJsonWebKeySet(string set, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeySetWithHttpInfo(set); return localVarResponse.Data; @@ -1093,8 +1163,9 @@ public HydraJsonWebKeySet GetJsonWebKeySet(string set) /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetWithHttpInfo(string set) + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -1126,6 +1197,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/keys/{set}", localVarRequestOptions, this.Configuration); @@ -1146,11 +1220,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - public async System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeySetWithHttpInfoAsync(set, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1159,9 +1234,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// /// Thrown when fails to make API call /// JSON Web Key Set ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - public async System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -1194,6 +1270,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1217,8 +1296,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// HydraJsonWebKey - public HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)) + public HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeyWithHttpInfo(set, kid, hydraJsonWebKey); return localVarResponse.Data; @@ -1231,8 +1311,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKey - public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)) + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -1273,6 +1354,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter localVarRequestOptions.Data = hydraJsonWebKey; + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); @@ -1295,11 +1379,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKey - public async System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeyWithHttpInfoAsync(set, kid, hydraJsonWebKey, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeyWithHttpInfoAsync(set, kid, hydraJsonWebKey, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1310,9 +1395,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// The JSON Web Key Set ID /// JSON Web Key ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKey) - public async System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -1354,6 +1440,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter localVarRequestOptions.Data = hydraJsonWebKey; + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1376,8 +1465,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// HydraJsonWebKeySet - public HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)) + public HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeySetWithHttpInfo(set, hydraJsonWebKeySet); return localVarResponse.Data; @@ -1389,8 +1479,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)) + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0) { // verify the required parameter 'set' is set if (set == null) @@ -1424,6 +1515,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.Data = hydraJsonWebKeySet; + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/keys/{set}", localVarRequestOptions, this.Configuration); @@ -1445,11 +1539,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - public async System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeySetWithHttpInfoAsync(set, hydraJsonWebKeySet, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeySetWithHttpInfoAsync(set, hydraJsonWebKeySet, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1459,9 +1554,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW /// Thrown when fails to make API call /// The JSON Web Key Set ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - public async System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'set' is set if (set == null) @@ -1496,6 +1592,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetW localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter localVarRequestOptions.Data = hydraJsonWebKeySet; + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs index c528ff10001..aa8bec2a1f6 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api @@ -34,8 +35,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// HydraInlineResponse2001 - HydraInlineResponse2001 GetVersion(); + /// Index associated with the operation. + /// HydraGetVersion200Response + HydraGetVersion200Response GetVersion(int operationIndex = 0); /// /// Return Running Software Version. @@ -44,8 +46,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of HydraInlineResponse2001 - ApiResponse GetVersionWithHttpInfo(); + /// Index associated with the operation. + /// ApiResponse of HydraGetVersion200Response + ApiResponse GetVersionWithHttpInfo(int operationIndex = 0); /// /// Check HTTP Server Status /// @@ -53,8 +56,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraHealthStatus - HydraHealthStatus IsAlive(); + HydraHealthStatus IsAlive(int operationIndex = 0); /// /// Check HTTP Server Status @@ -63,8 +67,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraHealthStatus - ApiResponse IsAliveWithHttpInfo(); + ApiResponse IsAliveWithHttpInfo(int operationIndex = 0); /// /// Check HTTP Server and Database Status /// @@ -72,8 +77,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// HydraInlineResponse200 - HydraInlineResponse200 IsReady(); + /// Index associated with the operation. + /// HydraIsReady200Response + HydraIsReady200Response IsReady(int operationIndex = 0); /// /// Check HTTP Server and Database Status @@ -82,8 +88,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of HydraInlineResponse200 - ApiResponse IsReadyWithHttpInfo(); + /// Index associated with the operation. + /// ApiResponse of HydraIsReady200Response + ApiResponse IsReadyWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -100,9 +107,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of HydraInlineResponse2001 - System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of HydraGetVersion200Response + System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Return Running Software Version. @@ -111,9 +119,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraInlineResponse2001) - System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (HydraGetVersion200Response) + System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server Status /// @@ -121,9 +130,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraHealthStatus - System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server Status @@ -132,9 +142,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraHealthStatus) - System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server and Database Status /// @@ -142,9 +153,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of HydraInlineResponse200 - System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of HydraIsReady200Response + System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server and Database Status @@ -153,9 +165,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraInlineResponse200) - System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (HydraIsReady200Response) + System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -280,10 +293,11 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// HydraInlineResponse2001 - public HydraInlineResponse2001 GetVersion() + /// Index associated with the operation. + /// HydraGetVersion200Response + public HydraGetVersion200Response GetVersion(int operationIndex = 0) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); return localVarResponse.Data; } @@ -291,8 +305,9 @@ public HydraInlineResponse2001 GetVersion() /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of HydraInlineResponse2001 - public Ory.Hydra.Client.Client.ApiResponse GetVersionWithHttpInfo() + /// Index associated with the operation. + /// ApiResponse of HydraGetVersion200Response + public Ory.Hydra.Client.Client.ApiResponse GetVersionWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -317,9 +332,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetVersionWi } + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); @@ -336,11 +354,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetVersionWi /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of HydraInlineResponse2001 - public async System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of HydraGetVersion200Response + public async System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -348,9 +367,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetVersionWi /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraInlineResponse2001) - public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (HydraGetVersion200Response) + public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -376,9 +396,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetVersionWi } + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -396,8 +419,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetVersionWi /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraHealthStatus - public HydraHealthStatus IsAlive() + public HydraHealthStatus IsAlive(int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsAliveWithHttpInfo(); return localVarResponse.Data; @@ -407,8 +431,9 @@ public HydraHealthStatus IsAlive() /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraHealthStatus - public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -433,6 +458,9 @@ public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInf } + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); @@ -452,11 +480,12 @@ public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInf /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraHealthStatus - public async System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -464,9 +493,10 @@ public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInf /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraHealthStatus) - public async System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -492,6 +522,9 @@ public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInf } + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -512,10 +545,11 @@ public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInf /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// HydraInlineResponse200 - public HydraInlineResponse200 IsReady() + /// Index associated with the operation. + /// HydraIsReady200Response + public HydraIsReady200Response IsReady(int operationIndex = 0) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); return localVarResponse.Data; } @@ -523,8 +557,9 @@ public HydraInlineResponse200 IsReady() /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of HydraInlineResponse200 - public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHttpInfo() + /// Index associated with the operation. + /// ApiResponse of HydraIsReady200Response + public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -549,9 +584,12 @@ public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHt } + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); @@ -568,11 +606,12 @@ public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHt /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of HydraInlineResponse200 - public async System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of HydraIsReady200Response + public async System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -580,9 +619,10 @@ public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHt /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraInlineResponse200) - public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (HydraIsReady200Response) + public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -608,9 +648,12 @@ public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHt } + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs index 8151637768c..b462fa0030b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api @@ -36,8 +37,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)); + HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0); /// /// Accept OAuth 2.0 Consent Request @@ -48,8 +50,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)); + ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0); /// /// Accept OAuth 2.0 Login Request /// @@ -59,8 +62,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)); + HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0); /// /// Accept OAuth 2.0 Login Request @@ -71,8 +75,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)); + ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0); /// /// Accept OAuth 2.0 Session Logout Request /// @@ -81,8 +86,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// HydraOAuth2RedirectTo - HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge); + HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); /// /// Accept OAuth 2.0 Session Logout Request @@ -92,8 +98,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); /// /// Create OAuth 2.0 Client /// @@ -102,8 +109,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client); + HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Create OAuth 2.0 Client @@ -113,8 +121,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client); + ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Delete OAuth 2.0 Client /// @@ -123,8 +132,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// - void DeleteOAuth2Client(string id); + void DeleteOAuth2Client(string id, int operationIndex = 0); /// /// Delete OAuth 2.0 Client @@ -134,8 +144,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOAuth2ClientWithHttpInfo(string id); + ApiResponse DeleteOAuth2ClientWithHttpInfo(string id, int operationIndex = 0); /// /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client /// @@ -144,8 +155,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// - void DeleteOAuth2Token(string clientId); + void DeleteOAuth2Token(string clientId, int operationIndex = 0); /// /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client @@ -155,8 +167,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId); + ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId, int operationIndex = 0); /// /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer /// @@ -165,8 +178,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// - void DeleteTrustedOAuth2JwtGrantIssuer(string id); + void DeleteTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0); /// /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer @@ -176,8 +190,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id); + ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0); /// /// Get an OAuth 2.0 Client /// @@ -186,8 +201,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client GetOAuth2Client(string id); + HydraOAuth2Client GetOAuth2Client(string id, int operationIndex = 0); /// /// Get an OAuth 2.0 Client @@ -197,8 +213,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse GetOAuth2ClientWithHttpInfo(string id); + ApiResponse GetOAuth2ClientWithHttpInfo(string id, int operationIndex = 0); /// /// Get OAuth 2.0 Consent Request /// @@ -207,8 +224,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// HydraOAuth2ConsentRequest - HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge); + HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge, int operationIndex = 0); /// /// Get OAuth 2.0 Consent Request @@ -218,8 +236,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2ConsentRequest - ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge); + ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge, int operationIndex = 0); /// /// Get OAuth 2.0 Login Request /// @@ -228,8 +247,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// HydraOAuth2LoginRequest - HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge); + HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge, int operationIndex = 0); /// /// Get OAuth 2.0 Login Request @@ -239,8 +259,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2LoginRequest - ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge); + ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge, int operationIndex = 0); /// /// Get OAuth 2.0 Session Logout Request /// @@ -249,8 +270,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// HydraOAuth2LogoutRequest - HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge); + HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); /// /// Get OAuth 2.0 Session Logout Request @@ -260,8 +282,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of HydraOAuth2LogoutRequest - ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); /// /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer /// @@ -270,8 +293,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// HydraTrustedOAuth2JwtGrantIssuer - HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id); + HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0); /// /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer @@ -281,8 +305,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer - ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id); + ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0); /// /// Introspect OAuth2 Access and Refresh Tokens /// @@ -292,8 +317,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// HydraIntrospectedOAuth2Token - HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string scope = default(string)); + HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string? scope = default(string?), int operationIndex = 0); /// /// Introspect OAuth2 Access and Refresh Tokens @@ -304,8 +330,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// ApiResponse of HydraIntrospectedOAuth2Token - ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)); + ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string? scope = default(string?), int operationIndex = 0); /// /// List OAuth 2.0 Clients /// @@ -317,8 +344,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// List<HydraOAuth2Client> - List ListOAuth2Clients(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)); + List ListOAuth2Clients(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0); /// /// List OAuth 2.0 Clients @@ -331,8 +359,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraOAuth2Client> - ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)); + ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0); /// /// List OAuth 2.0 Consent Sessions of a Subject /// @@ -344,8 +373,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// List<HydraOAuth2ConsentSession> - List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string)); + List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0); /// /// List OAuth 2.0 Consent Sessions of a Subject @@ -358,8 +388,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraOAuth2ConsentSession> - ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string)); + ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0); /// /// List Trusted OAuth2 JWT Bearer Grant Type Issuers /// @@ -370,8 +401,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// List<HydraTrustedOAuth2JwtGrantIssuer> - List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)); + List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0); /// /// List Trusted OAuth2 JWT Bearer Grant Type Issuers @@ -383,8 +415,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> - ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)); + ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0); /// /// OAuth 2.0 Authorize Endpoint /// @@ -392,8 +425,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraErrorOAuth2 - HydraErrorOAuth2 OAuth2Authorize(); + HydraErrorOAuth2 OAuth2Authorize(int operationIndex = 0); /// /// OAuth 2.0 Authorize Endpoint @@ -402,8 +436,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraErrorOAuth2 - ApiResponse OAuth2AuthorizeWithHttpInfo(); + ApiResponse OAuth2AuthorizeWithHttpInfo(int operationIndex = 0); /// /// The OAuth 2.0 Token Endpoint /// @@ -416,8 +451,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// HydraOAuth2TokenExchange - HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)); + HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0); /// /// The OAuth 2.0 Token Endpoint @@ -431,8 +467,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2TokenExchange - ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)); + ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0); /// /// Patch OAuth 2.0 Client /// @@ -442,8 +479,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch); + HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch, int operationIndex = 0); /// /// Patch OAuth 2.0 Client @@ -454,8 +492,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch); + ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch, int operationIndex = 0); /// /// Reject OAuth 2.0 Consent Request /// @@ -465,8 +504,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); /// /// Reject OAuth 2.0 Consent Request @@ -477,8 +517,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); /// /// Reject OAuth 2.0 Login Request /// @@ -488,8 +529,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); /// /// Reject OAuth 2.0 Login Request @@ -500,8 +542,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); /// /// Reject OAuth 2.0 Session Logout Request /// @@ -510,8 +553,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void RejectOAuth2LogoutRequest(string logoutChallenge); + void RejectOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); /// /// Reject OAuth 2.0 Session Logout Request @@ -521,8 +565,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); /// /// Revoke OAuth 2.0 Consent Sessions of a Subject /// @@ -531,10 +576,11 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// - void RevokeOAuth2ConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)); + void RevokeOAuth2ConsentSessions(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0); /// /// Revoke OAuth 2.0 Consent Sessions of a Subject @@ -544,10 +590,11 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)); + ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0); /// /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID /// @@ -557,8 +604,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// - void RevokeOAuth2LoginSessions(string subject = default(string), string sid = default(string)); + void RevokeOAuth2LoginSessions(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0); /// /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID @@ -569,8 +617,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string subject = default(string), string sid = default(string)); + ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0); /// /// Revoke OAuth 2.0 Access or Refresh Token /// @@ -581,8 +630,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// (optional) /// (optional) + /// Index associated with the operation. /// - void RevokeOAuth2Token(string token, string clientId = default(string), string clientSecret = default(string)); + void RevokeOAuth2Token(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0); /// /// Revoke OAuth 2.0 Access or Refresh Token @@ -594,8 +644,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string clientId = default(string), string clientSecret = default(string)); + ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0); /// /// Set OAuth 2.0 Client /// @@ -605,8 +656,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client); + HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Set OAuth 2.0 Client @@ -617,8 +669,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client); + ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Set OAuth2 Client Token Lifespans /// @@ -628,8 +681,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)); + HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0); /// /// Set OAuth2 Client Token Lifespans @@ -640,8 +694,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)); + ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0); /// /// Trust OAuth2 JWT Bearer Grant Type Issuer /// @@ -650,8 +705,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// HydraTrustedOAuth2JwtGrantIssuer - HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)); + HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0); /// /// Trust OAuth2 JWT Bearer Grant Type Issuer @@ -661,8 +717,9 @@ public interface IOAuth2ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer - ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)); + ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0); #endregion Synchronous Operations } @@ -681,9 +738,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept OAuth 2.0 Consent Request @@ -694,9 +752,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept OAuth 2.0 Login Request /// @@ -706,9 +765,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept OAuth 2.0 Login Request @@ -719,9 +779,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept OAuth 2.0 Session Logout Request /// @@ -730,9 +791,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept OAuth 2.0 Session Logout Request @@ -742,9 +804,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create OAuth 2.0 Client /// @@ -753,9 +816,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create OAuth 2.0 Client @@ -765,9 +829,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Client /// @@ -776,9 +841,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Client @@ -788,9 +854,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client /// @@ -799,9 +866,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client @@ -811,9 +879,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer /// @@ -822,9 +891,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer @@ -834,9 +904,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get an OAuth 2.0 Client /// @@ -845,9 +916,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get an OAuth 2.0 Client @@ -857,9 +929,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Consent Request /// @@ -868,9 +941,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2ConsentRequest - System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Consent Request @@ -880,9 +954,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2ConsentRequest) - System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Login Request /// @@ -891,9 +966,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2LoginRequest - System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Login Request @@ -903,9 +979,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2LoginRequest) - System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Session Logout Request /// @@ -914,9 +991,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2LogoutRequest - System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth 2.0 Session Logout Request @@ -926,9 +1004,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2LogoutRequest) - System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer /// @@ -937,9 +1016,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraTrustedOAuth2JwtGrantIssuer - System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer @@ -949,9 +1029,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) - System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Introspect OAuth2 Access and Refresh Tokens /// @@ -961,9 +1042,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraIntrospectedOAuth2Token - System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Introspect OAuth2 Access and Refresh Tokens @@ -974,9 +1056,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraIntrospectedOAuth2Token) - System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List OAuth 2.0 Clients /// @@ -988,9 +1071,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraOAuth2Client> - System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List OAuth 2.0 Clients @@ -1003,9 +1087,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraOAuth2Client>) - System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List OAuth 2.0 Consent Sessions of a Subject /// @@ -1017,9 +1102,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraOAuth2ConsentSession> - System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List OAuth 2.0 Consent Sessions of a Subject @@ -1032,9 +1118,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraOAuth2ConsentSession>) - System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Trusted OAuth2 JWT Bearer Grant Type Issuers /// @@ -1045,9 +1132,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraTrustedOAuth2JwtGrantIssuer> - System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Trusted OAuth2 JWT Bearer Grant Type Issuers @@ -1059,9 +1147,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraTrustedOAuth2JwtGrantIssuer>) - System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OAuth 2.0 Authorize Endpoint /// @@ -1069,9 +1158,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraErrorOAuth2 - System.Threading.Tasks.Task OAuth2AuthorizeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task OAuth2AuthorizeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OAuth 2.0 Authorize Endpoint @@ -1080,9 +1170,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraErrorOAuth2) - System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// The OAuth 2.0 Token Endpoint /// @@ -1095,9 +1186,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2TokenExchange - System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// The OAuth 2.0 Token Endpoint @@ -1111,9 +1203,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2TokenExchange) - System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Patch OAuth 2.0 Client /// @@ -1123,9 +1216,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Patch OAuth 2.0 Client @@ -1136,9 +1230,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Consent Request /// @@ -1148,9 +1243,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Consent Request @@ -1161,9 +1257,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Login Request /// @@ -1173,9 +1270,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Login Request @@ -1186,9 +1284,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Session Logout Request /// @@ -1197,9 +1296,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reject OAuth 2.0 Session Logout Request @@ -1209,9 +1309,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revoke OAuth 2.0 Consent Sessions of a Subject /// @@ -1220,11 +1321,12 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revoke OAuth 2.0 Consent Sessions of a Subject @@ -1234,11 +1336,12 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID /// @@ -1248,9 +1351,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string subject = default(string), string sid = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID @@ -1261,9 +1365,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string subject = default(string), string sid = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revoke OAuth 2.0 Access or Refresh Token /// @@ -1274,9 +1379,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string clientId = default(string), string clientSecret = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Revoke OAuth 2.0 Access or Refresh Token @@ -1288,9 +1394,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string clientId = default(string), string clientSecret = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth 2.0 Client /// @@ -1300,9 +1407,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth 2.0 Client @@ -1313,9 +1421,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth2 Client Token Lifespans /// @@ -1325,9 +1434,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth2 Client Token Lifespans @@ -1338,9 +1448,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Trust OAuth2 JWT Bearer Grant Type Issuer /// @@ -1349,9 +1460,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraTrustedOAuth2JwtGrantIssuer - System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Trust OAuth2 JWT Bearer Grant Type Issuer @@ -1361,9 +1473,10 @@ public interface IOAuth2ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) - System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -1490,8 +1603,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - public HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)) + public HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraAcceptOAuth2ConsentRequest); return localVarResponse.Data; @@ -1503,8 +1617,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)) + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -1538,6 +1653,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration); @@ -1559,11 +1677,12 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - public async System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraAcceptOAuth2ConsentRequest, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraAcceptOAuth2ConsentRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1573,9 +1692,10 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - public async System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -1610,6 +1730,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1632,8 +1755,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - public HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)) + public HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraAcceptOAuth2LoginRequest); return localVarResponse.Data; @@ -1645,8 +1769,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)) + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -1680,6 +1805,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration); @@ -1701,11 +1829,12 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - public async System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraAcceptOAuth2LoginRequest, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraAcceptOAuth2LoginRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1715,9 +1844,10 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - public async System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -1752,6 +1882,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1773,8 +1906,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// HydraOAuth2RedirectTo - public HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge) + public HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LogoutRequestWithHttpInfo(logoutChallenge); return localVarResponse.Data; @@ -1785,8 +1919,9 @@ public HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge) /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -1818,6 +1953,9 @@ public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2Lo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration); @@ -1838,11 +1976,12 @@ public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2Lo /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - public async System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1851,9 +1990,10 @@ public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2Lo /// /// Thrown when fails to make API call /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - public async System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -1886,6 +2026,9 @@ public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2Lo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1907,8 +2050,9 @@ public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2Lo /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client) + public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOAuth2ClientWithHttpInfo(hydraOAuth2Client); return localVarResponse.Data; @@ -1919,8 +2063,9 @@ public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client) /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client) + public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { // verify the required parameter 'hydraOAuth2Client' is set if (hydraOAuth2Client == null) @@ -1953,6 +2098,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2Client localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OAuth2Api.CreateOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/admin/clients", localVarRequestOptions, this.Configuration); @@ -1973,11 +2121,12 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2Client /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOAuth2ClientWithHttpInfoAsync(hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOAuth2ClientWithHttpInfoAsync(hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1986,9 +2135,10 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2Client /// /// Thrown when fails to make API call /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'hydraOAuth2Client' is set if (hydraOAuth2Client == null) @@ -2022,6 +2172,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2Client localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OAuth2Api.CreateOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2043,8 +2196,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2Client /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// - public void DeleteOAuth2Client(string id) + public void DeleteOAuth2Client(string id, int operationIndex = 0) { DeleteOAuth2ClientWithHttpInfo(id); } @@ -2054,8 +2208,9 @@ public void DeleteOAuth2Client(string id) /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2087,6 +2242,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/clients/{id}", localVarRequestOptions, this.Configuration); @@ -2107,11 +2265,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInf /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DeleteOAuth2ClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2119,9 +2278,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInf /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2154,6 +2314,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2175,8 +2338,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInf /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// - public void DeleteOAuth2Token(string clientId) + public void DeleteOAuth2Token(string clientId, int operationIndex = 0) { DeleteOAuth2TokenWithHttpInfo(clientId); } @@ -2186,8 +2350,9 @@ public void DeleteOAuth2Token(string clientId) /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId, int operationIndex = 0) { // verify the required parameter 'clientId' is set if (clientId == null) @@ -2219,6 +2384,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration); @@ -2239,11 +2407,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOAuth2TokenWithHttpInfoAsync(clientId, cancellationToken).ConfigureAwait(false); + await DeleteOAuth2TokenWithHttpInfoAsync(clientId, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2251,9 +2420,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo /// /// Thrown when fails to make API call /// OAuth 2.0 Client ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'clientId' is set if (clientId == null) @@ -2286,6 +2456,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2307,8 +2480,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// - public void DeleteTrustedOAuth2JwtGrantIssuer(string id) + public void DeleteTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0) { DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); } @@ -2318,8 +2492,9 @@ public void DeleteTrustedOAuth2JwtGrantIssuer(string id) /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2351,6 +2526,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIs localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); @@ -2371,11 +2549,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIs /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2383,9 +2562,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIs /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2418,6 +2598,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIs localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2439,8 +2622,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIs /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client GetOAuth2Client(string id) + public HydraOAuth2Client GetOAuth2Client(string id, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ClientWithHttpInfo(id); return localVarResponse.Data; @@ -2451,8 +2635,9 @@ public HydraOAuth2Client GetOAuth2Client(string id) /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2484,6 +2669,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/clients/{id}", localVarRequestOptions, this.Configuration); @@ -2504,11 +2692,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWit /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2517,9 +2706,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWit /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2552,6 +2742,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2573,8 +2766,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWit /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// HydraOAuth2ConsentRequest - public HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge) + public HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ConsentRequestWithHttpInfo(consentChallenge); return localVarResponse.Data; @@ -2585,8 +2779,9 @@ public HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2ConsentRequest - public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge) + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge, int operationIndex = 0) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -2618,6 +2813,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2C localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration); @@ -2638,11 +2836,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2C /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2ConsentRequest - public async System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2651,9 +2850,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2C /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2ConsentRequest) - public async System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -2686,6 +2886,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2C localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2707,8 +2910,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2C /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// HydraOAuth2LoginRequest - public HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge) + public HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LoginRequestWithHttpInfo(loginChallenge); return localVarResponse.Data; @@ -2719,8 +2923,9 @@ public HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge) /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// ApiResponse of HydraOAuth2LoginRequest - public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge) + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge, int operationIndex = 0) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -2752,6 +2957,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Log localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration); @@ -2772,11 +2980,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Log /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2LoginRequest - public async System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2785,9 +2994,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Log /// /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2LoginRequest) - public async System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -2820,6 +3030,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Log localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2841,8 +3054,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Log /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// HydraOAuth2LogoutRequest - public HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge) + public HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LogoutRequestWithHttpInfo(logoutChallenge); return localVarResponse.Data; @@ -2853,8 +3067,9 @@ public HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of HydraOAuth2LogoutRequest - public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -2886,6 +3101,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Lo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration); @@ -2906,11 +3124,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Lo /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2LogoutRequest - public async System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2919,9 +3138,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Lo /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2LogoutRequest) - public async System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -2954,6 +3174,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Lo localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2975,8 +3198,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOAuth2Lo /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// HydraTrustedOAuth2JwtGrantIssuer - public HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id) + public HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); return localVarResponse.Data; @@ -2987,8 +3211,9 @@ public HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer - public Ory.Hydra.Client.Client.ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3020,6 +3245,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.GetTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); @@ -3040,11 +3268,12 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraTrustedOAuth2JwtGrantIssuer - public async System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3053,9 +3282,10 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// /// Thrown when fails to make API call /// The id of the desired grant + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) - public async System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3088,6 +3318,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OAuth2Api.GetTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3110,8 +3343,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// HydraIntrospectedOAuth2Token - public HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string scope = default(string)) + public HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string? scope = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = IntrospectOAuth2TokenWithHttpInfo(token, scope); return localVarResponse.Data; @@ -3123,8 +3357,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// ApiResponse of HydraIntrospectedOAuth2Token - public Ory.Hydra.Client.Client.ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)) + public Ory.Hydra.Client.Client.ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string? scope = default(string?), int operationIndex = 0) { // verify the required parameter 'token' is set if (token == null) @@ -3161,6 +3396,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get } localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + localVarRequestOptions.Operation = "OAuth2Api.IntrospectOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration); @@ -3182,11 +3420,12 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraIntrospectedOAuth2Token - public async System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IntrospectOAuth2TokenWithHttpInfoAsync(token, scope, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IntrospectOAuth2TokenWithHttpInfoAsync(token, scope, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3196,9 +3435,10 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Thrown when fails to make API call /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraIntrospectedOAuth2Token) - public async System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'token' is set if (token == null) @@ -3236,6 +3476,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get } localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + localVarRequestOptions.Operation = "OAuth2Api.IntrospectOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3260,8 +3503,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// List<HydraOAuth2Client> - public List ListOAuth2Clients(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)) + public List ListOAuth2Clients(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ClientsWithHttpInfo(pageSize, pageToken, clientName, owner); return localVarResponse.Data; @@ -3275,8 +3519,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraOAuth2Client> - public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)) + public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3317,6 +3562,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); } + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2Clients"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/admin/clients", localVarRequestOptions, this.Configuration); @@ -3340,11 +3588,12 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraOAuth2Client> - public async System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ClientsWithHttpInfoAsync(pageSize, pageToken, clientName, owner, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ClientsWithHttpInfoAsync(pageSize, pageToken, clientName, owner, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3356,9 +3605,10 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The name of the clients to filter by. (optional) /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraOAuth2Client>) - public async System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3400,6 +3650,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); } + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2Clients"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3424,8 +3677,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// List<HydraOAuth2ConsentSession> - public List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string)) + public List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ConsentSessionsWithHttpInfo(subject, pageSize, pageToken, loginSessionId); return localVarResponse.Data; @@ -3439,8 +3693,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraOAuth2ConsentSession> - public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string)) + public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0) { // verify the required parameter 'subject' is set if (subject == null) @@ -3484,6 +3739,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_session_id", loginSessionId)); } + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); @@ -3507,11 +3765,12 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraOAuth2ConsentSession> - public async System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ConsentSessionsWithHttpInfoAsync(subject, pageSize, pageToken, loginSessionId, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ConsentSessionsWithHttpInfoAsync(subject, pageSize, pageToken, loginSessionId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3523,9 +3782,10 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraOAuth2ConsentSession>) - public async System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string pageToken = default(string), string loginSessionId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'subject' is set if (subject == null) @@ -3570,6 +3830,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_session_id", loginSessionId)); } + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3593,8 +3856,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// List<HydraTrustedOAuth2JwtGrantIssuer> - public List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)) + public List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(maxItems, defaultItems, issuer); return localVarResponse.Data; @@ -3607,8 +3871,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> - public Ory.Hydra.Client.Client.ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)) + public Ory.Hydra.Client.Client.ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3645,6 +3910,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); } + localVarRequestOptions.Operation = "OAuth2Api.ListTrustedOAuth2JwtGrantIssuers"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); @@ -3667,11 +3935,12 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<HydraTrustedOAuth2JwtGrantIssuer> - public async System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(maxItems, defaultItems, issuer, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(maxItems, defaultItems, issuer, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3682,9 +3951,10 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// (optional) /// (optional) /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<HydraTrustedOAuth2JwtGrantIssuer>) - public async System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3722,6 +3992,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); } + localVarRequestOptions.Operation = "OAuth2Api.ListTrustedOAuth2JwtGrantIssuers"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3742,8 +4015,9 @@ public Ory.Hydra.Client.Client.ApiResponse Get /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraErrorOAuth2 - public HydraErrorOAuth2 OAuth2Authorize() + public HydraErrorOAuth2 OAuth2Authorize(int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = OAuth2AuthorizeWithHttpInfo(); return localVarResponse.Data; @@ -3753,8 +4027,9 @@ public HydraErrorOAuth2 OAuth2Authorize() /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraErrorOAuth2 - public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3779,6 +4054,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith } + localVarRequestOptions.Operation = "OAuth2Api.OAuth2Authorize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/oauth2/auth", localVarRequestOptions, this.Configuration); @@ -3798,11 +4076,12 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraErrorOAuth2 - public async System.Threading.Tasks.Task OAuth2AuthorizeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task OAuth2AuthorizeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await OAuth2AuthorizeWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await OAuth2AuthorizeWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3810,9 +4089,10 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraErrorOAuth2) - public async System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -3838,6 +4118,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith } + localVarRequestOptions.Operation = "OAuth2Api.OAuth2Authorize"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3863,8 +4146,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// HydraOAuth2TokenExchange - public HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)) + public HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = Oauth2TokenExchangeWithHttpInfo(grantType, clientId, code, redirectUri, refreshToken); return localVarResponse.Data; @@ -3879,8 +4163,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2TokenExchange - public Ory.Hydra.Client.Client.ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)) + public Ory.Hydra.Client.Client.ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0) { // verify the required parameter 'grantType' is set if (grantType == null) @@ -3929,6 +4214,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter } + localVarRequestOptions.Operation = "OAuth2Api.Oauth2TokenExchange"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (basic) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -3937,9 +4225,19 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith } // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -3965,11 +4263,12 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2TokenExchange - public async System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await Oauth2TokenExchangeWithHttpInfoAsync(grantType, clientId, code, redirectUri, refreshToken, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await Oauth2TokenExchangeWithHttpInfoAsync(grantType, clientId, code, redirectUri, refreshToken, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3982,9 +4281,10 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// (optional) /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2TokenExchange) - public async System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'grantType' is set if (grantType == null) @@ -4034,6 +4334,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter } + localVarRequestOptions.Operation = "OAuth2Api.Oauth2TokenExchange"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (basic) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -4042,9 +4345,19 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith } // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -4068,8 +4381,9 @@ public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWith /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch) + public HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = PatchOAuth2ClientWithHttpInfo(id, hydraJsonPatch); return localVarResponse.Data; @@ -4081,8 +4395,9 @@ public HydraOAuth2Client PatchOAuth2Client(string id, List hydra /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch) + public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -4122,6 +4437,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraJsonPatch; + localVarRequestOptions.Operation = "OAuth2Api.PatchOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Patch("/admin/clients/{id}", localVarRequestOptions, this.Configuration); @@ -4143,11 +4461,12 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await PatchOAuth2ClientWithHttpInfoAsync(id, hydraJsonPatch, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await PatchOAuth2ClientWithHttpInfoAsync(id, hydraJsonPatch, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4157,9 +4476,10 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -4200,6 +4520,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraJsonPatch; + localVarRequestOptions.Operation = "OAuth2Api.PatchOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PatchAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4222,8 +4545,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - public HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + public HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraRejectOAuth2Request); return localVarResponse.Data; @@ -4235,8 +4559,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -4270,6 +4595,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); localVarRequestOptions.Data = hydraRejectOAuth2Request; + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration); @@ -4291,11 +4619,12 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - public async System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraRejectOAuth2Request, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraRejectOAuth2Request, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4305,9 +4634,10 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Consent Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - public async System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'consentChallenge' is set if (consentChallenge == null) @@ -4342,6 +4672,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); localVarRequestOptions.Data = hydraRejectOAuth2Request; + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4364,8 +4697,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// HydraOAuth2RedirectTo - public HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + public HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraRejectOAuth2Request); return localVarResponse.Data; @@ -4377,8 +4711,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2RedirectTo - public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -4412,6 +4747,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); localVarRequestOptions.Data = hydraRejectOAuth2Request; + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration); @@ -4433,11 +4771,12 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2RedirectTo - public async System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraRejectOAuth2Request, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraRejectOAuth2Request, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4447,9 +4786,10 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// Thrown when fails to make API call /// OAuth 2.0 Login Request Challenge /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2RedirectTo) - public async System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'loginChallenge' is set if (loginChallenge == null) @@ -4484,6 +4824,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); localVarRequestOptions.Data = hydraRejectOAuth2Request; + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4505,8 +4848,9 @@ public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientW /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void RejectOAuth2LogoutRequest(string logoutChallenge) + public void RejectOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) { RejectOAuth2LogoutRequestWithHttpInfo(logoutChallenge); } @@ -4516,8 +4860,9 @@ public void RejectOAuth2LogoutRequest(string logoutChallenge) /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -4549,6 +4894,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration); @@ -4569,11 +4917,12 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await RejectOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + await RejectOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -4581,9 +4930,10 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'logoutChallenge' is set if (logoutChallenge == null) @@ -4616,6 +4966,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4637,12 +4990,13 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// - public void RevokeOAuth2ConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)) + public void RevokeOAuth2ConsentSessions(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0) { - RevokeOAuth2ConsentSessionsWithHttpInfo(subject, _client, all); + RevokeOAuth2ConsentSessionsWithHttpInfo(subject, varClient, all); } /// @@ -4650,10 +5004,11 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0) { // verify the required parameter 'subject' is set if (subject == null) @@ -4684,15 +5039,18 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - if (_client != null) + if (varClient != null) { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", varClient)); } if (all != null) { localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); } + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); @@ -4713,13 +5071,14 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await RevokeOAuth2ConsentSessionsWithHttpInfoAsync(subject, _client, all, cancellationToken).ConfigureAwait(false); + await RevokeOAuth2ConsentSessionsWithHttpInfoAsync(subject, varClient, all, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -4727,11 +5086,12 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// Thrown when fails to make API call /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'subject' is set if (subject == null) @@ -4763,15 +5123,18 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - if (_client != null) + if (varClient != null) { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", varClient)); } if (all != null) { localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); } + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4794,8 +5157,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// - public void RevokeOAuth2LoginSessions(string subject = default(string), string sid = default(string)) + public void RevokeOAuth2LoginSessions(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0) { RevokeOAuth2LoginSessionsWithHttpInfo(subject, sid); } @@ -4806,8 +5170,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string subject = default(string), string sid = default(string)) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -4840,6 +5205,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "sid", sid)); } + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2LoginSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration); @@ -4861,11 +5229,12 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string subject = default(string), string sid = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await RevokeOAuth2LoginSessionsWithHttpInfoAsync(subject, sid, cancellationToken).ConfigureAwait(false); + await RevokeOAuth2LoginSessionsWithHttpInfoAsync(subject, sid, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -4874,9 +5243,10 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// Thrown when fails to make API call /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string subject = default(string), string sid = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -4910,6 +5280,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "sid", sid)); } + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2LoginSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4933,8 +5306,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// (optional) /// (optional) + /// Index associated with the operation. /// - public void RevokeOAuth2Token(string token, string clientId = default(string), string clientSecret = default(string)) + public void RevokeOAuth2Token(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0) { RevokeOAuth2TokenWithHttpInfo(token, clientId, clientSecret); } @@ -4946,8 +5320,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string clientId = default(string), string clientSecret = default(string)) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0) { // verify the required parameter 'token' is set if (token == null) @@ -4988,6 +5363,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (basic) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -4996,9 +5374,19 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -5022,11 +5410,12 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string clientId = default(string), string clientSecret = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await RevokeOAuth2TokenWithHttpInfoAsync(token, clientId, clientSecret, cancellationToken).ConfigureAwait(false); + await RevokeOAuth2TokenWithHttpInfoAsync(token, clientId, clientSecret, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -5036,9 +5425,10 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string clientId = default(string), string clientSecret = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'token' is set if (token == null) @@ -5080,6 +5470,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (basic) required // http basic authentication required if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -5088,9 +5481,19 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith } // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -5114,8 +5517,9 @@ public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWith /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client) + public HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientWithHttpInfo(id, hydraOAuth2Client); return localVarResponse.Data; @@ -5127,8 +5531,9 @@ public HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client) + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -5168,6 +5573,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/clients/{id}", localVarRequestOptions, this.Configuration); @@ -5189,11 +5597,12 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientWithHttpInfoAsync(id, hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientWithHttpInfoAsync(id, hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5203,9 +5612,10 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -5246,6 +5656,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5268,8 +5681,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)) + public HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientLifespansWithHttpInfo(id, hydraOAuth2ClientTokenLifespans); return localVarResponse.Data; @@ -5281,8 +5695,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)) + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -5316,6 +5731,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2ClientLifespans"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Put("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration); @@ -5337,11 +5755,12 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientLifespansWithHttpInfoAsync(id, hydraOAuth2ClientTokenLifespans, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientLifespansWithHttpInfoAsync(id, hydraOAuth2ClientTokenLifespans, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5351,9 +5770,10 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -5388,6 +5808,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2ClientLifespans"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5409,8 +5832,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// HydraTrustedOAuth2JwtGrantIssuer - public HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)) + public HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = TrustOAuth2JwtGrantIssuerWithHttpInfo(hydraTrustOAuth2JwtGrantIssuer); return localVarResponse.Data; @@ -5421,8 +5845,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer - public Ory.Hydra.Client.Client.ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)) + public Ory.Hydra.Client.Client.ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -5449,6 +5874,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + localVarRequestOptions.Operation = "OAuth2Api.TrustOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); @@ -5469,11 +5897,12 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraTrustedOAuth2JwtGrantIssuer - public async System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(hydraTrustOAuth2JwtGrantIssuer, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(hydraTrustOAuth2JwtGrantIssuer, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5482,9 +5911,10 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) - public async System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -5512,6 +5942,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWit localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + localVarRequestOptions.Operation = "OAuth2Api.TrustOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs index 2dddc8f4504..a3f32cc84b2 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api @@ -35,8 +36,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client); + HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Register OAuth2 Client using OpenID Dynamic Client Registration @@ -46,8 +48,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client); + ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Issues a Verifiable Credential /// @@ -56,8 +59,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// HydraVerifiableCredentialResponse - HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody)); + HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0); /// /// Issues a Verifiable Credential @@ -67,8 +71,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraVerifiableCredentialResponse - ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody)); + ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0); /// /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol /// @@ -77,8 +82,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// - void DeleteOidcDynamicClient(string id); + void DeleteOidcDynamicClient(string id, int operationIndex = 0); /// /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol @@ -88,8 +94,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id); + ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0); /// /// OpenID Connect Discovery /// @@ -97,8 +104,9 @@ public interface IOidcApiSync : IApiAccessor /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraOidcConfiguration - HydraOidcConfiguration DiscoverOidcConfiguration(); + HydraOidcConfiguration DiscoverOidcConfiguration(int operationIndex = 0); /// /// OpenID Connect Discovery @@ -107,8 +115,9 @@ public interface IOidcApiSync : IApiAccessor /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraOidcConfiguration - ApiResponse DiscoverOidcConfigurationWithHttpInfo(); + ApiResponse DiscoverOidcConfigurationWithHttpInfo(int operationIndex = 0); /// /// Get OAuth2 Client using OpenID Dynamic Client Registration /// @@ -117,8 +126,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client GetOidcDynamicClient(string id); + HydraOAuth2Client GetOidcDynamicClient(string id, int operationIndex = 0); /// /// Get OAuth2 Client using OpenID Dynamic Client Registration @@ -128,8 +138,9 @@ public interface IOidcApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse GetOidcDynamicClientWithHttpInfo(string id); + ApiResponse GetOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0); /// /// OpenID Connect Userinfo /// @@ -137,8 +148,9 @@ public interface IOidcApiSync : IApiAccessor /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraOidcUserInfo - HydraOidcUserInfo GetOidcUserInfo(); + HydraOidcUserInfo GetOidcUserInfo(int operationIndex = 0); /// /// OpenID Connect Userinfo @@ -147,8 +159,9 @@ public interface IOidcApiSync : IApiAccessor /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraOidcUserInfo - ApiResponse GetOidcUserInfoWithHttpInfo(); + ApiResponse GetOidcUserInfoWithHttpInfo(int operationIndex = 0); /// /// OpenID Connect Front- and Back-channel Enabled Logout /// @@ -156,8 +169,9 @@ public interface IOidcApiSync : IApiAccessor /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - void RevokeOidcSession(); + void RevokeOidcSession(int operationIndex = 0); /// /// OpenID Connect Front- and Back-channel Enabled Logout @@ -166,8 +180,9 @@ public interface IOidcApiSync : IApiAccessor /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse RevokeOidcSessionWithHttpInfo(); + ApiResponse RevokeOidcSessionWithHttpInfo(int operationIndex = 0); /// /// Set OAuth2 Client using OpenID Dynamic Client Registration /// @@ -177,8 +192,9 @@ public interface IOidcApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client); + HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); /// /// Set OAuth2 Client using OpenID Dynamic Client Registration @@ -189,8 +205,9 @@ public interface IOidcApiSync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client); + ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); #endregion Synchronous Operations } @@ -208,9 +225,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Register OAuth2 Client using OpenID Dynamic Client Registration @@ -220,9 +238,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Issues a Verifiable Credential /// @@ -231,9 +250,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraVerifiableCredentialResponse - System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Issues a Verifiable Credential @@ -243,9 +263,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraVerifiableCredentialResponse) - System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol /// @@ -254,9 +275,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol @@ -266,9 +288,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Discovery /// @@ -276,9 +299,10 @@ public interface IOidcApiAsync : IApiAccessor /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOidcConfiguration - System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Discovery @@ -287,9 +311,10 @@ public interface IOidcApiAsync : IApiAccessor /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOidcConfiguration) - System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth2 Client using OpenID Dynamic Client Registration /// @@ -298,9 +323,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get OAuth2 Client using OpenID Dynamic Client Registration @@ -310,9 +336,10 @@ public interface IOidcApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Userinfo /// @@ -320,9 +347,10 @@ public interface IOidcApiAsync : IApiAccessor /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOidcUserInfo - System.Threading.Tasks.Task GetOidcUserInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOidcUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Userinfo @@ -331,9 +359,10 @@ public interface IOidcApiAsync : IApiAccessor /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOidcUserInfo) - System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Front- and Back-channel Enabled Logout /// @@ -341,9 +370,10 @@ public interface IOidcApiAsync : IApiAccessor /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task RevokeOidcSessionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RevokeOidcSessionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// OpenID Connect Front- and Back-channel Enabled Logout @@ -352,9 +382,10 @@ public interface IOidcApiAsync : IApiAccessor /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth2 Client using OpenID Dynamic Client Registration /// @@ -364,9 +395,10 @@ public interface IOidcApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Set OAuth2 Client using OpenID Dynamic Client Registration @@ -377,9 +409,10 @@ public interface IOidcApiAsync : IApiAccessor /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -505,8 +538,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client) + public HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOidcDynamicClientWithHttpInfo(hydraOAuth2Client); return localVarResponse.Data; @@ -517,8 +551,9 @@ public HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Cl /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client) + public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { // verify the required parameter 'hydraOAuth2Client' is set if (hydraOAuth2Client == null) @@ -551,6 +586,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OidcApi.CreateOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/oauth2/register", localVarRequestOptions, this.Configuration); @@ -571,11 +609,12 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOidcDynamicClientWithHttpInfoAsync(hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOidcDynamicClientWithHttpInfoAsync(hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -584,9 +623,10 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// Dynamic Client Registration Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'hydraOAuth2Client' is set if (hydraOAuth2Client == null) @@ -620,6 +660,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OidcApi.CreateOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/register", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -641,8 +684,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// HydraVerifiableCredentialResponse - public HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody)) + public HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateVerifiableCredentialWithHttpInfo(hydraCreateVerifiableCredentialRequestBody); return localVarResponse.Data; @@ -653,8 +697,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of HydraVerifiableCredentialResponse - public Ory.Hydra.Client.Client.ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody)) + public Ory.Hydra.Client.Client.ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -681,6 +726,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC localVarRequestOptions.Data = hydraCreateVerifiableCredentialRequestBody; + localVarRequestOptions.Operation = "OidcApi.CreateVerifiableCredential"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/credentials", localVarRequestOptions, this.Configuration); @@ -701,11 +749,12 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraVerifiableCredentialResponse - public async System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateVerifiableCredentialWithHttpInfoAsync(hydraCreateVerifiableCredentialRequestBody, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateVerifiableCredentialWithHttpInfoAsync(hydraCreateVerifiableCredentialRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -714,9 +763,10 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraVerifiableCredentialResponse) - public async System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -744,6 +794,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC localVarRequestOptions.Data = hydraCreateVerifiableCredentialRequestBody; + localVarRequestOptions.Operation = "OidcApi.CreateVerifiableCredential"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/credentials", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -765,8 +818,9 @@ public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicC /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// - public void DeleteOidcDynamicClient(string id) + public void DeleteOidcDynamicClient(string id, int operationIndex = 0) { DeleteOidcDynamicClientWithHttpInfo(id); } @@ -776,8 +830,9 @@ public void DeleteOidcDynamicClient(string id) /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -809,6 +864,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHt localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OidcApi.DeleteOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -835,11 +893,12 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHt /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOidcDynamicClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DeleteOidcDynamicClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -847,9 +906,10 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHt /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -882,6 +942,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHt localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OidcApi.DeleteOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -908,8 +971,9 @@ public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHt /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraOidcConfiguration - public HydraOidcConfiguration DiscoverOidcConfiguration() + public HydraOidcConfiguration DiscoverOidcConfiguration(int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverOidcConfigurationWithHttpInfo(); return localVarResponse.Data; @@ -919,8 +983,9 @@ public HydraOidcConfiguration DiscoverOidcConfiguration() /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraOidcConfiguration - public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcConfigurationWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcConfigurationWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -945,6 +1010,9 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcC } + localVarRequestOptions.Operation = "OidcApi.DiscoverOidcConfiguration"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration); @@ -964,11 +1032,12 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcC /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOidcConfiguration - public async System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverOidcConfigurationWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverOidcConfigurationWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -976,9 +1045,10 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcC /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOidcConfiguration) - public async System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -1004,6 +1074,9 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcC } + localVarRequestOptions.Operation = "OidcApi.DiscoverOidcConfiguration"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1025,8 +1098,9 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcC /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client GetOidcDynamicClient(string id) + public HydraOAuth2Client GetOidcDynamicClient(string id, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcDynamicClientWithHttpInfo(id); return localVarResponse.Data; @@ -1037,8 +1111,9 @@ public HydraOAuth2Client GetOidcDynamicClient(string id) /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClientWithHttpInfo(string id) + public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -1070,6 +1145,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClie localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OidcApi.GetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1096,11 +1174,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClie /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcDynamicClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcDynamicClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1109,9 +1188,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClie /// /// Thrown when fails to make API call /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -1144,6 +1224,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClie localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "OidcApi.GetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1170,8 +1253,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClie /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraOidcUserInfo - public HydraOidcUserInfo GetOidcUserInfo() + public HydraOidcUserInfo GetOidcUserInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcUserInfoWithHttpInfo(); return localVarResponse.Data; @@ -1181,8 +1265,9 @@ public HydraOidcUserInfo GetOidcUserInfo() /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraOidcUserInfo - public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -1207,11 +1292,24 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWit } + localVarRequestOptions.Operation = "OidcApi.GetOidcUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -1232,11 +1330,12 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWit /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOidcUserInfo - public async System.Threading.Tasks.Task GetOidcUserInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOidcUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcUserInfoWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcUserInfoWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1244,9 +1343,10 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWit /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOidcUserInfo) - public async System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -1272,11 +1372,24 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWit } + localVarRequestOptions.Operation = "OidcApi.GetOidcUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oauth2) required // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } } // make the HTTP request @@ -1298,8 +1411,9 @@ public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWit /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// - public void RevokeOidcSession() + public void RevokeOidcSession(int operationIndex = 0) { RevokeOidcSessionWithHttpInfo(); } @@ -1308,8 +1422,9 @@ public void RevokeOidcSession() /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -1333,6 +1448,9 @@ public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo } + localVarRequestOptions.Operation = "OidcApi.RevokeOidcSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration); @@ -1352,20 +1470,22 @@ public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task RevokeOidcSessionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RevokeOidcSessionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await RevokeOidcSessionWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + await RevokeOidcSessionWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } /// /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -1390,6 +1510,9 @@ public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo } + localVarRequestOptions.Operation = "OidcApi.RevokeOidcSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1412,8 +1535,9 @@ public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// HydraOAuth2Client - public HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client) + public HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOidcDynamicClientWithHttpInfo(id, hydraOAuth2Client); return localVarResponse.Data; @@ -1425,8 +1549,9 @@ public HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydra /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client) + public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -1466,6 +1591,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClie localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OidcApi.SetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) @@ -1493,11 +1621,12 @@ public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClie /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOidcDynamicClientWithHttpInfoAsync(id, hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOidcDynamicClientWithHttpInfoAsync(id, hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1507,9 +1636,10 @@ public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClie /// Thrown when fails to make API call /// OAuth 2.0 Client ID /// OAuth 2.0 Client Request Body + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -1550,6 +1680,9 @@ public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClie localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = hydraOAuth2Client; + localVarRequestOptions.Operation = "OidcApi.SetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (bearer) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs index ce0b57474c2..75b3e7e8e8b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api @@ -34,8 +35,9 @@ public interface IWellknownApiSync : IApiAccessor /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraJsonWebKeySet - HydraJsonWebKeySet DiscoverJsonWebKeys(); + HydraJsonWebKeySet DiscoverJsonWebKeys(int operationIndex = 0); /// /// Discover Well-Known JSON Web Keys @@ -44,8 +46,9 @@ public interface IWellknownApiSync : IApiAccessor /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - ApiResponse DiscoverJsonWebKeysWithHttpInfo(); + ApiResponse DiscoverJsonWebKeysWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -62,9 +65,10 @@ public interface IWellknownApiAsync : IApiAccessor /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Discover Well-Known JSON Web Keys @@ -73,9 +77,10 @@ public interface IWellknownApiAsync : IApiAccessor /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -200,8 +205,9 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// HydraJsonWebKeySet - public HydraJsonWebKeySet DiscoverJsonWebKeys() + public HydraJsonWebKeySet DiscoverJsonWebKeys(int operationIndex = 0) { Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverJsonWebKeysWithHttpInfo(); return localVarResponse.Data; @@ -211,8 +217,9 @@ public HydraJsonWebKeySet DiscoverJsonWebKeys() /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of HydraJsonWebKeySet - public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKeysWithHttpInfo() + public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKeysWithHttpInfo(int operationIndex = 0) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -237,6 +244,9 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKe } + localVarRequestOptions.Operation = "WellknownApi.DiscoverJsonWebKeys"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/.well-known/jwks.json", localVarRequestOptions, this.Configuration); @@ -256,11 +266,12 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKe /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of HydraJsonWebKeySet - public async System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverJsonWebKeysWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverJsonWebKeysWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -268,9 +279,10 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKe /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (HydraJsonWebKeySet) - public async System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -296,6 +308,9 @@ public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKe } + localVarRequestOptions.Operation = "WellknownApi.DiscoverJsonWebKeys"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/jwks.json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs index ba4684e7ad8..42390b412fb 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,24 +23,24 @@ using System.Threading; using System.Text.RegularExpressions; using System.Threading.Tasks; -using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using RestSharp; -using RestSharp.Deserializers; +using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; +using FileIO = System.IO.File; using Polly; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Client { /// /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. /// - internal class CustomJsonCodec : RestSharp.Serializers.ISerializer, RestSharp.Deserializers.IDeserializer + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. @@ -72,10 +72,10 @@ public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfi /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is Ory.Hydra.Client.Model.AbstractOpenAPISchema) + if (obj != null && obj is AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((Ory.Hydra.Client.Model.AbstractOpenAPISchema)obj).ToJson(); + return ((AbstractOpenAPISchema)obj).ToJson(); } else { @@ -83,7 +83,9 @@ public string Serialize(object obj) } } - public T Deserialize(IRestResponse response) + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) { var result = (T)Deserialize(response, typeof(T)); return result; @@ -95,7 +97,7 @@ public T Deserialize(IRestResponse response) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - internal object Deserialize(IRestResponse response, Type type) + internal object Deserialize(RestResponse response, Type type) { if (type == typeof(byte[])) // return byte array { @@ -118,7 +120,7 @@ internal object Deserialize(IRestResponse response, Type type) if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); + FileIO.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -129,7 +131,7 @@ internal object Deserialize(IRestResponse response, Type type) if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -148,15 +150,18 @@ internal object Deserialize(IRestResponse response, Type type) } } - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } + public string[] AcceptedContentTypes => ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public ContentType ContentType { get; set; } = ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; } /// /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), @@ -187,21 +192,21 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// Allows for extending request processing for generated code. /// /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); + partial void InterceptRequest(RestRequest request); /// /// Allows for extending response processing for generated code. /// /// The RestSharp request object /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); + partial void InterceptResponse(RestRequest request, RestResponse response); /// /// Initializes a new instance of the , defaulting to the global configurations' base url. /// public ApiClient() { - _baseUrl = Ory.Hydra.Client.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = GlobalConfiguration.Instance.BasePath; } /// @@ -229,25 +234,25 @@ private RestSharpMethod Method(HttpMethod method) switch (method) { case HttpMethod.Get: - other = RestSharpMethod.GET; + other = RestSharpMethod.Get; break; case HttpMethod.Post: - other = RestSharpMethod.POST; + other = RestSharpMethod.Post; break; case HttpMethod.Put: - other = RestSharpMethod.PUT; + other = RestSharpMethod.Put; break; case HttpMethod.Delete: - other = RestSharpMethod.DELETE; + other = RestSharpMethod.Delete; break; case HttpMethod.Head: - other = RestSharpMethod.HEAD; + other = RestSharpMethod.Head; break; case HttpMethod.Options: - other = RestSharpMethod.OPTIONS; + other = RestSharpMethod.Options; break; case HttpMethod.Patch: - other = RestSharpMethod.PATCH; + other = RestSharpMethod.Patch; break; default: throw new ArgumentOutOfRangeException("method", method, null); @@ -258,14 +263,14 @@ private RestSharpMethod Method(HttpMethod method) /// /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. /// /// The http verb. /// The target path (or resource). /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. /// [private] A new RestRequest instance. /// private RestRequest NewRequest( @@ -278,11 +283,7 @@ private RestRequest NewRequest( if (options == null) throw new ArgumentNullException("options"); if (configuration == null) throw new ArgumentNullException("configuration"); - RestRequest request = new RestRequest(Method(method)) - { - Resource = path, - JsonSerializer = new CustomJsonCodec(SerializerSettings, configuration) - }; + RestRequest request = new RestRequest(path, Method(method)); if (options.PathParameters != null) { @@ -377,25 +378,24 @@ private RestRequest NewRequest( var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } } } - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - request.AddCookie(cookie.Name, cookie.Value); - } - } - return request; } - private ApiResponse ToApiResponse(IRestResponse response) + /// + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// + /// The RestSharp response object + /// A new ApiResponse instance. + private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; string rawContent = response.Content; @@ -414,9 +414,17 @@ private ApiResponse ToApiResponse(IRestResponse response) } } + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + if (response.Cookies != null) { - foreach (var responseCookies in response.Cookies) + foreach (var responseCookies in response.Cookies.Cast()) { transformed.Cookies.Add( new Cookie( @@ -431,235 +439,190 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + /// + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// + /// Local function that executes http request and returns http response. + /// Local function to specify options for the service. + /// The RestSharp request object + /// The RestSharp options object + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A new ApiResponse instance. + private ApiResponse ExecClient(Func> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); - - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) - { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); - } - else - { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); - - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) + var clientOptions = new RestClientOptions(baseUrl) { - client.Proxy = configuration.Proxy; - } - - if (configuration.UserAgent != null) + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; + setOptions(clientOptions); + + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) { - client.UserAgent = configuration.UserAgent; + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthFlow, + SerializerSettings, + configuration); } - if (configuration.ClientCertificates != null) + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { - client.ClientCertificates = configuration.ClientCertificates; - } + InterceptRequest(request); - InterceptRequest(req); + RestResponse response = getResponse(client); - IRestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(req); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Ory.Hydra.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try + try + { + response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + response.Data = (T)(object)new MemoryStream(response.RawBytes); } - catch (Exception ex) + else if (typeof(T).Name == "Byte[]") // for byte response { - throw ex.InnerException != null ? ex.InnerException : ex; + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private RestResponse DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) { - RestClient client = new RestClient(_baseUrl); - - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) + if (policyResult.Outcome == OutcomeType.Successful) { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); + return client.Deserialize(policyResult.Result); } else { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } - - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); - - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) - { - client.Proxy = configuration.Proxy; - } - - if (configuration.UserAgent != null) - { - client.UserAgent = configuration.UserAgent; - } - - if (configuration.ClientCertificates != null) - { - client.ClientCertificates = configuration.ClientCertificates; - } - - InterceptRequest(req); - - IRestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + return new RestResponse(request) { - Request = req, ErrorException = policyResult.FinalException }; } - else + } + + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + Action setOptions = (clientOptions) => { - response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); - } + var cookies = new CookieContainer(); - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Ory.Hydra.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + clientOptions.CookieContainer = cookies; + }; + + Func> getResponse = (client) => { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return DeserializeRestResponseFromPolicy(client, request, policyResult); + } + else + { + return client.Execute(request); + } + }; - InterceptResponse(req, response); + return ExecClient(getResponse, setOptions, request, options, configuration); + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) + private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) + { + Action setOptions = (clientOptions) => { - result.ErrorText = response.ErrorMessage; - } + //no extra options + }; - if (response.Cookies != null && response.Cookies.Count > 0) + Func> getResponse = (client) => { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + Func>> action = async () => { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (RetryConfiguration.AsyncRetryPolicy != null) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } - } - return result; + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + return DeserializeRestResponseFromPolicy(client, request, policyResult); + } + else + { + return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + } + }; + return action().Result; + }; + + return Task.FromResult>(ExecClient(getResponse, setOptions, request, options, configuration)); } #region IAsynchronousClient @@ -672,10 +635,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -687,10 +650,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -702,10 +665,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -717,10 +680,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -732,10 +695,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -747,10 +710,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -762,10 +725,10 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -781,7 +744,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -795,7 +758,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -809,7 +772,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -823,7 +786,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -837,7 +800,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -851,7 +814,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -865,7 +828,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs index 58de728bf6f..ff1834fb4ce 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs index fee54a1001c..cb7953db817 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs new file mode 100644 index 00000000000..f816f488f06 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs @@ -0,0 +1,106 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; +using RestSharp; +using RestSharp.Authenticators; + +namespace Ory.Hydra.Client.Client.Auth +{ + /// + /// An authenticator for OAuth2 authentication flows + /// + public class OAuthAuthenticator : AuthenticatorBase + { + readonly string _tokenUrl; + readonly string _clientId; + readonly string _clientSecret; + readonly string _grantType; + readonly JsonSerializerSettings _serializerSettings; + readonly IReadableConfiguration _configuration; + + /// + /// Initialize the OAuth2 Authenticator + /// + public OAuthAuthenticator( + string tokenUrl, + string clientId, + string clientSecret, + OAuthFlow? flow, + JsonSerializerSettings serializerSettings, + IReadableConfiguration configuration) : base("") + { + _tokenUrl = tokenUrl; + _clientId = clientId; + _clientSecret = clientSecret; + _serializerSettings = serializerSettings; + _configuration = configuration; + + switch (flow) + { + /*case OAuthFlow.ACCESS_CODE: + _grantType = "authorization_code"; + break; + case OAuthFlow.IMPLICIT: + _grantType = "implicit"; + break; + case OAuthFlow.PASSWORD: + _grantType = "password"; + break;*/ + case OAuthFlow.APPLICATION: + _grantType = "client_credentials"; + break; + default: + break; + } + } + + /// + /// Creates an authentication parameter from an access token. + /// + /// Access token to create a parameter from. + /// An authentication parameter. + protected override async ValueTask GetAuthenticationParameter(string accessToken) + { + var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; + return new HeaderParameter(KnownHeaders.Authorization, token); + } + + /// + /// Gets the token from the OAuth2 server. + /// + /// An authentication token. + async Task GetToken() + { + var client = new RestClient(_tokenUrl, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); + + var request = new RestRequest() + .AddParameter("grant_type", _grantType) + .AddParameter("client_id", _clientId) + .AddParameter("client_secret", _clientSecret); + var response = await client.PostAsync(request).ConfigureAwait(false); + + // RFC6749 - token_type is case insensitive. + // RFC6750 - In Authorization header Bearer should be capitalized. + // Fix the capitalization irrespective of token_type casing. + switch (response.TokenType?.ToLower()) + { + case "bearer": + return $"Bearer {response.AccessToken}"; + default: + return $"{response.TokenType} {response.AccessToken}"; + } + } + } +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs new file mode 100644 index 00000000000..cdb0890d0f7 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs @@ -0,0 +1,28 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +namespace Ory.Hydra.Client.Client.Auth +{ + /// + /// Available flows for OAuth2 authentication + /// + public enum OAuthFlow + { + /// Authorization code flow + ACCESS_CODE, + /// Implicit flow + IMPLICIT, + /// Password flow + PASSWORD, + /// Client credentials flow + APPLICATION + } +} \ No newline at end of file diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/TokenResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/TokenResponse.cs new file mode 100644 index 00000000000..6971d7bf1e8 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Auth/TokenResponse.cs @@ -0,0 +1,23 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Client.Auth +{ + class TokenResponse + { + [JsonProperty("token_type")] + public string TokenType { get; set; } + [JsonProperty("access_token")] + public string AccessToken { get; set; } + } +} \ No newline at end of file diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs index 71c6d156140..5ff602f0b9f 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,9 +11,11 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; @@ -101,45 +103,26 @@ public static string ParameterToString(object obj, IReadableConfiguration config return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; - if (obj is ICollection collection) - return string.Join(",", collection.Cast()); + if (obj is ICollection collection) { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); return Convert.ToString(obj, CultureInfo.InvariantCulture); } /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// Serializes the given object when not null. Otherwise return null. /// - /// string to be URL encoded - /// Byte array - public static string UrlEncode(string input) + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; } /// @@ -226,5 +209,40 @@ public static bool IsJsonMime(string mime) return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) return true; + return false; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs index aa039650553..d67e56067f1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -18,6 +18,9 @@ using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; +using System.Net.Http; +using System.Net.Security; +using Ory.Hydra.Client.Client.Auth; namespace Ory.Hydra.Client.Client { @@ -32,7 +35,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "2.2.0"; + public const string Version = "2.2.1"; /// /// Identifier for ISO 8601 DateTime Format @@ -75,6 +78,8 @@ public class Configuration : IReadableConfiguration /// private string _basePath; + private bool _useDefaultCredentials = false; + /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -96,6 +101,13 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + #endregion Private Members #region Constructors @@ -107,7 +119,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/2.2.0/csharp"; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/2.2.1/csharp"); BasePath = "http://localhost"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -121,6 +133,9 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -170,11 +185,21 @@ public Configuration( /// /// Gets or sets the base path for API access. /// - public virtual string BasePath { + public virtual string BasePath + { get { return _basePath; } set { _basePath = value; } } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + /// /// Gets or sets the default header. /// @@ -257,6 +282,30 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The access token. public virtual string AccessToken { get; set; } + /// + /// Gets or sets the token URL for OAuth2 authentication. + /// + /// The OAuth Token URL. + public virtual string OAuthTokenUrl { get; set; } + + /// + /// Gets or sets the client ID for OAuth2 authentication. + /// + /// The OAuth Client ID. + public virtual string OAuthClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + /// The OAuth Client Secret. + public virtual string OAuthClientSecret { get; set; } + + /// + /// Gets or sets the flow for OAuth2 authentication. + /// + /// The OAuth Flow. + public virtual OAuthFlow? OAuthFlow { get; set; } + /// /// Gets or sets the temporary folder path to store the files downloaded from the server. /// @@ -380,6 +429,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -388,7 +454,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -399,9 +465,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -409,35 +515,43 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; } + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } #endregion Properties @@ -451,8 +565,8 @@ public static string ToDebugReport() string report = "C# SDK (Ory.Hydra.Client) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: v2.2.0\n"; - report += " SDK Package Version: 2.2.0\n"; + report += " Version of the API: v2.2.1\n"; + report += " SDK Package Version: 2.2.1\n"; return report; } @@ -511,8 +625,15 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Username = second.Username ?? first.Username, Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, + OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, + OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, + OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs index 3f3f231f7d9..c7f25d30a64 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs index f84aa3d8757..cea096d58d5 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs index 30f31cdc969..92c5935709a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs index 085905ca103..69e5026b8d5 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs index 09b7d10a29c..f51f11d9435 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs index 0caeedb5e45..f9e4a7a3925 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -12,7 +12,9 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; +using Ory.Hydra.Client.Client.Auth; namespace Ory.Hydra.Client.Client { @@ -27,6 +29,30 @@ public interface IReadableConfiguration /// Access token. string AccessToken { get; } + /// + /// Gets the OAuth token URL. + /// + /// OAuth Token URL. + string OAuthTokenUrl { get; } + + /// + /// Gets the OAuth client ID. + /// + /// OAuth Client ID. + string OAuthClientId { get; } + + /// + /// Gets the OAuth client secret. + /// + /// OAuth Client Secret. + string OAuthClientSecret { get; } + + /// + /// Gets the OAuth flow. + /// + /// OAuth Flow. + OAuthFlow? OAuthFlow { get; } + /// /// Gets the API key. /// @@ -100,6 +126,17 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -107,10 +144,24 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs index 616a4e61464..bd0fb7b0ed8 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs index b295720d882..17fc93cc2fd 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs index bbe51a976c5..8bff467a5e9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs index 4bdf84814f1..b4ca20d0166 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -34,7 +34,7 @@ public class RequestOptions public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } @@ -54,11 +54,26 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// public Object Data { get; set; } + /// + /// If request should be authenticated with OAuth. + /// + public bool OAuth { get; set; } + /// /// Constructs a new instance of /// diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs index 7a495448a94..69e2f8e1f95 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -22,11 +22,11 @@ public static class RetryConfiguration /// /// Retry policy /// - public static Policy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs index 8985537aa29..c9df464becf 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs index 211929ebdc8..e22d5ea3a08 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraAcceptOAuth2ConsentRequest /// [DataContract(Name = "acceptOAuth2ConsentRequest")] - public partial class HydraAcceptOAuth2ConsentRequest : IEquatable, IValidatableObject + public partial class HydraAcceptOAuth2ConsentRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -133,111 +133,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraAcceptOAuth2ConsentRequest); - } - - /// - /// Returns true if HydraAcceptOAuth2ConsentRequest instances are equal - /// - /// Instance of HydraAcceptOAuth2ConsentRequest to be compared - /// Boolean - public bool Equals(HydraAcceptOAuth2ConsentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Context == input.Context || - (this.Context != null && - this.Context.Equals(input.Context)) - ) && - ( - this.GrantAccessTokenAudience == input.GrantAccessTokenAudience || - this.GrantAccessTokenAudience != null && - input.GrantAccessTokenAudience != null && - this.GrantAccessTokenAudience.SequenceEqual(input.GrantAccessTokenAudience) - ) && - ( - this.GrantScope == input.GrantScope || - this.GrantScope != null && - input.GrantScope != null && - this.GrantScope.SequenceEqual(input.GrantScope) - ) && - ( - this.HandledAt == input.HandledAt || - (this.HandledAt != null && - this.HandledAt.Equals(input.HandledAt)) - ) && - ( - this.Remember == input.Remember || - this.Remember.Equals(input.Remember) - ) && - ( - this.RememberFor == input.RememberFor || - this.RememberFor.Equals(input.RememberFor) - ) && - ( - this.Session == input.Session || - (this.Session != null && - this.Session.Equals(input.Session)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Context != null) - { - hashCode = (hashCode * 59) + this.Context.GetHashCode(); - } - if (this.GrantAccessTokenAudience != null) - { - hashCode = (hashCode * 59) + this.GrantAccessTokenAudience.GetHashCode(); - } - if (this.GrantScope != null) - { - hashCode = (hashCode * 59) + this.GrantScope.GetHashCode(); - } - if (this.HandledAt != null) - { - hashCode = (hashCode * 59) + this.HandledAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Remember.GetHashCode(); - hashCode = (hashCode * 59) + this.RememberFor.GetHashCode(); - if (this.Session != null) - { - hashCode = (hashCode * 59) + this.Session.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs index 1be1742c0c5..4913886e066 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraAcceptOAuth2ConsentRequestSession /// [DataContract(Name = "acceptOAuth2ConsentRequestSession")] - public partial class HydraAcceptOAuth2ConsentRequestSession : IEquatable, IValidatableObject + public partial class HydraAcceptOAuth2ConsentRequestSession : IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraAcceptOAuth2ConsentRequestSession); - } - - /// - /// Returns true if HydraAcceptOAuth2ConsentRequestSession instances are equal - /// - /// Instance of HydraAcceptOAuth2ConsentRequestSession to be compared - /// Boolean - public bool Equals(HydraAcceptOAuth2ConsentRequestSession input) - { - if (input == null) - { - return false; - } - return - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ) && - ( - this.IdToken == input.IdToken || - (this.IdToken != null && - this.IdToken.Equals(input.IdToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - if (this.IdToken != null) - { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs index 6c01fa7930e..4ccb1d221e7 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraAcceptOAuth2LoginRequest /// [DataContract(Name = "acceptOAuth2LoginRequest")] - public partial class HydraAcceptOAuth2LoginRequest : IEquatable, IValidatableObject + public partial class HydraAcceptOAuth2LoginRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,8 @@ protected HydraAcceptOAuth2LoginRequest() public HydraAcceptOAuth2LoginRequest(string acr = default(string), List amr = default(List), Object context = default(Object), bool extendSessionLifespan = default(bool), string forceSubjectIdentifier = default(string), string identityProviderSessionId = default(string), bool remember = default(bool), long rememberFor = default(long), string subject = default(string)) { // to ensure "subject" is required (not null) - if (subject == null) { + if (subject == null) + { throw new ArgumentNullException("subject is a required property for HydraAcceptOAuth2LoginRequest and cannot be null"); } this.Subject = subject; @@ -128,7 +129,7 @@ protected HydraAcceptOAuth2LoginRequest() /// Subject is the user ID of the end-user that authenticated. /// /// Subject is the user ID of the end-user that authenticated. - [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] public string Subject { get; set; } /// @@ -168,124 +169,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraAcceptOAuth2LoginRequest); - } - - /// - /// Returns true if HydraAcceptOAuth2LoginRequest instances are equal - /// - /// Instance of HydraAcceptOAuth2LoginRequest to be compared - /// Boolean - public bool Equals(HydraAcceptOAuth2LoginRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Acr == input.Acr || - (this.Acr != null && - this.Acr.Equals(input.Acr)) - ) && - ( - this.Amr == input.Amr || - this.Amr != null && - input.Amr != null && - this.Amr.SequenceEqual(input.Amr) - ) && - ( - this.Context == input.Context || - (this.Context != null && - this.Context.Equals(input.Context)) - ) && - ( - this.ExtendSessionLifespan == input.ExtendSessionLifespan || - this.ExtendSessionLifespan.Equals(input.ExtendSessionLifespan) - ) && - ( - this.ForceSubjectIdentifier == input.ForceSubjectIdentifier || - (this.ForceSubjectIdentifier != null && - this.ForceSubjectIdentifier.Equals(input.ForceSubjectIdentifier)) - ) && - ( - this.IdentityProviderSessionId == input.IdentityProviderSessionId || - (this.IdentityProviderSessionId != null && - this.IdentityProviderSessionId.Equals(input.IdentityProviderSessionId)) - ) && - ( - this.Remember == input.Remember || - this.Remember.Equals(input.Remember) - ) && - ( - this.RememberFor == input.RememberFor || - this.RememberFor.Equals(input.RememberFor) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Acr != null) - { - hashCode = (hashCode * 59) + this.Acr.GetHashCode(); - } - if (this.Amr != null) - { - hashCode = (hashCode * 59) + this.Amr.GetHashCode(); - } - if (this.Context != null) - { - hashCode = (hashCode * 59) + this.Context.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExtendSessionLifespan.GetHashCode(); - if (this.ForceSubjectIdentifier != null) - { - hashCode = (hashCode * 59) + this.ForceSubjectIdentifier.GetHashCode(); - } - if (this.IdentityProviderSessionId != null) - { - hashCode = (hashCode * 59) + this.IdentityProviderSessionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Remember.GetHashCode(); - hashCode = (hashCode * 59) + this.RememberFor.GetHashCode(); - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs index e18a18eb950..e1052c46a17 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Create JSON Web Key Set Request Body /// [DataContract(Name = "createJsonWebKeySet")] - public partial class HydraCreateJsonWebKeySet : IEquatable, IValidatableObject + public partial class HydraCreateJsonWebKeySet : IValidatableObject { /// /// Initializes a new instance of the class. @@ -49,17 +49,20 @@ protected HydraCreateJsonWebKeySet() public HydraCreateJsonWebKeySet(string alg = default(string), string kid = default(string), string use = default(string)) { // to ensure "alg" is required (not null) - if (alg == null) { + if (alg == null) + { throw new ArgumentNullException("alg is a required property for HydraCreateJsonWebKeySet and cannot be null"); } this.Alg = alg; // to ensure "kid" is required (not null) - if (kid == null) { + if (kid == null) + { throw new ArgumentNullException("kid is a required property for HydraCreateJsonWebKeySet and cannot be null"); } this.Kid = kid; // to ensure "use" is required (not null) - if (use == null) { + if (use == null) + { throw new ArgumentNullException("use is a required property for HydraCreateJsonWebKeySet and cannot be null"); } this.Use = use; @@ -70,21 +73,21 @@ protected HydraCreateJsonWebKeySet() /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. /// /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. - [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = true)] public string Alg { get; set; } /// /// JSON Web Key ID The Key ID of the key to be created. /// /// JSON Web Key ID The Key ID of the key to be created. - [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = true)] public string Kid { get; set; } /// /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". /// /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". - [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = true)] public string Use { get; set; } /// @@ -118,81 +121,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraCreateJsonWebKeySet); - } - - /// - /// Returns true if HydraCreateJsonWebKeySet instances are equal - /// - /// Instance of HydraCreateJsonWebKeySet to be compared - /// Boolean - public bool Equals(HydraCreateJsonWebKeySet input) - { - if (input == null) - { - return false; - } - return - ( - this.Alg == input.Alg || - (this.Alg != null && - this.Alg.Equals(input.Alg)) - ) && - ( - this.Kid == input.Kid || - (this.Kid != null && - this.Kid.Equals(input.Kid)) - ) && - ( - this.Use == input.Use || - (this.Use != null && - this.Use.Equals(input.Use)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alg != null) - { - hashCode = (hashCode * 59) + this.Alg.GetHashCode(); - } - if (this.Kid != null) - { - hashCode = (hashCode * 59) + this.Kid.GetHashCode(); - } - if (this.Use != null) - { - hashCode = (hashCode * 59) + this.Use.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs index 78feed7a04c..0b4ef85bacb 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraCreateVerifiableCredentialRequestBody /// [DataContract(Name = "CreateVerifiableCredentialRequestBody")] - public partial class HydraCreateVerifiableCredentialRequestBody : IEquatable, IValidatableObject + public partial class HydraCreateVerifiableCredentialRequestBody : IValidatableObject { /// /// Initializes a new instance of the class. @@ -95,82 +95,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraCreateVerifiableCredentialRequestBody); - } - - /// - /// Returns true if HydraCreateVerifiableCredentialRequestBody instances are equal - /// - /// Instance of HydraCreateVerifiableCredentialRequestBody to be compared - /// Boolean - public bool Equals(HydraCreateVerifiableCredentialRequestBody input) - { - if (input == null) - { - return false; - } - return - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ) && - ( - this.Proof == input.Proof || - (this.Proof != null && - this.Proof.Equals(input.Proof)) - ) && - ( - this.Types == input.Types || - this.Types != null && - input.Types != null && - this.Types.SequenceEqual(input.Types) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Format != null) - { - hashCode = (hashCode * 59) + this.Format.GetHashCode(); - } - if (this.Proof != null) - { - hashCode = (hashCode * 59) + this.Proof.GetHashCode(); - } - if (this.Types != null) - { - hashCode = (hashCode * 59) + this.Types.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs index 911ab754cf3..de65933dc3e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Includes information about the supported verifiable credentials. /// [DataContract(Name = "credentialSupportedDraft00")] - public partial class HydraCredentialSupportedDraft00 : IEquatable, IValidatableObject + public partial class HydraCredentialSupportedDraft00 : IValidatableObject { /// /// Initializes a new instance of the class. @@ -108,93 +108,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraCredentialSupportedDraft00); - } - - /// - /// Returns true if HydraCredentialSupportedDraft00 instances are equal - /// - /// Instance of HydraCredentialSupportedDraft00 to be compared - /// Boolean - public bool Equals(HydraCredentialSupportedDraft00 input) - { - if (input == null) - { - return false; - } - return - ( - this.CryptographicBindingMethodsSupported == input.CryptographicBindingMethodsSupported || - this.CryptographicBindingMethodsSupported != null && - input.CryptographicBindingMethodsSupported != null && - this.CryptographicBindingMethodsSupported.SequenceEqual(input.CryptographicBindingMethodsSupported) - ) && - ( - this.CryptographicSuitesSupported == input.CryptographicSuitesSupported || - this.CryptographicSuitesSupported != null && - input.CryptographicSuitesSupported != null && - this.CryptographicSuitesSupported.SequenceEqual(input.CryptographicSuitesSupported) - ) && - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ) && - ( - this.Types == input.Types || - this.Types != null && - input.Types != null && - this.Types.SequenceEqual(input.Types) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CryptographicBindingMethodsSupported != null) - { - hashCode = (hashCode * 59) + this.CryptographicBindingMethodsSupported.GetHashCode(); - } - if (this.CryptographicSuitesSupported != null) - { - hashCode = (hashCode * 59) + this.CryptographicSuitesSupported.GetHashCode(); - } - if (this.Format != null) - { - hashCode = (hashCode * 59) + this.Format.GetHashCode(); - } - if (this.Types != null) - { - hashCode = (hashCode * 59) + this.Types.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs index 00d0df3fbfc..2902617e533 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Error /// [DataContract(Name = "errorOAuth2")] - public partial class HydraErrorOAuth2 : IEquatable, IValidatableObject + public partial class HydraErrorOAuth2 : IValidatableObject { /// /// Initializes a new instance of the class. @@ -75,6 +75,7 @@ public partial class HydraErrorOAuth2 : IEquatable, IValidatab /// Error Hint Helps the user identify the error cause. /// /// Error Hint Helps the user identify the error cause. + /// The redirect URL is not allowed. [DataMember(Name = "error_hint", EmitDefaultValue = false)] public string ErrorHint { get; set; } @@ -82,6 +83,7 @@ public partial class HydraErrorOAuth2 : IEquatable, IValidatab /// HTTP Status Code /// /// HTTP Status Code + /// 401 [DataMember(Name = "status_code", EmitDefaultValue = false)] public long StatusCode { get; set; } @@ -118,95 +120,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraErrorOAuth2); - } - - /// - /// Returns true if HydraErrorOAuth2 instances are equal - /// - /// Instance of HydraErrorOAuth2 to be compared - /// Boolean - public bool Equals(HydraErrorOAuth2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.ErrorDebug == input.ErrorDebug || - (this.ErrorDebug != null && - this.ErrorDebug.Equals(input.ErrorDebug)) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.ErrorHint == input.ErrorHint || - (this.ErrorHint != null && - this.ErrorHint.Equals(input.ErrorHint)) - ) && - ( - this.StatusCode == input.StatusCode || - this.StatusCode.Equals(input.StatusCode) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.ErrorDebug != null) - { - hashCode = (hashCode * 59) + this.ErrorDebug.GetHashCode(); - } - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.ErrorHint != null) - { - hashCode = (hashCode * 59) + this.ErrorHint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs index e0b5c2b9f10..a9da98b105c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraGenericError /// [DataContract(Name = "genericError")] - public partial class HydraGenericError : IEquatable, IValidatableObject + public partial class HydraGenericError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -54,7 +54,8 @@ protected HydraGenericError() public HydraGenericError(long code = default(long), string debug = default(string), Object details = default(Object), string id = default(string), string message = default(string), string reason = default(string), string request = default(string), string status = default(string)) { // to ensure "message" is required (not null) - if (message == null) { + if (message == null) + { throw new ArgumentNullException("message is a required property for HydraGenericError and cannot be null"); } this.Message = message; @@ -72,6 +73,7 @@ protected HydraGenericError() /// The status code /// /// The status code + /// 404 [DataMember(Name = "code", EmitDefaultValue = false)] public long Code { get; set; } @@ -79,6 +81,7 @@ protected HydraGenericError() /// Debug information This field is often not exposed to protect against leaking sensitive information. /// /// Debug information This field is often not exposed to protect against leaking sensitive information. + /// SQL field "foo" is not a bool. [DataMember(Name = "debug", EmitDefaultValue = false)] public string Debug { get; set; } @@ -100,13 +103,15 @@ protected HydraGenericError() /// Error message The error's message. /// /// Error message The error's message. - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] + /// The resource could not be found + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] public string Message { get; set; } /// /// A human-readable reason for the error /// /// A human-readable reason for the error + /// User with ID 1234 does not exist. [DataMember(Name = "reason", EmitDefaultValue = false)] public string Reason { get; set; } @@ -114,6 +119,7 @@ protected HydraGenericError() /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. /// /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + /// d7ef54b1-ec15-46e6-bccb-524b82c035e6 [DataMember(Name = "request", EmitDefaultValue = false)] public string Request { get; set; } @@ -121,6 +127,7 @@ protected HydraGenericError() /// The status description /// /// The status description + /// Not Found [DataMember(Name = "status", EmitDefaultValue = false)] public string Status { get; set; } @@ -160,122 +167,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraGenericError); - } - - /// - /// Returns true if HydraGenericError instances are equal - /// - /// Instance of HydraGenericError to be compared - /// Boolean - public bool Equals(HydraGenericError input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - this.Code.Equals(input.Code) - ) && - ( - this.Debug == input.Debug || - (this.Debug != null && - this.Debug.Equals(input.Debug)) - ) && - ( - this.Details == input.Details || - (this.Details != null && - this.Details.Equals(input.Details)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.Request == input.Request || - (this.Request != null && - this.Request.Equals(input.Request)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Debug != null) - { - hashCode = (hashCode * 59) + this.Debug.GetHashCode(); - } - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - if (this.Request != null) - { - hashCode = (hashCode * 59) + this.Request.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs new file mode 100644 index 00000000000..70664302dbd --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs @@ -0,0 +1,92 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraGetVersion200Response + /// + [DataContract(Name = "getVersion_200_response")] + public partial class HydraGetVersion200Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The version of Ory Hydra.. + public HydraGetVersion200Response(string varVersion = default(string)) + { + this.VarVersion = varVersion; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// The version of Ory Hydra. + /// + /// The version of Ory Hydra. + [DataMember(Name = "version", EmitDefaultValue = false)] + public string VarVersion { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraGetVersion200Response {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs index 809595491b6..e4dec5c5799 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraHealthNotReadyStatus /// [DataContract(Name = "healthNotReadyStatus")] - public partial class HydraHealthNotReadyStatus : IEquatable, IValidatableObject + public partial class HydraHealthNotReadyStatus : IValidatableObject { /// /// Initializes a new instance of the class. @@ -78,64 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraHealthNotReadyStatus); - } - - /// - /// Returns true if HydraHealthNotReadyStatus instances are equal - /// - /// Instance of HydraHealthNotReadyStatus to be compared - /// Boolean - public bool Equals(HydraHealthNotReadyStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Errors == input.Errors || - this.Errors != null && - input.Errors != null && - this.Errors.SequenceEqual(input.Errors) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Errors != null) - { - hashCode = (hashCode * 59) + this.Errors.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs index 71f0b8e0038..a9cc2dee566 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraHealthStatus /// [DataContract(Name = "healthStatus")] - public partial class HydraHealthStatus : IEquatable, IValidatableObject + public partial class HydraHealthStatus : IValidatableObject { /// /// Initializes a new instance of the class. @@ -78,63 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraHealthStatus); - } - - /// - /// Returns true if HydraHealthStatus instances are equal - /// - /// Instance of HydraHealthStatus to be compared - /// Boolean - public bool Equals(HydraHealthStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs deleted file mode 100644 index 7237cf2dde3..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Ory Hydra API - * - * Documentation for all of Ory Hydra's APIs. - * - * The version of the OpenAPI document: v2.2.0 - * Contact: hi@ory.sh - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; - -namespace Ory.Hydra.Client.Model -{ - /// - /// HydraInlineResponse2001 - /// - [DataContract(Name = "inline_response_200_1")] - public partial class HydraInlineResponse2001 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The version of Ory Hydra.. - public HydraInlineResponse2001(string version = default(string)) - { - this._Version = version; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// The version of Ory Hydra. - /// - /// The version of Ory Hydra. - [DataMember(Name = "version", EmitDefaultValue = false)] - public string _Version { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HydraInlineResponse2001 {\n"); - sb.Append(" _Version: ").Append(_Version).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraInlineResponse2001); - } - - /// - /// Returns true if HydraInlineResponse2001 instances are equal - /// - /// Instance of HydraInlineResponse2001 to be compared - /// Boolean - public bool Equals(HydraInlineResponse2001 input) - { - if (input == null) - { - return false; - } - return - ( - this._Version == input._Version || - (this._Version != null && - this._Version.Equals(input._Version)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Version != null) - { - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs index 5a8ef4680e7..aa76350d461 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) /// [DataContract(Name = "introspectedOAuth2Token")] - public partial class HydraIntrospectedOAuth2Token : IEquatable, IValidatableObject + public partial class HydraIntrospectedOAuth2Token : IValidatableObject { /// /// Initializes a new instance of the class. @@ -216,166 +216,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraIntrospectedOAuth2Token); - } - - /// - /// Returns true if HydraIntrospectedOAuth2Token instances are equal - /// - /// Instance of HydraIntrospectedOAuth2Token to be compared - /// Boolean - public bool Equals(HydraIntrospectedOAuth2Token input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Aud == input.Aud || - this.Aud != null && - input.Aud != null && - this.Aud.SequenceEqual(input.Aud) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.Exp == input.Exp || - this.Exp.Equals(input.Exp) - ) && - ( - this.Ext == input.Ext || - this.Ext != null && - input.Ext != null && - this.Ext.SequenceEqual(input.Ext) - ) && - ( - this.Iat == input.Iat || - this.Iat.Equals(input.Iat) - ) && - ( - this.Iss == input.Iss || - (this.Iss != null && - this.Iss.Equals(input.Iss)) - ) && - ( - this.Nbf == input.Nbf || - this.Nbf.Equals(input.Nbf) - ) && - ( - this.ObfuscatedSubject == input.ObfuscatedSubject || - (this.ObfuscatedSubject != null && - this.ObfuscatedSubject.Equals(input.ObfuscatedSubject)) - ) && - ( - this.Scope == input.Scope || - (this.Scope != null && - this.Scope.Equals(input.Scope)) - ) && - ( - this.Sub == input.Sub || - (this.Sub != null && - this.Sub.Equals(input.Sub)) - ) && - ( - this.TokenType == input.TokenType || - (this.TokenType != null && - this.TokenType.Equals(input.TokenType)) - ) && - ( - this.TokenUse == input.TokenUse || - (this.TokenUse != null && - this.TokenUse.Equals(input.TokenUse)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Aud != null) - { - hashCode = (hashCode * 59) + this.Aud.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Exp.GetHashCode(); - if (this.Ext != null) - { - hashCode = (hashCode * 59) + this.Ext.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Iat.GetHashCode(); - if (this.Iss != null) - { - hashCode = (hashCode * 59) + this.Iss.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Nbf.GetHashCode(); - if (this.ObfuscatedSubject != null) - { - hashCode = (hashCode * 59) + this.ObfuscatedSubject.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.Sub != null) - { - hashCode = (hashCode * 59) + this.Sub.GetHashCode(); - } - if (this.TokenType != null) - { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); - } - if (this.TokenUse != null) - { - hashCode = (hashCode * 59) + this.TokenUse.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady200Response.cs similarity index 51% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady200Response.cs index d83748d730d..8e326a2db99 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady200Response.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -27,16 +27,16 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraInlineResponse200 + /// HydraIsReady200Response /// - [DataContract(Name = "inline_response_200")] - public partial class HydraInlineResponse200 : IEquatable, IValidatableObject + [DataContract(Name = "isReady_200_response")] + public partial class HydraIsReady200Response : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Always \"ok\".. - public HydraInlineResponse200(string status = default(string)) + public HydraIsReady200Response(string status = default(string)) { this.Status = status; this.AdditionalProperties = new Dictionary(); @@ -62,7 +62,7 @@ public partial class HydraInlineResponse200 : IEquatable public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraInlineResponse200 {\n"); + sb.Append("class HydraIsReady200Response {\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -78,63 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraInlineResponse200); - } - - /// - /// Returns true if HydraInlineResponse200 instances are equal - /// - /// Instance of HydraInlineResponse200 to be compared - /// Boolean - public bool Equals(HydraInlineResponse200 input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady503Response.cs similarity index 52% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady503Response.cs index 4d75f1db4e3..7d6a38bd2f0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIsReady503Response.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -27,16 +27,16 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraInlineResponse503 + /// HydraIsReady503Response /// - [DataContract(Name = "inline_response_503")] - public partial class HydraInlineResponse503 : IEquatable, IValidatableObject + [DataContract(Name = "isReady_503_response")] + public partial class HydraIsReady503Response : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Errors contains a list of errors that caused the not ready status.. - public HydraInlineResponse503(Dictionary errors = default(Dictionary)) + public HydraIsReady503Response(Dictionary errors = default(Dictionary)) { this.Errors = errors; this.AdditionalProperties = new Dictionary(); @@ -62,7 +62,7 @@ public partial class HydraInlineResponse503 : IEquatable public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraInlineResponse503 {\n"); + sb.Append("class HydraIsReady503Response {\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -78,64 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraInlineResponse503); - } - - /// - /// Returns true if HydraInlineResponse503 instances are equal - /// - /// Instance of HydraInlineResponse503 to be compared - /// Boolean - public bool Equals(HydraInlineResponse503 input) - { - if (input == null) - { - return false; - } - return - ( - this.Errors == input.Errors || - this.Errors != null && - input.Errors != null && - this.Errors.SequenceEqual(input.Errors) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Errors != null) - { - hashCode = (hashCode * 59) + this.Errors.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs index b0eac6bf547..ecccfde766f 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// A JSONPatch document as defined by RFC 6902 /// [DataContract(Name = "jsonPatch")] - public partial class HydraJsonPatch : IEquatable, IValidatableObject + public partial class HydraJsonPatch : IValidatableObject { /// /// Initializes a new instance of the class. @@ -50,12 +50,14 @@ protected HydraJsonPatch() public HydraJsonPatch(string from = default(string), string op = default(string), string path = default(string), Object value = default(Object)) { // to ensure "op" is required (not null) - if (op == null) { + if (op == null) + { throw new ArgumentNullException("op is a required property for HydraJsonPatch and cannot be null"); } this.Op = op; // to ensure "path" is required (not null) - if (path == null) { + if (path == null) + { throw new ArgumentNullException("path is a required property for HydraJsonPatch and cannot be null"); } this.Path = path; @@ -68,6 +70,7 @@ protected HydraJsonPatch() /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// /name [DataMember(Name = "from", EmitDefaultValue = false)] public string From { get; set; } @@ -75,20 +78,23 @@ protected HydraJsonPatch() /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". /// /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". - [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = false)] + /// replace + [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = true)] public string Op { get; set; } /// /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + /// /name + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = true)] public string Path { get; set; } /// /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// foobar [DataMember(Name = "value", EmitDefaultValue = true)] public Object Value { get; set; } @@ -124,90 +130,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraJsonPatch); - } - - /// - /// Returns true if HydraJsonPatch instances are equal - /// - /// Instance of HydraJsonPatch to be compared - /// Boolean - public bool Equals(HydraJsonPatch input) - { - if (input == null) - { - return false; - } - return - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.Op == input.Op || - (this.Op != null && - this.Op.Equals(input.Op)) - ) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.Op != null) - { - hashCode = (hashCode * 59) + this.Op.GetHashCode(); - } - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs index efd56935b7f..ae3696e18e0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraJsonWebKey /// [DataContract(Name = "jsonWebKey")] - public partial class HydraJsonWebKey : IEquatable, IValidatableObject + public partial class HydraJsonWebKey : IValidatableObject { /// /// Initializes a new instance of the class. @@ -63,22 +63,26 @@ protected HydraJsonWebKey() public HydraJsonWebKey(string alg = default(string), string crv = default(string), string d = default(string), string dp = default(string), string dq = default(string), string e = default(string), string k = default(string), string kid = default(string), string kty = default(string), string n = default(string), string p = default(string), string q = default(string), string qi = default(string), string use = default(string), string x = default(string), List x5c = default(List), string y = default(string)) { // to ensure "alg" is required (not null) - if (alg == null) { + if (alg == null) + { throw new ArgumentNullException("alg is a required property for HydraJsonWebKey and cannot be null"); } this.Alg = alg; // to ensure "kid" is required (not null) - if (kid == null) { + if (kid == null) + { throw new ArgumentNullException("kid is a required property for HydraJsonWebKey and cannot be null"); } this.Kid = kid; // to ensure "kty" is required (not null) - if (kty == null) { + if (kty == null) + { throw new ArgumentNullException("kty is a required property for HydraJsonWebKey and cannot be null"); } this.Kty = kty; // to ensure "use" is required (not null) - if (use == null) { + if (use == null) + { throw new ArgumentNullException("use is a required property for HydraJsonWebKey and cannot be null"); } this.Use = use; @@ -102,42 +106,49 @@ protected HydraJsonWebKey() /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. /// /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. - [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = false)] + /// RS256 + [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = true)] public string Alg { get; set; } /// /// Gets or Sets Crv /// + /// P-256 [DataMember(Name = "crv", EmitDefaultValue = false)] public string Crv { get; set; } /// /// Gets or Sets D /// + /// T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE [DataMember(Name = "d", EmitDefaultValue = false)] public string D { get; set; } /// /// Gets or Sets Dp /// + /// G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 [DataMember(Name = "dp", EmitDefaultValue = false)] public string Dp { get; set; } /// /// Gets or Sets Dq /// + /// s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk [DataMember(Name = "dq", EmitDefaultValue = false)] public string Dq { get; set; } /// /// Gets or Sets E /// + /// AQAB [DataMember(Name = "e", EmitDefaultValue = false)] public string E { get; set; } /// /// Gets or Sets K /// + /// GawgguFyGrWKav7AX4VKUg [DataMember(Name = "k", EmitDefaultValue = false)] public string K { get; set; } @@ -145,37 +156,43 @@ protected HydraJsonWebKey() /// The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. /// /// The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. - [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = false)] + /// 1603dfe0af8f4596 + [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = true)] public string Kid { get; set; } /// /// The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. /// /// The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. - [DataMember(Name = "kty", IsRequired = true, EmitDefaultValue = false)] + /// RSA + [DataMember(Name = "kty", IsRequired = true, EmitDefaultValue = true)] public string Kty { get; set; } /// /// Gets or Sets N /// + /// vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 [DataMember(Name = "n", EmitDefaultValue = false)] public string N { get; set; } /// /// Gets or Sets P /// + /// 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ [DataMember(Name = "p", EmitDefaultValue = false)] public string P { get; set; } /// /// Gets or Sets Q /// + /// 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ [DataMember(Name = "q", EmitDefaultValue = false)] public string Q { get; set; } /// /// Gets or Sets Qi /// + /// GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU [DataMember(Name = "qi", EmitDefaultValue = false)] public string Qi { get; set; } @@ -183,12 +200,14 @@ protected HydraJsonWebKey() /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). /// /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). - [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = false)] + /// sig + [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = true)] public string Use { get; set; } /// /// Gets or Sets X /// + /// f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU [DataMember(Name = "x", EmitDefaultValue = false)] public string X { get; set; } @@ -202,6 +221,7 @@ protected HydraJsonWebKey() /// /// Gets or Sets Y /// + /// x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 [DataMember(Name = "y", EmitDefaultValue = false)] public string Y { get; set; } @@ -250,208 +270,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraJsonWebKey); - } - - /// - /// Returns true if HydraJsonWebKey instances are equal - /// - /// Instance of HydraJsonWebKey to be compared - /// Boolean - public bool Equals(HydraJsonWebKey input) - { - if (input == null) - { - return false; - } - return - ( - this.Alg == input.Alg || - (this.Alg != null && - this.Alg.Equals(input.Alg)) - ) && - ( - this.Crv == input.Crv || - (this.Crv != null && - this.Crv.Equals(input.Crv)) - ) && - ( - this.D == input.D || - (this.D != null && - this.D.Equals(input.D)) - ) && - ( - this.Dp == input.Dp || - (this.Dp != null && - this.Dp.Equals(input.Dp)) - ) && - ( - this.Dq == input.Dq || - (this.Dq != null && - this.Dq.Equals(input.Dq)) - ) && - ( - this.E == input.E || - (this.E != null && - this.E.Equals(input.E)) - ) && - ( - this.K == input.K || - (this.K != null && - this.K.Equals(input.K)) - ) && - ( - this.Kid == input.Kid || - (this.Kid != null && - this.Kid.Equals(input.Kid)) - ) && - ( - this.Kty == input.Kty || - (this.Kty != null && - this.Kty.Equals(input.Kty)) - ) && - ( - this.N == input.N || - (this.N != null && - this.N.Equals(input.N)) - ) && - ( - this.P == input.P || - (this.P != null && - this.P.Equals(input.P)) - ) && - ( - this.Q == input.Q || - (this.Q != null && - this.Q.Equals(input.Q)) - ) && - ( - this.Qi == input.Qi || - (this.Qi != null && - this.Qi.Equals(input.Qi)) - ) && - ( - this.Use == input.Use || - (this.Use != null && - this.Use.Equals(input.Use)) - ) && - ( - this.X == input.X || - (this.X != null && - this.X.Equals(input.X)) - ) && - ( - this.X5c == input.X5c || - this.X5c != null && - input.X5c != null && - this.X5c.SequenceEqual(input.X5c) - ) && - ( - this.Y == input.Y || - (this.Y != null && - this.Y.Equals(input.Y)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alg != null) - { - hashCode = (hashCode * 59) + this.Alg.GetHashCode(); - } - if (this.Crv != null) - { - hashCode = (hashCode * 59) + this.Crv.GetHashCode(); - } - if (this.D != null) - { - hashCode = (hashCode * 59) + this.D.GetHashCode(); - } - if (this.Dp != null) - { - hashCode = (hashCode * 59) + this.Dp.GetHashCode(); - } - if (this.Dq != null) - { - hashCode = (hashCode * 59) + this.Dq.GetHashCode(); - } - if (this.E != null) - { - hashCode = (hashCode * 59) + this.E.GetHashCode(); - } - if (this.K != null) - { - hashCode = (hashCode * 59) + this.K.GetHashCode(); - } - if (this.Kid != null) - { - hashCode = (hashCode * 59) + this.Kid.GetHashCode(); - } - if (this.Kty != null) - { - hashCode = (hashCode * 59) + this.Kty.GetHashCode(); - } - if (this.N != null) - { - hashCode = (hashCode * 59) + this.N.GetHashCode(); - } - if (this.P != null) - { - hashCode = (hashCode * 59) + this.P.GetHashCode(); - } - if (this.Q != null) - { - hashCode = (hashCode * 59) + this.Q.GetHashCode(); - } - if (this.Qi != null) - { - hashCode = (hashCode * 59) + this.Qi.GetHashCode(); - } - if (this.Use != null) - { - hashCode = (hashCode * 59) + this.Use.GetHashCode(); - } - if (this.X != null) - { - hashCode = (hashCode * 59) + this.X.GetHashCode(); - } - if (this.X5c != null) - { - hashCode = (hashCode * 59) + this.X5c.GetHashCode(); - } - if (this.Y != null) - { - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs index 3d3c4a2af74..0a7e25b3898 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// JSON Web Key Set /// [DataContract(Name = "jsonWebKeySet")] - public partial class HydraJsonWebKeySet : IEquatable, IValidatableObject + public partial class HydraJsonWebKeySet : IValidatableObject { /// /// Initializes a new instance of the class. @@ -78,64 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraJsonWebKeySet); - } - - /// - /// Returns true if HydraJsonWebKeySet instances are equal - /// - /// Instance of HydraJsonWebKeySet to be compared - /// Boolean - public bool Equals(HydraJsonWebKeySet input) - { - if (input == null) - { - return false; - } - return - ( - this.Keys == input.Keys || - this.Keys != null && - input.Keys != null && - this.Keys.SequenceEqual(input.Keys) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Keys != null) - { - hashCode = (hashCode * 59) + this.Keys.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs index c011fd271e9..51a5fb097fc 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. /// [DataContract(Name = "oAuth2Client")] - public partial class HydraOAuth2Client : IEquatable, IValidatableObject + public partial class HydraOAuth2Client : IValidatableObject { /// /// Initializes a new instance of the class. @@ -83,7 +83,7 @@ public partial class HydraOAuth2Client : IEquatable, IValidat /// OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.. /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.. /// OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.. - public HydraOAuth2Client(string accessTokenStrategy = default(string), List allowedCorsOrigins = default(List), List audience = default(List), string authorizationCodeGrantAccessTokenLifespan = default(string), string authorizationCodeGrantIdTokenLifespan = default(string), string authorizationCodeGrantRefreshTokenLifespan = default(string), bool backchannelLogoutSessionRequired = default(bool), string backchannelLogoutUri = default(string), string clientCredentialsGrantAccessTokenLifespan = default(string), string clientId = default(string), string clientName = default(string), string clientSecret = default(string), long clientSecretExpiresAt = default(long), string clientUri = default(string), List contacts = default(List), DateTime createdAt = default(DateTime), bool frontchannelLogoutSessionRequired = default(bool), string frontchannelLogoutUri = default(string), List grantTypes = default(List), string implicitGrantAccessTokenLifespan = default(string), string implicitGrantIdTokenLifespan = default(string), Object jwks = default(Object), string jwksUri = default(string), string jwtBearerGrantAccessTokenLifespan = default(string), string logoUri = default(string), Object metadata = default(Object), string owner = default(string), string policyUri = default(string), List postLogoutRedirectUris = default(List), List redirectUris = default(List), string refreshTokenGrantAccessTokenLifespan = default(string), string refreshTokenGrantIdTokenLifespan = default(string), string refreshTokenGrantRefreshTokenLifespan = default(string), string registrationAccessToken = default(string), string registrationClientUri = default(string), string requestObjectSigningAlg = default(string), List requestUris = default(List), List responseTypes = default(List), string scope = default(string), string sectorIdentifierUri = default(string), bool skipConsent = default(bool), bool skipLogoutConsent = default(bool), string subjectType = default(string), string tokenEndpointAuthMethod = "client_secret_basic", string tokenEndpointAuthSigningAlg = default(string), string tosUri = default(string), DateTime updatedAt = default(DateTime), string userinfoSignedResponseAlg = default(string)) + public HydraOAuth2Client(string accessTokenStrategy = default(string), List allowedCorsOrigins = default(List), List audience = default(List), string authorizationCodeGrantAccessTokenLifespan = default(string), string authorizationCodeGrantIdTokenLifespan = default(string), string authorizationCodeGrantRefreshTokenLifespan = default(string), bool backchannelLogoutSessionRequired = default(bool), string backchannelLogoutUri = default(string), string clientCredentialsGrantAccessTokenLifespan = default(string), string clientId = default(string), string clientName = default(string), string clientSecret = default(string), long clientSecretExpiresAt = default(long), string clientUri = default(string), List contacts = default(List), DateTime createdAt = default(DateTime), bool frontchannelLogoutSessionRequired = default(bool), string frontchannelLogoutUri = default(string), List grantTypes = default(List), string implicitGrantAccessTokenLifespan = default(string), string implicitGrantIdTokenLifespan = default(string), Object jwks = default(Object), string jwksUri = default(string), string jwtBearerGrantAccessTokenLifespan = default(string), string logoUri = default(string), Object metadata = default(Object), string owner = default(string), string policyUri = default(string), List postLogoutRedirectUris = default(List), List redirectUris = default(List), string refreshTokenGrantAccessTokenLifespan = default(string), string refreshTokenGrantIdTokenLifespan = default(string), string refreshTokenGrantRefreshTokenLifespan = default(string), string registrationAccessToken = default(string), string registrationClientUri = default(string), string requestObjectSigningAlg = default(string), List requestUris = default(List), List responseTypes = default(List), string scope = default(string), string sectorIdentifierUri = default(string), bool skipConsent = default(bool), bool skipLogoutConsent = default(bool), string subjectType = default(string), string tokenEndpointAuthMethod = @"client_secret_basic", string tokenEndpointAuthSigningAlg = default(string), string tosUri = default(string), DateTime updatedAt = default(DateTime), string userinfoSignedResponseAlg = default(string)) { this.AccessTokenStrategy = accessTokenStrategy; this.AllowedCorsOrigins = allowedCorsOrigins; @@ -129,7 +129,7 @@ public partial class HydraOAuth2Client : IEquatable, IValidat this.SkipLogoutConsent = skipLogoutConsent; this.SubjectType = subjectType; // use default value if no "tokenEndpointAuthMethod" provided - this.TokenEndpointAuthMethod = tokenEndpointAuthMethod ?? "client_secret_basic"; + this.TokenEndpointAuthMethod = tokenEndpointAuthMethod ?? @"client_secret_basic"; this.TokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; this.TosUri = tosUri; this.UpdatedAt = updatedAt; @@ -398,6 +398,7 @@ public partial class HydraOAuth2Client : IEquatable, IValidat /// OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. /// /// OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. + /// scope1 scope-2 scope.3 scope:4 [DataMember(Name = "scope", EmitDefaultValue = false)] public string Scope { get; set; } @@ -540,543 +541,101 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2Client); - } - - /// - /// Returns true if HydraOAuth2Client instances are equal - /// - /// Instance of HydraOAuth2Client to be compared - /// Boolean - public bool Equals(HydraOAuth2Client input) - { - if (input == null) - { - return false; - } - return - ( - this.AccessTokenStrategy == input.AccessTokenStrategy || - (this.AccessTokenStrategy != null && - this.AccessTokenStrategy.Equals(input.AccessTokenStrategy)) - ) && - ( - this.AllowedCorsOrigins == input.AllowedCorsOrigins || - this.AllowedCorsOrigins != null && - input.AllowedCorsOrigins != null && - this.AllowedCorsOrigins.SequenceEqual(input.AllowedCorsOrigins) - ) && - ( - this.Audience == input.Audience || - this.Audience != null && - input.Audience != null && - this.Audience.SequenceEqual(input.Audience) - ) && - ( - this.AuthorizationCodeGrantAccessTokenLifespan == input.AuthorizationCodeGrantAccessTokenLifespan || - (this.AuthorizationCodeGrantAccessTokenLifespan != null && - this.AuthorizationCodeGrantAccessTokenLifespan.Equals(input.AuthorizationCodeGrantAccessTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantIdTokenLifespan == input.AuthorizationCodeGrantIdTokenLifespan || - (this.AuthorizationCodeGrantIdTokenLifespan != null && - this.AuthorizationCodeGrantIdTokenLifespan.Equals(input.AuthorizationCodeGrantIdTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantRefreshTokenLifespan == input.AuthorizationCodeGrantRefreshTokenLifespan || - (this.AuthorizationCodeGrantRefreshTokenLifespan != null && - this.AuthorizationCodeGrantRefreshTokenLifespan.Equals(input.AuthorizationCodeGrantRefreshTokenLifespan)) - ) && - ( - this.BackchannelLogoutSessionRequired == input.BackchannelLogoutSessionRequired || - this.BackchannelLogoutSessionRequired.Equals(input.BackchannelLogoutSessionRequired) - ) && - ( - this.BackchannelLogoutUri == input.BackchannelLogoutUri || - (this.BackchannelLogoutUri != null && - this.BackchannelLogoutUri.Equals(input.BackchannelLogoutUri)) - ) && - ( - this.ClientCredentialsGrantAccessTokenLifespan == input.ClientCredentialsGrantAccessTokenLifespan || - (this.ClientCredentialsGrantAccessTokenLifespan != null && - this.ClientCredentialsGrantAccessTokenLifespan.Equals(input.ClientCredentialsGrantAccessTokenLifespan)) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.ClientName == input.ClientName || - (this.ClientName != null && - this.ClientName.Equals(input.ClientName)) - ) && - ( - this.ClientSecret == input.ClientSecret || - (this.ClientSecret != null && - this.ClientSecret.Equals(input.ClientSecret)) - ) && - ( - this.ClientSecretExpiresAt == input.ClientSecretExpiresAt || - this.ClientSecretExpiresAt.Equals(input.ClientSecretExpiresAt) - ) && - ( - this.ClientUri == input.ClientUri || - (this.ClientUri != null && - this.ClientUri.Equals(input.ClientUri)) - ) && - ( - this.Contacts == input.Contacts || - this.Contacts != null && - input.Contacts != null && - this.Contacts.SequenceEqual(input.Contacts) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.FrontchannelLogoutSessionRequired == input.FrontchannelLogoutSessionRequired || - this.FrontchannelLogoutSessionRequired.Equals(input.FrontchannelLogoutSessionRequired) - ) && - ( - this.FrontchannelLogoutUri == input.FrontchannelLogoutUri || - (this.FrontchannelLogoutUri != null && - this.FrontchannelLogoutUri.Equals(input.FrontchannelLogoutUri)) - ) && - ( - this.GrantTypes == input.GrantTypes || - this.GrantTypes != null && - input.GrantTypes != null && - this.GrantTypes.SequenceEqual(input.GrantTypes) - ) && - ( - this.ImplicitGrantAccessTokenLifespan == input.ImplicitGrantAccessTokenLifespan || - (this.ImplicitGrantAccessTokenLifespan != null && - this.ImplicitGrantAccessTokenLifespan.Equals(input.ImplicitGrantAccessTokenLifespan)) - ) && - ( - this.ImplicitGrantIdTokenLifespan == input.ImplicitGrantIdTokenLifespan || - (this.ImplicitGrantIdTokenLifespan != null && - this.ImplicitGrantIdTokenLifespan.Equals(input.ImplicitGrantIdTokenLifespan)) - ) && - ( - this.Jwks == input.Jwks || - (this.Jwks != null && - this.Jwks.Equals(input.Jwks)) - ) && - ( - this.JwksUri == input.JwksUri || - (this.JwksUri != null && - this.JwksUri.Equals(input.JwksUri)) - ) && - ( - this.JwtBearerGrantAccessTokenLifespan == input.JwtBearerGrantAccessTokenLifespan || - (this.JwtBearerGrantAccessTokenLifespan != null && - this.JwtBearerGrantAccessTokenLifespan.Equals(input.JwtBearerGrantAccessTokenLifespan)) - ) && - ( - this.LogoUri == input.LogoUri || - (this.LogoUri != null && - this.LogoUri.Equals(input.LogoUri)) - ) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.PolicyUri == input.PolicyUri || - (this.PolicyUri != null && - this.PolicyUri.Equals(input.PolicyUri)) - ) && - ( - this.PostLogoutRedirectUris == input.PostLogoutRedirectUris || - this.PostLogoutRedirectUris != null && - input.PostLogoutRedirectUris != null && - this.PostLogoutRedirectUris.SequenceEqual(input.PostLogoutRedirectUris) - ) && - ( - this.RedirectUris == input.RedirectUris || - this.RedirectUris != null && - input.RedirectUris != null && - this.RedirectUris.SequenceEqual(input.RedirectUris) - ) && - ( - this.RefreshTokenGrantAccessTokenLifespan == input.RefreshTokenGrantAccessTokenLifespan || - (this.RefreshTokenGrantAccessTokenLifespan != null && - this.RefreshTokenGrantAccessTokenLifespan.Equals(input.RefreshTokenGrantAccessTokenLifespan)) - ) && - ( - this.RefreshTokenGrantIdTokenLifespan == input.RefreshTokenGrantIdTokenLifespan || - (this.RefreshTokenGrantIdTokenLifespan != null && - this.RefreshTokenGrantIdTokenLifespan.Equals(input.RefreshTokenGrantIdTokenLifespan)) - ) && - ( - this.RefreshTokenGrantRefreshTokenLifespan == input.RefreshTokenGrantRefreshTokenLifespan || - (this.RefreshTokenGrantRefreshTokenLifespan != null && - this.RefreshTokenGrantRefreshTokenLifespan.Equals(input.RefreshTokenGrantRefreshTokenLifespan)) - ) && - ( - this.RegistrationAccessToken == input.RegistrationAccessToken || - (this.RegistrationAccessToken != null && - this.RegistrationAccessToken.Equals(input.RegistrationAccessToken)) - ) && - ( - this.RegistrationClientUri == input.RegistrationClientUri || - (this.RegistrationClientUri != null && - this.RegistrationClientUri.Equals(input.RegistrationClientUri)) - ) && - ( - this.RequestObjectSigningAlg == input.RequestObjectSigningAlg || - (this.RequestObjectSigningAlg != null && - this.RequestObjectSigningAlg.Equals(input.RequestObjectSigningAlg)) - ) && - ( - this.RequestUris == input.RequestUris || - this.RequestUris != null && - input.RequestUris != null && - this.RequestUris.SequenceEqual(input.RequestUris) - ) && - ( - this.ResponseTypes == input.ResponseTypes || - this.ResponseTypes != null && - input.ResponseTypes != null && - this.ResponseTypes.SequenceEqual(input.ResponseTypes) - ) && - ( - this.Scope == input.Scope || - (this.Scope != null && - this.Scope.Equals(input.Scope)) - ) && - ( - this.SectorIdentifierUri == input.SectorIdentifierUri || - (this.SectorIdentifierUri != null && - this.SectorIdentifierUri.Equals(input.SectorIdentifierUri)) - ) && - ( - this.SkipConsent == input.SkipConsent || - this.SkipConsent.Equals(input.SkipConsent) - ) && - ( - this.SkipLogoutConsent == input.SkipLogoutConsent || - this.SkipLogoutConsent.Equals(input.SkipLogoutConsent) - ) && - ( - this.SubjectType == input.SubjectType || - (this.SubjectType != null && - this.SubjectType.Equals(input.SubjectType)) - ) && - ( - this.TokenEndpointAuthMethod == input.TokenEndpointAuthMethod || - (this.TokenEndpointAuthMethod != null && - this.TokenEndpointAuthMethod.Equals(input.TokenEndpointAuthMethod)) - ) && - ( - this.TokenEndpointAuthSigningAlg == input.TokenEndpointAuthSigningAlg || - (this.TokenEndpointAuthSigningAlg != null && - this.TokenEndpointAuthSigningAlg.Equals(input.TokenEndpointAuthSigningAlg)) - ) && - ( - this.TosUri == input.TosUri || - (this.TosUri != null && - this.TosUri.Equals(input.TosUri)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.UserinfoSignedResponseAlg == input.UserinfoSignedResponseAlg || - (this.UserinfoSignedResponseAlg != null && - this.UserinfoSignedResponseAlg.Equals(input.UserinfoSignedResponseAlg)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccessTokenStrategy != null) - { - hashCode = (hashCode * 59) + this.AccessTokenStrategy.GetHashCode(); - } - if (this.AllowedCorsOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedCorsOrigins.GetHashCode(); - } - if (this.Audience != null) - { - hashCode = (hashCode * 59) + this.Audience.GetHashCode(); - } - if (this.AuthorizationCodeGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantAccessTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantIdTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantRefreshTokenLifespan.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BackchannelLogoutSessionRequired.GetHashCode(); - if (this.BackchannelLogoutUri != null) - { - hashCode = (hashCode * 59) + this.BackchannelLogoutUri.GetHashCode(); - } - if (this.ClientCredentialsGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ClientCredentialsGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.ClientName != null) - { - hashCode = (hashCode * 59) + this.ClientName.GetHashCode(); - } - if (this.ClientSecret != null) - { - hashCode = (hashCode * 59) + this.ClientSecret.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ClientSecretExpiresAt.GetHashCode(); - if (this.ClientUri != null) - { - hashCode = (hashCode * 59) + this.ClientUri.GetHashCode(); - } - if (this.Contacts != null) - { - hashCode = (hashCode * 59) + this.Contacts.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FrontchannelLogoutSessionRequired.GetHashCode(); - if (this.FrontchannelLogoutUri != null) - { - hashCode = (hashCode * 59) + this.FrontchannelLogoutUri.GetHashCode(); - } - if (this.GrantTypes != null) - { - hashCode = (hashCode * 59) + this.GrantTypes.GetHashCode(); - } - if (this.ImplicitGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ImplicitGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantIdTokenLifespan.GetHashCode(); - } - if (this.Jwks != null) - { - hashCode = (hashCode * 59) + this.Jwks.GetHashCode(); - } - if (this.JwksUri != null) - { - hashCode = (hashCode * 59) + this.JwksUri.GetHashCode(); - } - if (this.JwtBearerGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.JwtBearerGrantAccessTokenLifespan.GetHashCode(); - } - if (this.LogoUri != null) - { - hashCode = (hashCode * 59) + this.LogoUri.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - if (this.PolicyUri != null) - { - hashCode = (hashCode * 59) + this.PolicyUri.GetHashCode(); - } - if (this.PostLogoutRedirectUris != null) - { - hashCode = (hashCode * 59) + this.PostLogoutRedirectUris.GetHashCode(); - } - if (this.RedirectUris != null) - { - hashCode = (hashCode * 59) + this.RedirectUris.GetHashCode(); - } - if (this.RefreshTokenGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantAccessTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantIdTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantRefreshTokenLifespan.GetHashCode(); - } - if (this.RegistrationAccessToken != null) - { - hashCode = (hashCode * 59) + this.RegistrationAccessToken.GetHashCode(); - } - if (this.RegistrationClientUri != null) - { - hashCode = (hashCode * 59) + this.RegistrationClientUri.GetHashCode(); - } - if (this.RequestObjectSigningAlg != null) - { - hashCode = (hashCode * 59) + this.RequestObjectSigningAlg.GetHashCode(); - } - if (this.RequestUris != null) - { - hashCode = (hashCode * 59) + this.RequestUris.GetHashCode(); - } - if (this.ResponseTypes != null) - { - hashCode = (hashCode * 59) + this.ResponseTypes.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.SectorIdentifierUri != null) - { - hashCode = (hashCode * 59) + this.SectorIdentifierUri.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SkipConsent.GetHashCode(); - hashCode = (hashCode * 59) + this.SkipLogoutConsent.GetHashCode(); - if (this.SubjectType != null) - { - hashCode = (hashCode * 59) + this.SubjectType.GetHashCode(); - } - if (this.TokenEndpointAuthMethod != null) - { - hashCode = (hashCode * 59) + this.TokenEndpointAuthMethod.GetHashCode(); - } - if (this.TokenEndpointAuthSigningAlg != null) - { - hashCode = (hashCode * 59) + this.TokenEndpointAuthSigningAlg.GetHashCode(); - } - if (this.TosUri != null) - { - hashCode = (hashCode * 59) + this.TosUri.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.UserinfoSignedResponseAlg != null) - { - hashCode = (hashCode * 59) + this.UserinfoSignedResponseAlg.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // AuthorizationCodeGrantAccessTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + if (this.AuthorizationCodeGrantAccessTokenLifespan != null) { + // AuthorizationCodeGrantAccessTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + } } - // AuthorizationCodeGrantIdTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + if (this.AuthorizationCodeGrantIdTokenLifespan != null) { + // AuthorizationCodeGrantIdTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + } } - // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) { + // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + } } - // ClientCredentialsGrantAccessTokenLifespan (string) pattern - Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + if (this.ClientCredentialsGrantAccessTokenLifespan != null) { + // ClientCredentialsGrantAccessTokenLifespan (string) pattern + Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + } } - // ImplicitGrantAccessTokenLifespan (string) pattern - Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + if (this.ImplicitGrantAccessTokenLifespan != null) { + // ImplicitGrantAccessTokenLifespan (string) pattern + Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + } } - // ImplicitGrantIdTokenLifespan (string) pattern - Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + if (this.ImplicitGrantIdTokenLifespan != null) { + // ImplicitGrantIdTokenLifespan (string) pattern + Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + } } - // JwtBearerGrantAccessTokenLifespan (string) pattern - Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + if (this.JwtBearerGrantAccessTokenLifespan != null) { + // JwtBearerGrantAccessTokenLifespan (string) pattern + Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + } } - // RefreshTokenGrantAccessTokenLifespan (string) pattern - Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + if (this.RefreshTokenGrantAccessTokenLifespan != null) { + // RefreshTokenGrantAccessTokenLifespan (string) pattern + Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + } } - // RefreshTokenGrantIdTokenLifespan (string) pattern - Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + if (this.RefreshTokenGrantIdTokenLifespan != null) { + // RefreshTokenGrantIdTokenLifespan (string) pattern + Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + } } - // RefreshTokenGrantRefreshTokenLifespan (string) pattern - Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + if (this.RefreshTokenGrantRefreshTokenLifespan != null) { + // RefreshTokenGrantRefreshTokenLifespan (string) pattern + Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + } } yield break; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs index 04a825eebdf..3d3a113fe19 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Lifespans of different token types issued for this OAuth 2.0 Client. /// [DataContract(Name = "oAuth2ClientTokenLifespans")] - public partial class HydraOAuth2ClientTokenLifespans : IEquatable, IValidatableObject + public partial class HydraOAuth2ClientTokenLifespans : IValidatableObject { /// /// Initializes a new instance of the class. @@ -168,213 +168,101 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2ClientTokenLifespans); - } - - /// - /// Returns true if HydraOAuth2ClientTokenLifespans instances are equal - /// - /// Instance of HydraOAuth2ClientTokenLifespans to be compared - /// Boolean - public bool Equals(HydraOAuth2ClientTokenLifespans input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorizationCodeGrantAccessTokenLifespan == input.AuthorizationCodeGrantAccessTokenLifespan || - (this.AuthorizationCodeGrantAccessTokenLifespan != null && - this.AuthorizationCodeGrantAccessTokenLifespan.Equals(input.AuthorizationCodeGrantAccessTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantIdTokenLifespan == input.AuthorizationCodeGrantIdTokenLifespan || - (this.AuthorizationCodeGrantIdTokenLifespan != null && - this.AuthorizationCodeGrantIdTokenLifespan.Equals(input.AuthorizationCodeGrantIdTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantRefreshTokenLifespan == input.AuthorizationCodeGrantRefreshTokenLifespan || - (this.AuthorizationCodeGrantRefreshTokenLifespan != null && - this.AuthorizationCodeGrantRefreshTokenLifespan.Equals(input.AuthorizationCodeGrantRefreshTokenLifespan)) - ) && - ( - this.ClientCredentialsGrantAccessTokenLifespan == input.ClientCredentialsGrantAccessTokenLifespan || - (this.ClientCredentialsGrantAccessTokenLifespan != null && - this.ClientCredentialsGrantAccessTokenLifespan.Equals(input.ClientCredentialsGrantAccessTokenLifespan)) - ) && - ( - this.ImplicitGrantAccessTokenLifespan == input.ImplicitGrantAccessTokenLifespan || - (this.ImplicitGrantAccessTokenLifespan != null && - this.ImplicitGrantAccessTokenLifespan.Equals(input.ImplicitGrantAccessTokenLifespan)) - ) && - ( - this.ImplicitGrantIdTokenLifespan == input.ImplicitGrantIdTokenLifespan || - (this.ImplicitGrantIdTokenLifespan != null && - this.ImplicitGrantIdTokenLifespan.Equals(input.ImplicitGrantIdTokenLifespan)) - ) && - ( - this.JwtBearerGrantAccessTokenLifespan == input.JwtBearerGrantAccessTokenLifespan || - (this.JwtBearerGrantAccessTokenLifespan != null && - this.JwtBearerGrantAccessTokenLifespan.Equals(input.JwtBearerGrantAccessTokenLifespan)) - ) && - ( - this.RefreshTokenGrantAccessTokenLifespan == input.RefreshTokenGrantAccessTokenLifespan || - (this.RefreshTokenGrantAccessTokenLifespan != null && - this.RefreshTokenGrantAccessTokenLifespan.Equals(input.RefreshTokenGrantAccessTokenLifespan)) - ) && - ( - this.RefreshTokenGrantIdTokenLifespan == input.RefreshTokenGrantIdTokenLifespan || - (this.RefreshTokenGrantIdTokenLifespan != null && - this.RefreshTokenGrantIdTokenLifespan.Equals(input.RefreshTokenGrantIdTokenLifespan)) - ) && - ( - this.RefreshTokenGrantRefreshTokenLifespan == input.RefreshTokenGrantRefreshTokenLifespan || - (this.RefreshTokenGrantRefreshTokenLifespan != null && - this.RefreshTokenGrantRefreshTokenLifespan.Equals(input.RefreshTokenGrantRefreshTokenLifespan)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorizationCodeGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantAccessTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantIdTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantRefreshTokenLifespan.GetHashCode(); - } - if (this.ClientCredentialsGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ClientCredentialsGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ImplicitGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ImplicitGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantIdTokenLifespan.GetHashCode(); - } - if (this.JwtBearerGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.JwtBearerGrantAccessTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantAccessTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantIdTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantRefreshTokenLifespan.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // AuthorizationCodeGrantAccessTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + if (this.AuthorizationCodeGrantAccessTokenLifespan != null) { + // AuthorizationCodeGrantAccessTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + } } - // AuthorizationCodeGrantIdTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + if (this.AuthorizationCodeGrantIdTokenLifespan != null) { + // AuthorizationCodeGrantIdTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + } } - // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern - Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) { + // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + } } - // ClientCredentialsGrantAccessTokenLifespan (string) pattern - Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + if (this.ClientCredentialsGrantAccessTokenLifespan != null) { + // ClientCredentialsGrantAccessTokenLifespan (string) pattern + Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + } } - // ImplicitGrantAccessTokenLifespan (string) pattern - Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + if (this.ImplicitGrantAccessTokenLifespan != null) { + // ImplicitGrantAccessTokenLifespan (string) pattern + Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + } } - // ImplicitGrantIdTokenLifespan (string) pattern - Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + if (this.ImplicitGrantIdTokenLifespan != null) { + // ImplicitGrantIdTokenLifespan (string) pattern + Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + } } - // JwtBearerGrantAccessTokenLifespan (string) pattern - Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + if (this.JwtBearerGrantAccessTokenLifespan != null) { + // JwtBearerGrantAccessTokenLifespan (string) pattern + Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + } } - // RefreshTokenGrantAccessTokenLifespan (string) pattern - Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + if (this.RefreshTokenGrantAccessTokenLifespan != null) { + // RefreshTokenGrantAccessTokenLifespan (string) pattern + Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + } } - // RefreshTokenGrantIdTokenLifespan (string) pattern - Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + if (this.RefreshTokenGrantIdTokenLifespan != null) { + // RefreshTokenGrantIdTokenLifespan (string) pattern + Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + } } - // RefreshTokenGrantRefreshTokenLifespan (string) pattern - Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + if (this.RefreshTokenGrantRefreshTokenLifespan != null) { + // RefreshTokenGrantRefreshTokenLifespan (string) pattern + Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + } } yield break; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs index 69d401e478b..3701c3effd2 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraOAuth2ConsentRequest /// [DataContract(Name = "oAuth2ConsentRequest")] - public partial class HydraOAuth2ConsentRequest : IEquatable, IValidatableObject + public partial class HydraOAuth2ConsentRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -46,7 +46,7 @@ protected HydraOAuth2ConsentRequest() /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. /// amr. /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. (required). - /// _client. + /// varClient. /// context. /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.. /// LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. @@ -56,16 +56,17 @@ protected HydraOAuth2ConsentRequest() /// requestedScope. /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.. /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.. - public HydraOAuth2ConsentRequest(string acr = default(string), List amr = default(List), string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), Object context = default(Object), string loginChallenge = default(string), string loginSessionId = default(string), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), bool skip = default(bool), string subject = default(string)) + public HydraOAuth2ConsentRequest(string acr = default(string), List amr = default(List), string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), Object context = default(Object), string loginChallenge = default(string), string loginSessionId = default(string), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), bool skip = default(bool), string subject = default(string)) { // to ensure "challenge" is required (not null) - if (challenge == null) { + if (challenge == null) + { throw new ArgumentNullException("challenge is a required property for HydraOAuth2ConsentRequest and cannot be null"); } this.Challenge = challenge; this.Acr = acr; this.Amr = amr; - this._Client = _client; + this.VarClient = varClient; this.Context = context; this.LoginChallenge = loginChallenge; this.LoginSessionId = loginSessionId; @@ -95,14 +96,14 @@ protected HydraOAuth2ConsentRequest() /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. /// /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = true)] public string Challenge { get; set; } /// - /// Gets or Sets _Client + /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public HydraOAuth2Client _Client { get; set; } + public HydraOAuth2Client VarClient { get; set; } /// /// Gets or Sets Context @@ -180,7 +181,7 @@ public override string ToString() sb.Append(" Acr: ").Append(Acr).Append("\n"); sb.Append(" Amr: ").Append(Amr).Append("\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); sb.Append(" Context: ").Append(Context).Append("\n"); sb.Append(" LoginChallenge: ").Append(LoginChallenge).Append("\n"); sb.Append(" LoginSessionId: ").Append(LoginSessionId).Append("\n"); @@ -204,170 +205,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2ConsentRequest); - } - - /// - /// Returns true if HydraOAuth2ConsentRequest instances are equal - /// - /// Instance of HydraOAuth2ConsentRequest to be compared - /// Boolean - public bool Equals(HydraOAuth2ConsentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Acr == input.Acr || - (this.Acr != null && - this.Acr.Equals(input.Acr)) - ) && - ( - this.Amr == input.Amr || - this.Amr != null && - input.Amr != null && - this.Amr.SequenceEqual(input.Amr) - ) && - ( - this.Challenge == input.Challenge || - (this.Challenge != null && - this.Challenge.Equals(input.Challenge)) - ) && - ( - this._Client == input._Client || - (this._Client != null && - this._Client.Equals(input._Client)) - ) && - ( - this.Context == input.Context || - (this.Context != null && - this.Context.Equals(input.Context)) - ) && - ( - this.LoginChallenge == input.LoginChallenge || - (this.LoginChallenge != null && - this.LoginChallenge.Equals(input.LoginChallenge)) - ) && - ( - this.LoginSessionId == input.LoginSessionId || - (this.LoginSessionId != null && - this.LoginSessionId.Equals(input.LoginSessionId)) - ) && - ( - this.OidcContext == input.OidcContext || - (this.OidcContext != null && - this.OidcContext.Equals(input.OidcContext)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.RequestedAccessTokenAudience == input.RequestedAccessTokenAudience || - this.RequestedAccessTokenAudience != null && - input.RequestedAccessTokenAudience != null && - this.RequestedAccessTokenAudience.SequenceEqual(input.RequestedAccessTokenAudience) - ) && - ( - this.RequestedScope == input.RequestedScope || - this.RequestedScope != null && - input.RequestedScope != null && - this.RequestedScope.SequenceEqual(input.RequestedScope) - ) && - ( - this.Skip == input.Skip || - this.Skip.Equals(input.Skip) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Acr != null) - { - hashCode = (hashCode * 59) + this.Acr.GetHashCode(); - } - if (this.Amr != null) - { - hashCode = (hashCode * 59) + this.Amr.GetHashCode(); - } - if (this.Challenge != null) - { - hashCode = (hashCode * 59) + this.Challenge.GetHashCode(); - } - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.Context != null) - { - hashCode = (hashCode * 59) + this.Context.GetHashCode(); - } - if (this.LoginChallenge != null) - { - hashCode = (hashCode * 59) + this.LoginChallenge.GetHashCode(); - } - if (this.LoginSessionId != null) - { - hashCode = (hashCode * 59) + this.LoginSessionId.GetHashCode(); - } - if (this.OidcContext != null) - { - hashCode = (hashCode * 59) + this.OidcContext.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.RequestedAccessTokenAudience != null) - { - hashCode = (hashCode * 59) + this.RequestedAccessTokenAudience.GetHashCode(); - } - if (this.RequestedScope != null) - { - hashCode = (hashCode * 59) + this.RequestedScope.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Skip.GetHashCode(); - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs index 30c39cf5e45..f4d9c34dbf0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraOAuth2ConsentRequestOpenIDConnectContext /// [DataContract(Name = "oAuth2ConsentRequestOpenIDConnectContext")] - public partial class HydraOAuth2ConsentRequestOpenIDConnectContext : IEquatable, IValidatableObject + public partial class HydraOAuth2ConsentRequestOpenIDConnectContext : IValidatableObject { /// /// Initializes a new instance of the class. @@ -118,102 +118,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2ConsentRequestOpenIDConnectContext); - } - - /// - /// Returns true if HydraOAuth2ConsentRequestOpenIDConnectContext instances are equal - /// - /// Instance of HydraOAuth2ConsentRequestOpenIDConnectContext to be compared - /// Boolean - public bool Equals(HydraOAuth2ConsentRequestOpenIDConnectContext input) - { - if (input == null) - { - return false; - } - return - ( - this.AcrValues == input.AcrValues || - this.AcrValues != null && - input.AcrValues != null && - this.AcrValues.SequenceEqual(input.AcrValues) - ) && - ( - this.Display == input.Display || - (this.Display != null && - this.Display.Equals(input.Display)) - ) && - ( - this.IdTokenHintClaims == input.IdTokenHintClaims || - this.IdTokenHintClaims != null && - input.IdTokenHintClaims != null && - this.IdTokenHintClaims.SequenceEqual(input.IdTokenHintClaims) - ) && - ( - this.LoginHint == input.LoginHint || - (this.LoginHint != null && - this.LoginHint.Equals(input.LoginHint)) - ) && - ( - this.UiLocales == input.UiLocales || - this.UiLocales != null && - input.UiLocales != null && - this.UiLocales.SequenceEqual(input.UiLocales) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcrValues != null) - { - hashCode = (hashCode * 59) + this.AcrValues.GetHashCode(); - } - if (this.Display != null) - { - hashCode = (hashCode * 59) + this.Display.GetHashCode(); - } - if (this.IdTokenHintClaims != null) - { - hashCode = (hashCode * 59) + this.IdTokenHintClaims.GetHashCode(); - } - if (this.LoginHint != null) - { - hashCode = (hashCode * 59) + this.LoginHint.GetHashCode(); - } - if (this.UiLocales != null) - { - hashCode = (hashCode * 59) + this.UiLocales.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs index 2b8aa266b01..0960bdc71bc 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// A completed OAuth 2.0 Consent Session. /// [DataContract(Name = "oAuth2ConsentSession")] - public partial class HydraOAuth2ConsentSession : IEquatable, IValidatableObject + public partial class HydraOAuth2ConsentSession : IValidatableObject { /// /// Initializes a new instance of the class. @@ -151,129 +151,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2ConsentSession); - } - - /// - /// Returns true if HydraOAuth2ConsentSession instances are equal - /// - /// Instance of HydraOAuth2ConsentSession to be compared - /// Boolean - public bool Equals(HydraOAuth2ConsentSession input) - { - if (input == null) - { - return false; - } - return - ( - this.ConsentRequest == input.ConsentRequest || - (this.ConsentRequest != null && - this.ConsentRequest.Equals(input.ConsentRequest)) - ) && - ( - this.Context == input.Context || - (this.Context != null && - this.Context.Equals(input.Context)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.GrantAccessTokenAudience == input.GrantAccessTokenAudience || - this.GrantAccessTokenAudience != null && - input.GrantAccessTokenAudience != null && - this.GrantAccessTokenAudience.SequenceEqual(input.GrantAccessTokenAudience) - ) && - ( - this.GrantScope == input.GrantScope || - this.GrantScope != null && - input.GrantScope != null && - this.GrantScope.SequenceEqual(input.GrantScope) - ) && - ( - this.HandledAt == input.HandledAt || - (this.HandledAt != null && - this.HandledAt.Equals(input.HandledAt)) - ) && - ( - this.Remember == input.Remember || - this.Remember.Equals(input.Remember) - ) && - ( - this.RememberFor == input.RememberFor || - this.RememberFor.Equals(input.RememberFor) - ) && - ( - this.Session == input.Session || - (this.Session != null && - this.Session.Equals(input.Session)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConsentRequest != null) - { - hashCode = (hashCode * 59) + this.ConsentRequest.GetHashCode(); - } - if (this.Context != null) - { - hashCode = (hashCode * 59) + this.Context.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.GrantAccessTokenAudience != null) - { - hashCode = (hashCode * 59) + this.GrantAccessTokenAudience.GetHashCode(); - } - if (this.GrantScope != null) - { - hashCode = (hashCode * 59) + this.GrantScope.GetHashCode(); - } - if (this.HandledAt != null) - { - hashCode = (hashCode * 59) + this.HandledAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Remember.GetHashCode(); - hashCode = (hashCode * 59) + this.RememberFor.GetHashCode(); - if (this.Session != null) - { - hashCode = (hashCode * 59) + this.Session.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs index 903a83ecb35..3e5f0d2dbd9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraOAuth2ConsentSessionExpiresAt /// [DataContract(Name = "oAuth2ConsentSession_expires_at")] - public partial class HydraOAuth2ConsentSessionExpiresAt : IEquatable, IValidatableObject + public partial class HydraOAuth2ConsentSessionExpiresAt : IValidatableObject { /// /// Initializes a new instance of the class. @@ -113,99 +113,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2ConsentSessionExpiresAt); - } - - /// - /// Returns true if HydraOAuth2ConsentSessionExpiresAt instances are equal - /// - /// Instance of HydraOAuth2ConsentSessionExpiresAt to be compared - /// Boolean - public bool Equals(HydraOAuth2ConsentSessionExpiresAt input) - { - if (input == null) - { - return false; - } - return - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ) && - ( - this.AuthorizeCode == input.AuthorizeCode || - (this.AuthorizeCode != null && - this.AuthorizeCode.Equals(input.AuthorizeCode)) - ) && - ( - this.IdToken == input.IdToken || - (this.IdToken != null && - this.IdToken.Equals(input.IdToken)) - ) && - ( - this.ParContext == input.ParContext || - (this.ParContext != null && - this.ParContext.Equals(input.ParContext)) - ) && - ( - this.RefreshToken == input.RefreshToken || - (this.RefreshToken != null && - this.RefreshToken.Equals(input.RefreshToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - if (this.AuthorizeCode != null) - { - hashCode = (hashCode * 59) + this.AuthorizeCode.GetHashCode(); - } - if (this.IdToken != null) - { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); - } - if (this.ParContext != null) - { - hashCode = (hashCode * 59) + this.ParContext.GetHashCode(); - } - if (this.RefreshToken != null) - { - hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs index f6b8e4944a0..e8ab9cf275d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraOAuth2LoginRequest /// [DataContract(Name = "oAuth2LoginRequest")] - public partial class HydraOAuth2LoginRequest : IEquatable, IValidatableObject + public partial class HydraOAuth2LoginRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -44,7 +44,7 @@ protected HydraOAuth2LoginRequest() /// Initializes a new instance of the class. /// /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. (required). - /// _client (required). + /// varClient (required). /// oidcContext. /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. (required). /// requestedAccessTokenAudience. @@ -52,26 +52,30 @@ protected HydraOAuth2LoginRequest() /// SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. (required). /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. (required). - public HydraOAuth2LoginRequest(string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), string sessionId = default(string), bool skip = default(bool), string subject = default(string)) + public HydraOAuth2LoginRequest(string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), string sessionId = default(string), bool skip = default(bool), string subject = default(string)) { // to ensure "challenge" is required (not null) - if (challenge == null) { + if (challenge == null) + { throw new ArgumentNullException("challenge is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.Challenge = challenge; - // to ensure "_client" is required (not null) - if (_client == null) { - throw new ArgumentNullException("_client is a required property for HydraOAuth2LoginRequest and cannot be null"); + // to ensure "varClient" is required (not null) + if (varClient == null) + { + throw new ArgumentNullException("varClient is a required property for HydraOAuth2LoginRequest and cannot be null"); } - this._Client = _client; + this.VarClient = varClient; // to ensure "requestUrl" is required (not null) - if (requestUrl == null) { + if (requestUrl == null) + { throw new ArgumentNullException("requestUrl is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.RequestUrl = requestUrl; this.Skip = skip; // to ensure "subject" is required (not null) - if (subject == null) { + if (subject == null) + { throw new ArgumentNullException("subject is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.Subject = subject; @@ -86,14 +90,14 @@ protected HydraOAuth2LoginRequest() /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. /// /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. - [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = true)] public string Challenge { get; set; } /// - /// Gets or Sets _Client + /// Gets or Sets VarClient /// - [DataMember(Name = "client", IsRequired = true, EmitDefaultValue = false)] - public HydraOAuth2Client _Client { get; set; } + [DataMember(Name = "client", IsRequired = true, EmitDefaultValue = true)] + public HydraOAuth2Client VarClient { get; set; } /// /// Gets or Sets OidcContext @@ -105,7 +109,7 @@ protected HydraOAuth2LoginRequest() /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. /// /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] public string RequestUrl { get; set; } /// @@ -138,7 +142,7 @@ protected HydraOAuth2LoginRequest() /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. /// /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. - [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] public string Subject { get; set; } /// @@ -156,7 +160,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HydraOAuth2LoginRequest {\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); sb.Append(" OidcContext: ").Append(OidcContext).Append("\n"); sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); sb.Append(" RequestedAccessTokenAudience: ").Append(RequestedAccessTokenAudience).Append("\n"); @@ -178,133 +182,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2LoginRequest); - } - - /// - /// Returns true if HydraOAuth2LoginRequest instances are equal - /// - /// Instance of HydraOAuth2LoginRequest to be compared - /// Boolean - public bool Equals(HydraOAuth2LoginRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Challenge == input.Challenge || - (this.Challenge != null && - this.Challenge.Equals(input.Challenge)) - ) && - ( - this._Client == input._Client || - (this._Client != null && - this._Client.Equals(input._Client)) - ) && - ( - this.OidcContext == input.OidcContext || - (this.OidcContext != null && - this.OidcContext.Equals(input.OidcContext)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.RequestedAccessTokenAudience == input.RequestedAccessTokenAudience || - this.RequestedAccessTokenAudience != null && - input.RequestedAccessTokenAudience != null && - this.RequestedAccessTokenAudience.SequenceEqual(input.RequestedAccessTokenAudience) - ) && - ( - this.RequestedScope == input.RequestedScope || - this.RequestedScope != null && - input.RequestedScope != null && - this.RequestedScope.SequenceEqual(input.RequestedScope) - ) && - ( - this.SessionId == input.SessionId || - (this.SessionId != null && - this.SessionId.Equals(input.SessionId)) - ) && - ( - this.Skip == input.Skip || - this.Skip.Equals(input.Skip) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Challenge != null) - { - hashCode = (hashCode * 59) + this.Challenge.GetHashCode(); - } - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.OidcContext != null) - { - hashCode = (hashCode * 59) + this.OidcContext.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.RequestedAccessTokenAudience != null) - { - hashCode = (hashCode * 59) + this.RequestedAccessTokenAudience.GetHashCode(); - } - if (this.RequestedScope != null) - { - hashCode = (hashCode * 59) + this.RequestedScope.GetHashCode(); - } - if (this.SessionId != null) - { - hashCode = (hashCode * 59) + this.SessionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Skip.GetHashCode(); - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs index 8f6f810d461..1a19aca5ba6 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,21 +30,21 @@ namespace Ory.Hydra.Client.Model /// HydraOAuth2LogoutRequest /// [DataContract(Name = "oAuth2LogoutRequest")] - public partial class HydraOAuth2LogoutRequest : IEquatable, IValidatableObject + public partial class HydraOAuth2LogoutRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.. - /// _client. + /// varClient. /// RequestURL is the original Logout URL requested.. /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.. /// SessionID is the login session ID that was requested to log out.. /// Subject is the user for whom the logout was request.. - public HydraOAuth2LogoutRequest(string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), string requestUrl = default(string), bool rpInitiated = default(bool), string sid = default(string), string subject = default(string)) + public HydraOAuth2LogoutRequest(string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), string requestUrl = default(string), bool rpInitiated = default(bool), string sid = default(string), string subject = default(string)) { this.Challenge = challenge; - this._Client = _client; + this.VarClient = varClient; this.RequestUrl = requestUrl; this.RpInitiated = rpInitiated; this.Sid = sid; @@ -60,10 +60,10 @@ public partial class HydraOAuth2LogoutRequest : IEquatable - /// Gets or Sets _Client + /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public HydraOAuth2Client _Client { get; set; } + public HydraOAuth2Client VarClient { get; set; } /// /// RequestURL is the original Logout URL requested. @@ -108,7 +108,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HydraOAuth2LogoutRequest {\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); sb.Append(" RpInitiated: ").Append(RpInitiated).Append("\n"); sb.Append(" Sid: ").Append(Sid).Append("\n"); @@ -127,104 +127,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2LogoutRequest); - } - - /// - /// Returns true if HydraOAuth2LogoutRequest instances are equal - /// - /// Instance of HydraOAuth2LogoutRequest to be compared - /// Boolean - public bool Equals(HydraOAuth2LogoutRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Challenge == input.Challenge || - (this.Challenge != null && - this.Challenge.Equals(input.Challenge)) - ) && - ( - this._Client == input._Client || - (this._Client != null && - this._Client.Equals(input._Client)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.RpInitiated == input.RpInitiated || - this.RpInitiated.Equals(input.RpInitiated) - ) && - ( - this.Sid == input.Sid || - (this.Sid != null && - this.Sid.Equals(input.Sid)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Challenge != null) - { - hashCode = (hashCode * 59) + this.Challenge.GetHashCode(); - } - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RpInitiated.GetHashCode(); - if (this.Sid != null) - { - hashCode = (hashCode * 59) + this.Sid.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs index d186777d84b..8cbb8c1ad05 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Contains a redirect URL used to complete a login, consent, or logout request. /// [DataContract(Name = "oAuth2RedirectTo")] - public partial class HydraOAuth2RedirectTo : IEquatable, IValidatableObject + public partial class HydraOAuth2RedirectTo : IValidatableObject { /// /// Initializes a new instance of the class. @@ -47,7 +47,8 @@ protected HydraOAuth2RedirectTo() public HydraOAuth2RedirectTo(string redirectTo = default(string)) { // to ensure "redirectTo" is required (not null) - if (redirectTo == null) { + if (redirectTo == null) + { throw new ArgumentNullException("redirectTo is a required property for HydraOAuth2RedirectTo and cannot be null"); } this.RedirectTo = redirectTo; @@ -58,7 +59,7 @@ protected HydraOAuth2RedirectTo() /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. /// /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. - [DataMember(Name = "redirect_to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "redirect_to", IsRequired = true, EmitDefaultValue = true)] public string RedirectTo { get; set; } /// @@ -90,63 +91,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2RedirectTo); - } - - /// - /// Returns true if HydraOAuth2RedirectTo instances are equal - /// - /// Instance of HydraOAuth2RedirectTo to be compared - /// Boolean - public bool Equals(HydraOAuth2RedirectTo input) - { - if (input == null) - { - return false; - } - return - ( - this.RedirectTo == input.RedirectTo || - (this.RedirectTo != null && - this.RedirectTo.Equals(input.RedirectTo)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RedirectTo != null) - { - hashCode = (hashCode * 59) + this.RedirectTo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs index 5efa940c34e..f507cb83ccc 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// OAuth2 Token Exchange Result /// [DataContract(Name = "oAuth2TokenExchange")] - public partial class HydraOAuth2TokenExchange : IEquatable, IValidatableObject + public partial class HydraOAuth2TokenExchange : IValidatableObject { /// /// Initializes a new instance of the class. @@ -128,104 +128,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOAuth2TokenExchange); - } - - /// - /// Returns true if HydraOAuth2TokenExchange instances are equal - /// - /// Instance of HydraOAuth2TokenExchange to be compared - /// Boolean - public bool Equals(HydraOAuth2TokenExchange input) - { - if (input == null) - { - return false; - } - return - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ) && - ( - this.ExpiresIn == input.ExpiresIn || - this.ExpiresIn.Equals(input.ExpiresIn) - ) && - ( - this.IdToken == input.IdToken || - (this.IdToken != null && - this.IdToken.Equals(input.IdToken)) - ) && - ( - this.RefreshToken == input.RefreshToken || - (this.RefreshToken != null && - this.RefreshToken.Equals(input.RefreshToken)) - ) && - ( - this.Scope == input.Scope || - (this.Scope != null && - this.Scope.Equals(input.Scope)) - ) && - ( - this.TokenType == input.TokenType || - (this.TokenType != null && - this.TokenType.Equals(input.TokenType)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresIn.GetHashCode(); - if (this.IdToken != null) - { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); - } - if (this.RefreshToken != null) - { - hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.TokenType != null) - { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs index e511065c27c..950ba0b2bde 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. /// [DataContract(Name = "oidcConfiguration")] - public partial class HydraOidcConfiguration : IEquatable, IValidatableObject + public partial class HydraOidcConfiguration : IValidatableObject { /// /// Initializes a new instance of the class. @@ -77,47 +77,56 @@ protected HydraOidcConfiguration() public HydraOidcConfiguration(string authorizationEndpoint = default(string), bool backchannelLogoutSessionSupported = default(bool), bool backchannelLogoutSupported = default(bool), bool claimsParameterSupported = default(bool), List claimsSupported = default(List), List codeChallengeMethodsSupported = default(List), string credentialsEndpointDraft00 = default(string), List credentialsSupportedDraft00 = default(List), string endSessionEndpoint = default(string), bool frontchannelLogoutSessionSupported = default(bool), bool frontchannelLogoutSupported = default(bool), List grantTypesSupported = default(List), List idTokenSignedResponseAlg = default(List), List idTokenSigningAlgValuesSupported = default(List), string issuer = default(string), string jwksUri = default(string), string registrationEndpoint = default(string), List requestObjectSigningAlgValuesSupported = default(List), bool requestParameterSupported = default(bool), bool requestUriParameterSupported = default(bool), bool requireRequestUriRegistration = default(bool), List responseModesSupported = default(List), List responseTypesSupported = default(List), string revocationEndpoint = default(string), List scopesSupported = default(List), List subjectTypesSupported = default(List), string tokenEndpoint = default(string), List tokenEndpointAuthMethodsSupported = default(List), string userinfoEndpoint = default(string), List userinfoSignedResponseAlg = default(List), List userinfoSigningAlgValuesSupported = default(List)) { // to ensure "authorizationEndpoint" is required (not null) - if (authorizationEndpoint == null) { + if (authorizationEndpoint == null) + { throw new ArgumentNullException("authorizationEndpoint is a required property for HydraOidcConfiguration and cannot be null"); } this.AuthorizationEndpoint = authorizationEndpoint; // to ensure "idTokenSignedResponseAlg" is required (not null) - if (idTokenSignedResponseAlg == null) { + if (idTokenSignedResponseAlg == null) + { throw new ArgumentNullException("idTokenSignedResponseAlg is a required property for HydraOidcConfiguration and cannot be null"); } this.IdTokenSignedResponseAlg = idTokenSignedResponseAlg; // to ensure "idTokenSigningAlgValuesSupported" is required (not null) - if (idTokenSigningAlgValuesSupported == null) { + if (idTokenSigningAlgValuesSupported == null) + { throw new ArgumentNullException("idTokenSigningAlgValuesSupported is a required property for HydraOidcConfiguration and cannot be null"); } this.IdTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; // to ensure "issuer" is required (not null) - if (issuer == null) { + if (issuer == null) + { throw new ArgumentNullException("issuer is a required property for HydraOidcConfiguration and cannot be null"); } this.Issuer = issuer; // to ensure "jwksUri" is required (not null) - if (jwksUri == null) { + if (jwksUri == null) + { throw new ArgumentNullException("jwksUri is a required property for HydraOidcConfiguration and cannot be null"); } this.JwksUri = jwksUri; // to ensure "responseTypesSupported" is required (not null) - if (responseTypesSupported == null) { + if (responseTypesSupported == null) + { throw new ArgumentNullException("responseTypesSupported is a required property for HydraOidcConfiguration and cannot be null"); } this.ResponseTypesSupported = responseTypesSupported; // to ensure "subjectTypesSupported" is required (not null) - if (subjectTypesSupported == null) { + if (subjectTypesSupported == null) + { throw new ArgumentNullException("subjectTypesSupported is a required property for HydraOidcConfiguration and cannot be null"); } this.SubjectTypesSupported = subjectTypesSupported; // to ensure "tokenEndpoint" is required (not null) - if (tokenEndpoint == null) { + if (tokenEndpoint == null) + { throw new ArgumentNullException("tokenEndpoint is a required property for HydraOidcConfiguration and cannot be null"); } this.TokenEndpoint = tokenEndpoint; // to ensure "userinfoSignedResponseAlg" is required (not null) - if (userinfoSignedResponseAlg == null) { + if (userinfoSignedResponseAlg == null) + { throw new ArgumentNullException("userinfoSignedResponseAlg is a required property for HydraOidcConfiguration and cannot be null"); } this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg; @@ -150,7 +159,8 @@ protected HydraOidcConfiguration() /// OAuth 2.0 Authorization Endpoint URL /// /// OAuth 2.0 Authorization Endpoint URL - [DataMember(Name = "authorization_endpoint", IsRequired = true, EmitDefaultValue = false)] + /// https://playground.ory.sh/ory-hydra/public/oauth2/auth + [DataMember(Name = "authorization_endpoint", IsRequired = true, EmitDefaultValue = true)] public string AuthorizationEndpoint { get; set; } /// @@ -234,34 +244,37 @@ protected HydraOidcConfiguration() /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. /// /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. - [DataMember(Name = "id_token_signed_response_alg", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id_token_signed_response_alg", IsRequired = true, EmitDefaultValue = true)] public List IdTokenSignedResponseAlg { get; set; } /// /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. /// /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. - [DataMember(Name = "id_token_signing_alg_values_supported", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id_token_signing_alg_values_supported", IsRequired = true, EmitDefaultValue = true)] public List IdTokenSigningAlgValuesSupported { get; set; } /// /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. /// /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. - [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = false)] + /// https://playground.ory.sh/ory-hydra/public/ + [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = true)] public string Issuer { get; set; } /// /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. /// /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. - [DataMember(Name = "jwks_uri", IsRequired = true, EmitDefaultValue = false)] + /// https://{slug}.projects.oryapis.com/.well-known/jwks.json + [DataMember(Name = "jwks_uri", IsRequired = true, EmitDefaultValue = true)] public string JwksUri { get; set; } /// /// OpenID Connect Dynamic Client Registration Endpoint URL /// /// OpenID Connect Dynamic Client Registration Endpoint URL + /// https://playground.ory.sh/ory-hydra/admin/client [DataMember(Name = "registration_endpoint", EmitDefaultValue = false)] public string RegistrationEndpoint { get; set; } @@ -304,7 +317,7 @@ protected HydraOidcConfiguration() /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. /// /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. - [DataMember(Name = "response_types_supported", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "response_types_supported", IsRequired = true, EmitDefaultValue = true)] public List ResponseTypesSupported { get; set; } /// @@ -325,14 +338,15 @@ protected HydraOidcConfiguration() /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. /// /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - [DataMember(Name = "subject_types_supported", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject_types_supported", IsRequired = true, EmitDefaultValue = true)] public List SubjectTypesSupported { get; set; } /// /// OAuth 2.0 Token Endpoint URL /// /// OAuth 2.0 Token Endpoint URL - [DataMember(Name = "token_endpoint", IsRequired = true, EmitDefaultValue = false)] + /// https://playground.ory.sh/ory-hydra/public/oauth2/token + [DataMember(Name = "token_endpoint", IsRequired = true, EmitDefaultValue = true)] public string TokenEndpoint { get; set; } /// @@ -353,7 +367,7 @@ protected HydraOidcConfiguration() /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. /// /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. - [DataMember(Name = "userinfo_signed_response_alg", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "userinfo_signed_response_alg", IsRequired = true, EmitDefaultValue = true)] public List UserinfoSignedResponseAlg { get; set; } /// @@ -422,315 +436,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOidcConfiguration); - } - - /// - /// Returns true if HydraOidcConfiguration instances are equal - /// - /// Instance of HydraOidcConfiguration to be compared - /// Boolean - public bool Equals(HydraOidcConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorizationEndpoint == input.AuthorizationEndpoint || - (this.AuthorizationEndpoint != null && - this.AuthorizationEndpoint.Equals(input.AuthorizationEndpoint)) - ) && - ( - this.BackchannelLogoutSessionSupported == input.BackchannelLogoutSessionSupported || - this.BackchannelLogoutSessionSupported.Equals(input.BackchannelLogoutSessionSupported) - ) && - ( - this.BackchannelLogoutSupported == input.BackchannelLogoutSupported || - this.BackchannelLogoutSupported.Equals(input.BackchannelLogoutSupported) - ) && - ( - this.ClaimsParameterSupported == input.ClaimsParameterSupported || - this.ClaimsParameterSupported.Equals(input.ClaimsParameterSupported) - ) && - ( - this.ClaimsSupported == input.ClaimsSupported || - this.ClaimsSupported != null && - input.ClaimsSupported != null && - this.ClaimsSupported.SequenceEqual(input.ClaimsSupported) - ) && - ( - this.CodeChallengeMethodsSupported == input.CodeChallengeMethodsSupported || - this.CodeChallengeMethodsSupported != null && - input.CodeChallengeMethodsSupported != null && - this.CodeChallengeMethodsSupported.SequenceEqual(input.CodeChallengeMethodsSupported) - ) && - ( - this.CredentialsEndpointDraft00 == input.CredentialsEndpointDraft00 || - (this.CredentialsEndpointDraft00 != null && - this.CredentialsEndpointDraft00.Equals(input.CredentialsEndpointDraft00)) - ) && - ( - this.CredentialsSupportedDraft00 == input.CredentialsSupportedDraft00 || - this.CredentialsSupportedDraft00 != null && - input.CredentialsSupportedDraft00 != null && - this.CredentialsSupportedDraft00.SequenceEqual(input.CredentialsSupportedDraft00) - ) && - ( - this.EndSessionEndpoint == input.EndSessionEndpoint || - (this.EndSessionEndpoint != null && - this.EndSessionEndpoint.Equals(input.EndSessionEndpoint)) - ) && - ( - this.FrontchannelLogoutSessionSupported == input.FrontchannelLogoutSessionSupported || - this.FrontchannelLogoutSessionSupported.Equals(input.FrontchannelLogoutSessionSupported) - ) && - ( - this.FrontchannelLogoutSupported == input.FrontchannelLogoutSupported || - this.FrontchannelLogoutSupported.Equals(input.FrontchannelLogoutSupported) - ) && - ( - this.GrantTypesSupported == input.GrantTypesSupported || - this.GrantTypesSupported != null && - input.GrantTypesSupported != null && - this.GrantTypesSupported.SequenceEqual(input.GrantTypesSupported) - ) && - ( - this.IdTokenSignedResponseAlg == input.IdTokenSignedResponseAlg || - this.IdTokenSignedResponseAlg != null && - input.IdTokenSignedResponseAlg != null && - this.IdTokenSignedResponseAlg.SequenceEqual(input.IdTokenSignedResponseAlg) - ) && - ( - this.IdTokenSigningAlgValuesSupported == input.IdTokenSigningAlgValuesSupported || - this.IdTokenSigningAlgValuesSupported != null && - input.IdTokenSigningAlgValuesSupported != null && - this.IdTokenSigningAlgValuesSupported.SequenceEqual(input.IdTokenSigningAlgValuesSupported) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.JwksUri == input.JwksUri || - (this.JwksUri != null && - this.JwksUri.Equals(input.JwksUri)) - ) && - ( - this.RegistrationEndpoint == input.RegistrationEndpoint || - (this.RegistrationEndpoint != null && - this.RegistrationEndpoint.Equals(input.RegistrationEndpoint)) - ) && - ( - this.RequestObjectSigningAlgValuesSupported == input.RequestObjectSigningAlgValuesSupported || - this.RequestObjectSigningAlgValuesSupported != null && - input.RequestObjectSigningAlgValuesSupported != null && - this.RequestObjectSigningAlgValuesSupported.SequenceEqual(input.RequestObjectSigningAlgValuesSupported) - ) && - ( - this.RequestParameterSupported == input.RequestParameterSupported || - this.RequestParameterSupported.Equals(input.RequestParameterSupported) - ) && - ( - this.RequestUriParameterSupported == input.RequestUriParameterSupported || - this.RequestUriParameterSupported.Equals(input.RequestUriParameterSupported) - ) && - ( - this.RequireRequestUriRegistration == input.RequireRequestUriRegistration || - this.RequireRequestUriRegistration.Equals(input.RequireRequestUriRegistration) - ) && - ( - this.ResponseModesSupported == input.ResponseModesSupported || - this.ResponseModesSupported != null && - input.ResponseModesSupported != null && - this.ResponseModesSupported.SequenceEqual(input.ResponseModesSupported) - ) && - ( - this.ResponseTypesSupported == input.ResponseTypesSupported || - this.ResponseTypesSupported != null && - input.ResponseTypesSupported != null && - this.ResponseTypesSupported.SequenceEqual(input.ResponseTypesSupported) - ) && - ( - this.RevocationEndpoint == input.RevocationEndpoint || - (this.RevocationEndpoint != null && - this.RevocationEndpoint.Equals(input.RevocationEndpoint)) - ) && - ( - this.ScopesSupported == input.ScopesSupported || - this.ScopesSupported != null && - input.ScopesSupported != null && - this.ScopesSupported.SequenceEqual(input.ScopesSupported) - ) && - ( - this.SubjectTypesSupported == input.SubjectTypesSupported || - this.SubjectTypesSupported != null && - input.SubjectTypesSupported != null && - this.SubjectTypesSupported.SequenceEqual(input.SubjectTypesSupported) - ) && - ( - this.TokenEndpoint == input.TokenEndpoint || - (this.TokenEndpoint != null && - this.TokenEndpoint.Equals(input.TokenEndpoint)) - ) && - ( - this.TokenEndpointAuthMethodsSupported == input.TokenEndpointAuthMethodsSupported || - this.TokenEndpointAuthMethodsSupported != null && - input.TokenEndpointAuthMethodsSupported != null && - this.TokenEndpointAuthMethodsSupported.SequenceEqual(input.TokenEndpointAuthMethodsSupported) - ) && - ( - this.UserinfoEndpoint == input.UserinfoEndpoint || - (this.UserinfoEndpoint != null && - this.UserinfoEndpoint.Equals(input.UserinfoEndpoint)) - ) && - ( - this.UserinfoSignedResponseAlg == input.UserinfoSignedResponseAlg || - this.UserinfoSignedResponseAlg != null && - input.UserinfoSignedResponseAlg != null && - this.UserinfoSignedResponseAlg.SequenceEqual(input.UserinfoSignedResponseAlg) - ) && - ( - this.UserinfoSigningAlgValuesSupported == input.UserinfoSigningAlgValuesSupported || - this.UserinfoSigningAlgValuesSupported != null && - input.UserinfoSigningAlgValuesSupported != null && - this.UserinfoSigningAlgValuesSupported.SequenceEqual(input.UserinfoSigningAlgValuesSupported) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorizationEndpoint != null) - { - hashCode = (hashCode * 59) + this.AuthorizationEndpoint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BackchannelLogoutSessionSupported.GetHashCode(); - hashCode = (hashCode * 59) + this.BackchannelLogoutSupported.GetHashCode(); - hashCode = (hashCode * 59) + this.ClaimsParameterSupported.GetHashCode(); - if (this.ClaimsSupported != null) - { - hashCode = (hashCode * 59) + this.ClaimsSupported.GetHashCode(); - } - if (this.CodeChallengeMethodsSupported != null) - { - hashCode = (hashCode * 59) + this.CodeChallengeMethodsSupported.GetHashCode(); - } - if (this.CredentialsEndpointDraft00 != null) - { - hashCode = (hashCode * 59) + this.CredentialsEndpointDraft00.GetHashCode(); - } - if (this.CredentialsSupportedDraft00 != null) - { - hashCode = (hashCode * 59) + this.CredentialsSupportedDraft00.GetHashCode(); - } - if (this.EndSessionEndpoint != null) - { - hashCode = (hashCode * 59) + this.EndSessionEndpoint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FrontchannelLogoutSessionSupported.GetHashCode(); - hashCode = (hashCode * 59) + this.FrontchannelLogoutSupported.GetHashCode(); - if (this.GrantTypesSupported != null) - { - hashCode = (hashCode * 59) + this.GrantTypesSupported.GetHashCode(); - } - if (this.IdTokenSignedResponseAlg != null) - { - hashCode = (hashCode * 59) + this.IdTokenSignedResponseAlg.GetHashCode(); - } - if (this.IdTokenSigningAlgValuesSupported != null) - { - hashCode = (hashCode * 59) + this.IdTokenSigningAlgValuesSupported.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.JwksUri != null) - { - hashCode = (hashCode * 59) + this.JwksUri.GetHashCode(); - } - if (this.RegistrationEndpoint != null) - { - hashCode = (hashCode * 59) + this.RegistrationEndpoint.GetHashCode(); - } - if (this.RequestObjectSigningAlgValuesSupported != null) - { - hashCode = (hashCode * 59) + this.RequestObjectSigningAlgValuesSupported.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequestParameterSupported.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestUriParameterSupported.GetHashCode(); - hashCode = (hashCode * 59) + this.RequireRequestUriRegistration.GetHashCode(); - if (this.ResponseModesSupported != null) - { - hashCode = (hashCode * 59) + this.ResponseModesSupported.GetHashCode(); - } - if (this.ResponseTypesSupported != null) - { - hashCode = (hashCode * 59) + this.ResponseTypesSupported.GetHashCode(); - } - if (this.RevocationEndpoint != null) - { - hashCode = (hashCode * 59) + this.RevocationEndpoint.GetHashCode(); - } - if (this.ScopesSupported != null) - { - hashCode = (hashCode * 59) + this.ScopesSupported.GetHashCode(); - } - if (this.SubjectTypesSupported != null) - { - hashCode = (hashCode * 59) + this.SubjectTypesSupported.GetHashCode(); - } - if (this.TokenEndpoint != null) - { - hashCode = (hashCode * 59) + this.TokenEndpoint.GetHashCode(); - } - if (this.TokenEndpointAuthMethodsSupported != null) - { - hashCode = (hashCode * 59) + this.TokenEndpointAuthMethodsSupported.GetHashCode(); - } - if (this.UserinfoEndpoint != null) - { - hashCode = (hashCode * 59) + this.UserinfoEndpoint.GetHashCode(); - } - if (this.UserinfoSignedResponseAlg != null) - { - hashCode = (hashCode * 59) + this.UserinfoSignedResponseAlg.GetHashCode(); - } - if (this.UserinfoSigningAlgValuesSupported != null) - { - hashCode = (hashCode * 59) + this.UserinfoSigningAlgValuesSupported.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs index f121faeff1b..757c5ddc26b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// OpenID Connect Userinfo /// [DataContract(Name = "oidcUserInfo")] - public partial class HydraOidcUserInfo : IEquatable, IValidatableObject + public partial class HydraOidcUserInfo : IValidatableObject { /// /// Initializes a new instance of the class. @@ -258,213 +258,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraOidcUserInfo); - } - - /// - /// Returns true if HydraOidcUserInfo instances are equal - /// - /// Instance of HydraOidcUserInfo to be compared - /// Boolean - public bool Equals(HydraOidcUserInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Birthdate == input.Birthdate || - (this.Birthdate != null && - this.Birthdate.Equals(input.Birthdate)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.EmailVerified == input.EmailVerified || - this.EmailVerified.Equals(input.EmailVerified) - ) && - ( - this.FamilyName == input.FamilyName || - (this.FamilyName != null && - this.FamilyName.Equals(input.FamilyName)) - ) && - ( - this.Gender == input.Gender || - (this.Gender != null && - this.Gender.Equals(input.Gender)) - ) && - ( - this.GivenName == input.GivenName || - (this.GivenName != null && - this.GivenName.Equals(input.GivenName)) - ) && - ( - this.Locale == input.Locale || - (this.Locale != null && - this.Locale.Equals(input.Locale)) - ) && - ( - this.MiddleName == input.MiddleName || - (this.MiddleName != null && - this.MiddleName.Equals(input.MiddleName)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Nickname == input.Nickname || - (this.Nickname != null && - this.Nickname.Equals(input.Nickname)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.PhoneNumberVerified == input.PhoneNumberVerified || - this.PhoneNumberVerified.Equals(input.PhoneNumberVerified) - ) && - ( - this.Picture == input.Picture || - (this.Picture != null && - this.Picture.Equals(input.Picture)) - ) && - ( - this.PreferredUsername == input.PreferredUsername || - (this.PreferredUsername != null && - this.PreferredUsername.Equals(input.PreferredUsername)) - ) && - ( - this.Profile == input.Profile || - (this.Profile != null && - this.Profile.Equals(input.Profile)) - ) && - ( - this.Sub == input.Sub || - (this.Sub != null && - this.Sub.Equals(input.Sub)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - this.UpdatedAt.Equals(input.UpdatedAt) - ) && - ( - this.Website == input.Website || - (this.Website != null && - this.Website.Equals(input.Website)) - ) && - ( - this.Zoneinfo == input.Zoneinfo || - (this.Zoneinfo != null && - this.Zoneinfo.Equals(input.Zoneinfo)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Birthdate != null) - { - hashCode = (hashCode * 59) + this.Birthdate.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EmailVerified.GetHashCode(); - if (this.FamilyName != null) - { - hashCode = (hashCode * 59) + this.FamilyName.GetHashCode(); - } - if (this.Gender != null) - { - hashCode = (hashCode * 59) + this.Gender.GetHashCode(); - } - if (this.GivenName != null) - { - hashCode = (hashCode * 59) + this.GivenName.GetHashCode(); - } - if (this.Locale != null) - { - hashCode = (hashCode * 59) + this.Locale.GetHashCode(); - } - if (this.MiddleName != null) - { - hashCode = (hashCode * 59) + this.MiddleName.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Nickname != null) - { - hashCode = (hashCode * 59) + this.Nickname.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PhoneNumberVerified.GetHashCode(); - if (this.Picture != null) - { - hashCode = (hashCode * 59) + this.Picture.GetHashCode(); - } - if (this.PreferredUsername != null) - { - hashCode = (hashCode * 59) + this.PreferredUsername.GetHashCode(); - } - if (this.Profile != null) - { - hashCode = (hashCode * 59) + this.Profile.GetHashCode(); - } - if (this.Sub != null) - { - hashCode = (hashCode * 59) + this.Sub.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - if (this.Website != null) - { - hashCode = (hashCode * 59) + this.Website.GetHashCode(); - } - if (this.Zoneinfo != null) - { - hashCode = (hashCode * 59) + this.Zoneinfo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs index 2318a527d47..7d7bac73a7a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,18 +30,18 @@ namespace Ory.Hydra.Client.Model /// HydraPagination /// [DataContract(Name = "pagination")] - public partial class HydraPagination : IEquatable, IValidatableObject + public partial class HydraPagination : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). - public HydraPagination(long pageSize = 250, string pageToken = "1") + public HydraPagination(long pageSize = 250, string pageToken = @"1") { this.PageSize = pageSize; // use default value if no "pageToken" provided - this.PageToken = pageToken ?? "1"; + this.PageToken = pageToken ?? @"1"; this.AdditionalProperties = new Dictionary(); } @@ -89,79 +89,23 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraPagination); - } - - /// - /// Returns true if HydraPagination instances are equal - /// - /// Instance of HydraPagination to be compared - /// Boolean - public bool Equals(HydraPagination input) - { - if (input == null) - { - return false; - } - return - ( - this.PageSize == input.PageSize || - this.PageSize.Equals(input.PageSize) - ) && - ( - this.PageToken == input.PageToken || - (this.PageToken != null && - this.PageToken.Equals(input.PageToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - if (this.PageToken != null) - { - hashCode = (hashCode * 59) + this.PageToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { // PageSize (long) maximum if (this.PageSize > (long)1000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); } // PageSize (long) minimum if (this.PageSize < (long)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); } yield break; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs index 2635ed014ab..cc37619a0b7 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraPaginationHeaders /// [DataContract(Name = "paginationHeaders")] - public partial class HydraPaginationHeaders : IEquatable, IValidatableObject + public partial class HydraPaginationHeaders : IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraPaginationHeaders); - } - - /// - /// Returns true if HydraPaginationHeaders instances are equal - /// - /// Instance of HydraPaginationHeaders to be compared - /// Boolean - public bool Equals(HydraPaginationHeaders input) - { - if (input == null) - { - return false; - } - return - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.XTotalCount == input.XTotalCount || - (this.XTotalCount != null && - this.XTotalCount.Equals(input.XTotalCount)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - if (this.XTotalCount != null) - { - hashCode = (hashCode * 59) + this.XTotalCount.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs index 4f1f7524d70..83f66d53e6a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraRFC6749ErrorJson /// [DataContract(Name = "RFC6749ErrorJson")] - public partial class HydraRFC6749ErrorJson : IEquatable, IValidatableObject + public partial class HydraRFC6749ErrorJson : IValidatableObject { /// /// Initializes a new instance of the class. @@ -113,95 +113,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraRFC6749ErrorJson); - } - - /// - /// Returns true if HydraRFC6749ErrorJson instances are equal - /// - /// Instance of HydraRFC6749ErrorJson to be compared - /// Boolean - public bool Equals(HydraRFC6749ErrorJson input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.ErrorDebug == input.ErrorDebug || - (this.ErrorDebug != null && - this.ErrorDebug.Equals(input.ErrorDebug)) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.ErrorHint == input.ErrorHint || - (this.ErrorHint != null && - this.ErrorHint.Equals(input.ErrorHint)) - ) && - ( - this.StatusCode == input.StatusCode || - this.StatusCode.Equals(input.StatusCode) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.ErrorDebug != null) - { - hashCode = (hashCode * 59) + this.ErrorDebug.GetHashCode(); - } - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.ErrorHint != null) - { - hashCode = (hashCode * 59) + this.ErrorHint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs index 44a7721e569..2c474074701 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraRejectOAuth2Request /// [DataContract(Name = "rejectOAuth2Request")] - public partial class HydraRejectOAuth2Request : IEquatable, IValidatableObject + public partial class HydraRejectOAuth2Request : IValidatableObject { /// /// Initializes a new instance of the class. @@ -118,95 +118,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraRejectOAuth2Request); - } - - /// - /// Returns true if HydraRejectOAuth2Request instances are equal - /// - /// Instance of HydraRejectOAuth2Request to be compared - /// Boolean - public bool Equals(HydraRejectOAuth2Request input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.ErrorDebug == input.ErrorDebug || - (this.ErrorDebug != null && - this.ErrorDebug.Equals(input.ErrorDebug)) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.ErrorHint == input.ErrorHint || - (this.ErrorHint != null && - this.ErrorHint.Equals(input.ErrorHint)) - ) && - ( - this.StatusCode == input.StatusCode || - this.StatusCode.Equals(input.StatusCode) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.ErrorDebug != null) - { - hashCode = (hashCode * 59) + this.ErrorDebug.GetHashCode(); - } - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.ErrorHint != null) - { - hashCode = (hashCode * 59) + this.ErrorHint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs index 64496070c6b..be43b254343 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,18 +30,18 @@ namespace Ory.Hydra.Client.Model /// HydraTokenPagination /// [DataContract(Name = "tokenPagination")] - public partial class HydraTokenPagination : IEquatable, IValidatableObject + public partial class HydraTokenPagination : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). - public HydraTokenPagination(long pageSize = 250, string pageToken = "1") + public HydraTokenPagination(long pageSize = 250, string pageToken = @"1") { this.PageSize = pageSize; // use default value if no "pageToken" provided - this.PageToken = pageToken ?? "1"; + this.PageToken = pageToken ?? @"1"; this.AdditionalProperties = new Dictionary(); } @@ -89,79 +89,23 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTokenPagination); - } - - /// - /// Returns true if HydraTokenPagination instances are equal - /// - /// Instance of HydraTokenPagination to be compared - /// Boolean - public bool Equals(HydraTokenPagination input) - { - if (input == null) - { - return false; - } - return - ( - this.PageSize == input.PageSize || - this.PageSize.Equals(input.PageSize) - ) && - ( - this.PageToken == input.PageToken || - (this.PageToken != null && - this.PageToken.Equals(input.PageToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - if (this.PageToken != null) - { - hashCode = (hashCode * 59) + this.PageToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { // PageSize (long) maximum if (this.PageSize > (long)1000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); } // PageSize (long) minimum if (this.PageSize < (long)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); } yield break; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs index dfd94bdaa76..7f93e53fa6e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraTokenPaginationHeaders /// [DataContract(Name = "tokenPaginationHeaders")] - public partial class HydraTokenPaginationHeaders : IEquatable, IValidatableObject + public partial class HydraTokenPaginationHeaders : IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTokenPaginationHeaders); - } - - /// - /// Returns true if HydraTokenPaginationHeaders instances are equal - /// - /// Instance of HydraTokenPaginationHeaders to be compared - /// Boolean - public bool Equals(HydraTokenPaginationHeaders input) - { - if (input == null) - { - return false; - } - return - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.XTotalCount == input.XTotalCount || - (this.XTotalCount != null && - this.XTotalCount.Equals(input.XTotalCount)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - if (this.XTotalCount != null) - { - hashCode = (hashCode * 59) + this.XTotalCount.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs index 2d02c0606eb..63db0e35cba 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,18 +30,18 @@ namespace Ory.Hydra.Client.Model /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). /// [DataContract(Name = "tokenPaginationRequestParameters")] - public partial class HydraTokenPaginationRequestParameters : IEquatable, IValidatableObject + public partial class HydraTokenPaginationRequestParameters : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). - public HydraTokenPaginationRequestParameters(long pageSize = 250, string pageToken = "1") + public HydraTokenPaginationRequestParameters(long pageSize = 250, string pageToken = @"1") { this.PageSize = pageSize; // use default value if no "pageToken" provided - this.PageToken = pageToken ?? "1"; + this.PageToken = pageToken ?? @"1"; this.AdditionalProperties = new Dictionary(); } @@ -89,79 +89,23 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTokenPaginationRequestParameters); - } - - /// - /// Returns true if HydraTokenPaginationRequestParameters instances are equal - /// - /// Instance of HydraTokenPaginationRequestParameters to be compared - /// Boolean - public bool Equals(HydraTokenPaginationRequestParameters input) - { - if (input == null) - { - return false; - } - return - ( - this.PageSize == input.PageSize || - this.PageSize.Equals(input.PageSize) - ) && - ( - this.PageToken == input.PageToken || - (this.PageToken != null && - this.PageToken.Equals(input.PageToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - if (this.PageToken != null) - { - hashCode = (hashCode * 59) + this.PageToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { // PageSize (long) maximum if (this.PageSize > (long)500) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 500.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value less than or equal to 500.", new [] { "PageSize" }); } // PageSize (long) minimum if (this.PageSize < (long)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + yield return new ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); } yield break; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs index 46bb28fa051..d853bc7db2d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). /// [DataContract(Name = "tokenPaginationResponseHeaders")] - public partial class HydraTokenPaginationResponseHeaders : IEquatable, IValidatableObject + public partial class HydraTokenPaginationResponseHeaders : IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,68 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTokenPaginationResponseHeaders); - } - - /// - /// Returns true if HydraTokenPaginationResponseHeaders instances are equal - /// - /// Instance of HydraTokenPaginationResponseHeaders to be compared - /// Boolean - public bool Equals(HydraTokenPaginationResponseHeaders input) - { - if (input == null) - { - return false; - } - return - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.XTotalCount == input.XTotalCount || - this.XTotalCount.Equals(input.XTotalCount) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - hashCode = (hashCode * 59) + this.XTotalCount.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs index 8c089b5866f..9096ecf7270 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// Trust OAuth2 JWT Bearer Grant Type Issuer Request Body /// [DataContract(Name = "trustOAuth2JwtGrantIssuer")] - public partial class HydraTrustOAuth2JwtGrantIssuer : IEquatable, IValidatableObject + public partial class HydraTrustOAuth2JwtGrantIssuer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -53,17 +53,20 @@ protected HydraTrustOAuth2JwtGrantIssuer() { this.ExpiresAt = expiresAt; // to ensure "issuer" is required (not null) - if (issuer == null) { + if (issuer == null) + { throw new ArgumentNullException("issuer is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); } this.Issuer = issuer; // to ensure "jwk" is required (not null) - if (jwk == null) { + if (jwk == null) + { throw new ArgumentNullException("jwk is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); } this.Jwk = jwk; // to ensure "scope" is required (not null) - if (scope == null) { + if (scope == null) + { throw new ArgumentNullException("scope is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); } this.Scope = scope; @@ -83,33 +86,36 @@ protected HydraTrustOAuth2JwtGrantIssuer() /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". /// /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] public DateTime ExpiresAt { get; set; } /// /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). /// /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = false)] + /// https://jwt-idp.example.com + [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = true)] public string Issuer { get; set; } /// /// Gets or Sets Jwk /// - [DataMember(Name = "jwk", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "jwk", IsRequired = true, EmitDefaultValue = true)] public HydraJsonWebKey Jwk { get; set; } /// /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) /// /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - [DataMember(Name = "scope", IsRequired = true, EmitDefaultValue = false)] + /// ["openid","offline"] + [DataMember(Name = "scope", IsRequired = true, EmitDefaultValue = true)] public List Scope { get; set; } /// /// The \"subject\" identifies the principal that is the subject of the JWT. /// /// The \"subject\" identifies the principal that is the subject of the JWT. + /// mike@example.com [DataMember(Name = "subject", EmitDefaultValue = false)] public string Subject { get; set; } @@ -147,105 +153,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTrustOAuth2JwtGrantIssuer); - } - - /// - /// Returns true if HydraTrustOAuth2JwtGrantIssuer instances are equal - /// - /// Instance of HydraTrustOAuth2JwtGrantIssuer to be compared - /// Boolean - public bool Equals(HydraTrustOAuth2JwtGrantIssuer input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowAnySubject == input.AllowAnySubject || - this.AllowAnySubject.Equals(input.AllowAnySubject) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Jwk == input.Jwk || - (this.Jwk != null && - this.Jwk.Equals(input.Jwk)) - ) && - ( - this.Scope == input.Scope || - this.Scope != null && - input.Scope != null && - this.Scope.SequenceEqual(input.Scope) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowAnySubject.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.Jwk != null) - { - hashCode = (hashCode * 59) + this.Jwk.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs index 9db6480871f..c8d9ca15d3b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// OAuth2 JWT Bearer Grant Type Issuer Trust Relationship /// [DataContract(Name = "trustedOAuth2JwtGrantIssuer")] - public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable, IValidatableObject + public partial class HydraTrustedOAuth2JwtGrantIssuer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,6 +80,7 @@ public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable /// Gets or Sets Id /// + /// 9edc811f-4e28-453c-9b46-4de65f00217f [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } @@ -87,6 +88,7 @@ public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + /// https://jwt-idp.example.com [DataMember(Name = "issuer", EmitDefaultValue = false)] public string Issuer { get; set; } @@ -100,6 +102,7 @@ public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + /// ["openid","offline"] [DataMember(Name = "scope", EmitDefaultValue = false)] public List Scope { get; set; } @@ -107,6 +110,7 @@ public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable /// The \"subject\" identifies the principal that is the subject of the JWT. + /// mike@example.com [DataMember(Name = "subject", EmitDefaultValue = false)] public string Subject { get; set; } @@ -146,123 +150,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTrustedOAuth2JwtGrantIssuer); - } - - /// - /// Returns true if HydraTrustedOAuth2JwtGrantIssuer instances are equal - /// - /// Instance of HydraTrustedOAuth2JwtGrantIssuer to be compared - /// Boolean - public bool Equals(HydraTrustedOAuth2JwtGrantIssuer input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowAnySubject == input.AllowAnySubject || - this.AllowAnySubject.Equals(input.AllowAnySubject) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.PublicKey == input.PublicKey || - (this.PublicKey != null && - this.PublicKey.Equals(input.PublicKey)) - ) && - ( - this.Scope == input.Scope || - this.Scope != null && - input.Scope != null && - this.Scope.SequenceEqual(input.Scope) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowAnySubject.GetHashCode(); - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.PublicKey != null) - { - hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs index 8d691064c94..a05624ff001 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key /// [DataContract(Name = "trustedOAuth2JwtGrantJsonWebKey")] - public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IEquatable, IValidatableObject + public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IValidatableObject { /// /// Initializes a new instance of the class. @@ -48,6 +48,7 @@ public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IEquatable /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + /// 123e4567-e89b-12d3-a456-426655440000 [DataMember(Name = "kid", EmitDefaultValue = false)] public string Kid { get; set; } @@ -55,6 +56,7 @@ public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IEquatable /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + /// https://jwt-idp.example.com [DataMember(Name = "set", EmitDefaultValue = false)] public string Set { get; set; } @@ -88,72 +90,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraTrustedOAuth2JwtGrantJsonWebKey); - } - - /// - /// Returns true if HydraTrustedOAuth2JwtGrantJsonWebKey instances are equal - /// - /// Instance of HydraTrustedOAuth2JwtGrantJsonWebKey to be compared - /// Boolean - public bool Equals(HydraTrustedOAuth2JwtGrantJsonWebKey input) - { - if (input == null) - { - return false; - } - return - ( - this.Kid == input.Kid || - (this.Kid != null && - this.Kid.Equals(input.Kid)) - ) && - ( - this.Set == input.Set || - (this.Set != null && - this.Set.Equals(input.Set)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kid != null) - { - hashCode = (hashCode * 59) + this.Kid.GetHashCode(); - } - if (this.Set != null) - { - hashCode = (hashCode * 59) + this.Set.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs index cc296245c8b..b8febaeca9a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraVerifiableCredentialPrimingResponse /// [DataContract(Name = "verifiableCredentialPrimingResponse")] - public partial class HydraVerifiableCredentialPrimingResponse : IEquatable, IValidatableObject + public partial class HydraVerifiableCredentialPrimingResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -140,118 +140,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraVerifiableCredentialPrimingResponse); - } - - /// - /// Returns true if HydraVerifiableCredentialPrimingResponse instances are equal - /// - /// Instance of HydraVerifiableCredentialPrimingResponse to be compared - /// Boolean - public bool Equals(HydraVerifiableCredentialPrimingResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CNonce == input.CNonce || - (this.CNonce != null && - this.CNonce.Equals(input.CNonce)) - ) && - ( - this.CNonceExpiresIn == input.CNonceExpiresIn || - this.CNonceExpiresIn.Equals(input.CNonceExpiresIn) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.ErrorDebug == input.ErrorDebug || - (this.ErrorDebug != null && - this.ErrorDebug.Equals(input.ErrorDebug)) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.ErrorHint == input.ErrorHint || - (this.ErrorHint != null && - this.ErrorHint.Equals(input.ErrorHint)) - ) && - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ) && - ( - this.StatusCode == input.StatusCode || - this.StatusCode.Equals(input.StatusCode) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CNonce != null) - { - hashCode = (hashCode * 59) + this.CNonce.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CNonceExpiresIn.GetHashCode(); - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.ErrorDebug != null) - { - hashCode = (hashCode * 59) + this.ErrorDebug.GetHashCode(); - } - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.ErrorHint != null) - { - hashCode = (hashCode * 59) + this.ErrorHint.GetHashCode(); - } - if (this.Format != null) - { - hashCode = (hashCode * 59) + this.Format.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs index 353b3e6a5fe..cdc8cee0256 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraVerifiableCredentialProof /// [DataContract(Name = "VerifiableCredentialProof")] - public partial class HydraVerifiableCredentialProof : IEquatable, IValidatableObject + public partial class HydraVerifiableCredentialProof : IValidatableObject { /// /// Initializes a new instance of the class. @@ -86,72 +86,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraVerifiableCredentialProof); - } - - /// - /// Returns true if HydraVerifiableCredentialProof instances are equal - /// - /// Instance of HydraVerifiableCredentialProof to be compared - /// Boolean - public bool Equals(HydraVerifiableCredentialProof input) - { - if (input == null) - { - return false; - } - return - ( - this.Jwt == input.Jwt || - (this.Jwt != null && - this.Jwt.Equals(input.Jwt)) - ) && - ( - this.ProofType == input.ProofType || - (this.ProofType != null && - this.ProofType.Equals(input.ProofType)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Jwt != null) - { - hashCode = (hashCode * 59) + this.Jwt.GetHashCode(); - } - if (this.ProofType != null) - { - hashCode = (hashCode * 59) + this.ProofType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs index 48552b5295d..eb475ba5555 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ namespace Ory.Hydra.Client.Model /// HydraVerifiableCredentialResponse /// [DataContract(Name = "verifiableCredentialResponse")] - public partial class HydraVerifiableCredentialResponse : IEquatable, IValidatableObject + public partial class HydraVerifiableCredentialResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -86,72 +86,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraVerifiableCredentialResponse); - } - - /// - /// Returns true if HydraVerifiableCredentialResponse instances are equal - /// - /// Instance of HydraVerifiableCredentialResponse to be compared - /// Boolean - public bool Equals(HydraVerifiableCredentialResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CredentialDraft00 == input.CredentialDraft00 || - (this.CredentialDraft00 != null && - this.CredentialDraft00.Equals(input.CredentialDraft00)) - ) && - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CredentialDraft00 != null) - { - hashCode = (hashCode * 59) + this.CredentialDraft00.GetHashCode(); - } - if (this.Format != null) - { - hashCode = (hashCode * 59) + this.Format.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs index d76c2f99ec8..fe08e155a22 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs @@ -3,7 +3,7 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,15 +30,15 @@ namespace Ory.Hydra.Client.Model /// HydraVersion /// [DataContract(Name = "version")] - public partial class HydraVersion : IEquatable, IValidatableObject + public partial class HydraVersion : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Version is the service's version.. - public HydraVersion(string version = default(string)) + /// Version is the service's version.. + public HydraVersion(string varVersion = default(string)) { - this._Version = version; + this.VarVersion = varVersion; this.AdditionalProperties = new Dictionary(); } @@ -47,7 +47,7 @@ public partial class HydraVersion : IEquatable, IValidatableObject /// /// Version is the service's version. [DataMember(Name = "version", EmitDefaultValue = false)] - public string _Version { get; set; } + public string VarVersion { get; set; } /// /// Gets or Sets additional properties @@ -63,7 +63,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HydraVersion {\n"); - sb.Append(" _Version: ").Append(_Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -78,63 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HydraVersion); - } - - /// - /// Returns true if HydraVersion instances are equal - /// - /// Instance of HydraVersion to be compared - /// Boolean - public bool Equals(HydraVersion input) - { - if (input == null) - { - return false; - } - return - ( - this._Version == input._Version || - (this._Version != null && - this._Version.Equals(input._Version)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Version != null) - { - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Ory.Hydra.Client.csproj b/clients/hydra/dotnet/src/Ory.Hydra.Client/Ory.Hydra.Client.csproj index 04e3f404c82..ae6ebb4052e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Ory.Hydra.Client.csproj +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Ory.Hydra.Client.csproj @@ -2,7 +2,7 @@ false - net5.0 + net6.0 Ory.Hydra.Client Ory.Hydra.Client Library @@ -12,20 +12,25 @@ A library generated from a OpenAPI doc No Copyright Ory.Hydra.Client - 2.2.0 + 2.2.1 bin\$(Configuration)\$(TargetFramework)\Ory.Hydra.Client.xml Apache-2.0 https://github.com/ory/sdk.git git Minor update + annotations + false - - - - - + + + + + + + + diff --git a/clients/hydra/elixir/.openapi-generator/VERSION b/clients/hydra/elixir/.openapi-generator/VERSION index 4b49d9bb63e..1985849fb58 100644 --- a/clients/hydra/elixir/.openapi-generator/VERSION +++ b/clients/hydra/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/elixir/README.md b/clients/hydra/elixir/README.md index 68d36332dca..ebd387ea884 100644 --- a/clients/hydra/elixir/README.md +++ b/clients/hydra/elixir/README.md @@ -18,7 +18,7 @@ your list of dependencies in `mix.exs`: ```elixir def deps do - [{:ory_hydra, "~> v2.2.0"}] + [{:ory_hydra, "~> v2.2.1"}] end ``` diff --git a/clients/hydra/elixir/lib/ory/api/jwk.ex b/clients/hydra/elixir/lib/ory/api/jwk.ex index 0b92ed44980..8fc11b8091e 100644 --- a/clients/hydra/elixir/lib/ory/api/jwk.ex +++ b/clients/hydra/elixir/lib/ory/api/jwk.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Api.Jwk do diff --git a/clients/hydra/elixir/lib/ory/api/metadata.ex b/clients/hydra/elixir/lib/ory/api/metadata.ex index 154f7d2005f..876f11eed6f 100644 --- a/clients/hydra/elixir/lib/ory/api/metadata.ex +++ b/clients/hydra/elixir/lib/ory/api/metadata.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Api.Metadata do diff --git a/clients/hydra/elixir/lib/ory/api/o_auth2.ex b/clients/hydra/elixir/lib/ory/api/o_auth2.ex index 264c6e8749b..bc292c88730 100644 --- a/clients/hydra/elixir/lib/ory/api/o_auth2.ex +++ b/clients/hydra/elixir/lib/ory/api/o_auth2.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Api.OAuth2 do @@ -464,7 +464,7 @@ defmodule Ory.Api.OAuth2 do - `{:ok, [%OAuth2Client{}, ...]}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec list_o_auth2_clients(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, list(Ory.Model.OAuth2Client.t)} | {:error, Tesla.Env.t} + @spec list_o_auth2_clients(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, [Ory.Model.OAuth2Client.t]} | {:error, Tesla.Env.t} def list_o_auth2_clients(connection, opts \\ []) do optional_params = %{ :page_size => :query, @@ -506,7 +506,7 @@ defmodule Ory.Api.OAuth2 do - `{:ok, [%OAuth2ConsentSession{}, ...]}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec list_o_auth2_consent_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, list(Ory.Model.OAuth2ConsentSession.t)} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + @spec list_o_auth2_consent_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, [Ory.Model.OAuth2ConsentSession.t]} | {:error, Tesla.Env.t} def list_o_auth2_consent_sessions(connection, subject, opts \\ []) do optional_params = %{ :page_size => :query, @@ -547,7 +547,7 @@ defmodule Ory.Api.OAuth2 do - `{:ok, [%TrustedOAuth2JwtGrantIssuer{}, ...]}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec list_trusted_o_auth2_jwt_grant_issuers(Tesla.Env.client, keyword()) :: {:ok, list(Ory.Model.TrustedOAuth2JwtGrantIssuer.t)} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + @spec list_trusted_o_auth2_jwt_grant_issuers(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, [Ory.Model.TrustedOAuth2JwtGrantIssuer.t]} | {:error, Tesla.Env.t} def list_trusted_o_auth2_jwt_grant_issuers(connection, opts \\ []) do optional_params = %{ :MaxItems => :query, diff --git a/clients/hydra/elixir/lib/ory/api/oidc.ex b/clients/hydra/elixir/lib/ory/api/oidc.ex index 03806fb236a..4765740815d 100644 --- a/clients/hydra/elixir/lib/ory/api/oidc.ex +++ b/clients/hydra/elixir/lib/ory/api/oidc.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Api.Oidc do diff --git a/clients/hydra/elixir/lib/ory/api/wellknown.ex b/clients/hydra/elixir/lib/ory/api/wellknown.ex index 583914bbfd0..d568a007bea 100644 --- a/clients/hydra/elixir/lib/ory/api/wellknown.ex +++ b/clients/hydra/elixir/lib/ory/api/wellknown.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Api.Wellknown do diff --git a/clients/hydra/elixir/lib/ory/connection.ex b/clients/hydra/elixir/lib/ory/connection.ex index dd989d83640..a0fc44e8c1c 100644 --- a/clients/hydra/elixir/lib/ory/connection.ex +++ b/clients/hydra/elixir/lib/ory/connection.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Connection do @@ -164,7 +164,7 @@ defmodule Ory.Connection do Keyword.get( tesla_options, :user_agent, - "openapi-generator - Ory v2.2.0 - elixir" + "openapi-generator - Ory v2.2.1 - elixir" ) ) diff --git a/clients/hydra/elixir/lib/ory/deserializer.ex b/clients/hydra/elixir/lib/ory/deserializer.ex index c1beab2b5fc..c08561dfdef 100644 --- a/clients/hydra/elixir/lib/ory/deserializer.ex +++ b/clients/hydra/elixir/lib/ory/deserializer.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Deserializer do diff --git a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex index f889aecd765..cc090520458 100644 --- a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.AcceptOAuth2ConsentRequest do diff --git a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex index cecbf95c81f..23c1e461999 100644 --- a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.AcceptOAuth2ConsentRequestSession do diff --git a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex index 7e2b0030766..8eff942bfaa 100644 --- a/clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.AcceptOAuth2LoginRequest do diff --git a/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex b/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex index 24abc2a5c6c..c1cdd4227c4 100644 --- a/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex +++ b/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.CreateJsonWebKeySet do diff --git a/clients/hydra/elixir/lib/ory/model/create_verifiable_credential_request_body.ex b/clients/hydra/elixir/lib/ory/model/create_verifiable_credential_request_body.ex index 4a1e7ac9eb6..85073f146d6 100644 --- a/clients/hydra/elixir/lib/ory/model/create_verifiable_credential_request_body.ex +++ b/clients/hydra/elixir/lib/ory/model/create_verifiable_credential_request_body.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.CreateVerifiableCredentialRequestBody do diff --git a/clients/hydra/elixir/lib/ory/model/credential_supported_draft00.ex b/clients/hydra/elixir/lib/ory/model/credential_supported_draft00.ex index 6bf2bf0dced..2664b20ba7c 100644 --- a/clients/hydra/elixir/lib/ory/model/credential_supported_draft00.ex +++ b/clients/hydra/elixir/lib/ory/model/credential_supported_draft00.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.CredentialSupportedDraft00 do diff --git a/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex b/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex index 65387b964be..99d20ddf730 100644 --- a/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex +++ b/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.ErrorOAuth2 do diff --git a/clients/hydra/elixir/lib/ory/model/generic_error.ex b/clients/hydra/elixir/lib/ory/model/generic_error.ex index 23e88e22d4d..f6669e97689 100644 --- a/clients/hydra/elixir/lib/ory/model/generic_error.ex +++ b/clients/hydra/elixir/lib/ory/model/generic_error.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.GenericError do diff --git a/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex b/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex index 07aa4dc6f3c..71aa0c42acf 100644 --- a/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex +++ b/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.GetVersion200Response do diff --git a/clients/hydra/elixir/lib/ory/model/health_not_ready_status.ex b/clients/hydra/elixir/lib/ory/model/health_not_ready_status.ex index aacf7119326..36fb1d69ca9 100644 --- a/clients/hydra/elixir/lib/ory/model/health_not_ready_status.ex +++ b/clients/hydra/elixir/lib/ory/model/health_not_ready_status.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.HealthNotReadyStatus do diff --git a/clients/hydra/elixir/lib/ory/model/health_status.ex b/clients/hydra/elixir/lib/ory/model/health_status.ex index 0571d7eea97..0d7d7a2ac59 100644 --- a/clients/hydra/elixir/lib/ory/model/health_status.ex +++ b/clients/hydra/elixir/lib/ory/model/health_status.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.HealthStatus do diff --git a/clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex b/clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex index 99b5e35586b..209c975c4d8 100644 --- a/clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex +++ b/clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.IntrospectedOAuth2Token do diff --git a/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex b/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex index 5cf7cb9b01c..a661c4cc9a7 100644 --- a/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex +++ b/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.IsReady200Response do diff --git a/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex b/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex index 1a534404391..7f00b90f6c0 100644 --- a/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex +++ b/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.IsReady503Response do diff --git a/clients/hydra/elixir/lib/ory/model/json_patch.ex b/clients/hydra/elixir/lib/ory/model/json_patch.ex index 4c4c52a7009..ee72ed9a11f 100644 --- a/clients/hydra/elixir/lib/ory/model/json_patch.ex +++ b/clients/hydra/elixir/lib/ory/model/json_patch.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.JsonPatch do diff --git a/clients/hydra/elixir/lib/ory/model/json_web_key.ex b/clients/hydra/elixir/lib/ory/model/json_web_key.ex index ca12c89a2e6..504c4686a2c 100644 --- a/clients/hydra/elixir/lib/ory/model/json_web_key.ex +++ b/clients/hydra/elixir/lib/ory/model/json_web_key.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.JsonWebKey do diff --git a/clients/hydra/elixir/lib/ory/model/json_web_key_set.ex b/clients/hydra/elixir/lib/ory/model/json_web_key_set.ex index f18fe65fa12..73a5f5518ba 100644 --- a/clients/hydra/elixir/lib/ory/model/json_web_key_set.ex +++ b/clients/hydra/elixir/lib/ory/model/json_web_key_set.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.JsonWebKeySet do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex index 96c2c6d329a..08b12a8a255 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2Client do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex index cf982123d79..c5069db6e30 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2ClientTokenLifespans do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex index ae8c4270b66..def353ae607 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2ConsentRequest do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex index 8d79b78c659..2b6fe594791 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2ConsentRequestOpenIdConnectContext do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex index 6f635d5ba4a..0352ec196e8 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2ConsentSession do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex index cde2e839935..090df97ce9e 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2ConsentSessionExpiresAt do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex index 2fde6e4849a..757ae8f9f88 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2LoginRequest do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex index 20761c47be1..3a4271eb176 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2LogoutRequest do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex index a192ccfa78b..042ac3e3d16 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2RedirectTo do diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex index 8489b24d222..4617d39d0bf 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OAuth2TokenExchange do diff --git a/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex b/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex index 4d6d6ec8eda..0fa248b66df 100644 --- a/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex +++ b/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OidcConfiguration do diff --git a/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex b/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex index 4efc9d9a725..39f66b516f0 100644 --- a/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex +++ b/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.OidcUserInfo do diff --git a/clients/hydra/elixir/lib/ory/model/pagination.ex b/clients/hydra/elixir/lib/ory/model/pagination.ex index 38b59916bc1..6be7df1647b 100644 --- a/clients/hydra/elixir/lib/ory/model/pagination.ex +++ b/clients/hydra/elixir/lib/ory/model/pagination.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.Pagination do diff --git a/clients/hydra/elixir/lib/ory/model/pagination_headers.ex b/clients/hydra/elixir/lib/ory/model/pagination_headers.ex index e4dceaccab7..844082fa6f3 100644 --- a/clients/hydra/elixir/lib/ory/model/pagination_headers.ex +++ b/clients/hydra/elixir/lib/ory/model/pagination_headers.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.PaginationHeaders do diff --git a/clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex b/clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex index 934e4e295cc..9f8e9e19083 100644 --- a/clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex +++ b/clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.RejectOAuth2Request do diff --git a/clients/hydra/elixir/lib/ory/model/rfc6749_error_json.ex b/clients/hydra/elixir/lib/ory/model/rfc6749_error_json.ex index 2954fb104be..51a6fe63789 100644 --- a/clients/hydra/elixir/lib/ory/model/rfc6749_error_json.ex +++ b/clients/hydra/elixir/lib/ory/model/rfc6749_error_json.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.Rfc6749ErrorJson do diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination.ex b/clients/hydra/elixir/lib/ory/model/token_pagination.ex index 45e3daf8919..4ea52c7b4c1 100644 --- a/clients/hydra/elixir/lib/ory/model/token_pagination.ex +++ b/clients/hydra/elixir/lib/ory/model/token_pagination.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TokenPagination do diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex b/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex index 80adca06ce6..dc2e7b2b0d3 100644 --- a/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TokenPaginationHeaders do diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex b/clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex index b265e233b5b..9320184d44e 100644 --- a/clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TokenPaginationRequestParameters do diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex b/clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex index 348e4763af6..841295ac748 100644 --- a/clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TokenPaginationResponseHeaders do diff --git a/clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex b/clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex index cc581539241..b18dc57950e 100644 --- a/clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex +++ b/clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TrustOAuth2JwtGrantIssuer do diff --git a/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex index 4cb464f3750..208cf51e460 100644 --- a/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex +++ b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TrustedOAuth2JwtGrantIssuer do diff --git a/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex index 35b5ccca15a..9b8d64b53ac 100644 --- a/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex +++ b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.TrustedOAuth2JwtGrantJsonWebKey do diff --git a/clients/hydra/elixir/lib/ory/model/verifiable_credential_priming_response.ex b/clients/hydra/elixir/lib/ory/model/verifiable_credential_priming_response.ex index 07794b4275e..4607ad5be4e 100644 --- a/clients/hydra/elixir/lib/ory/model/verifiable_credential_priming_response.ex +++ b/clients/hydra/elixir/lib/ory/model/verifiable_credential_priming_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.VerifiableCredentialPrimingResponse do diff --git a/clients/hydra/elixir/lib/ory/model/verifiable_credential_proof.ex b/clients/hydra/elixir/lib/ory/model/verifiable_credential_proof.ex index fb8338489a3..c4dfe1abe0d 100644 --- a/clients/hydra/elixir/lib/ory/model/verifiable_credential_proof.ex +++ b/clients/hydra/elixir/lib/ory/model/verifiable_credential_proof.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.VerifiableCredentialProof do diff --git a/clients/hydra/elixir/lib/ory/model/verifiable_credential_response.ex b/clients/hydra/elixir/lib/ory/model/verifiable_credential_response.ex index 91d2ce13fbf..bc8d8030a81 100644 --- a/clients/hydra/elixir/lib/ory/model/verifiable_credential_response.ex +++ b/clients/hydra/elixir/lib/ory/model/verifiable_credential_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.VerifiableCredentialResponse do diff --git a/clients/hydra/elixir/lib/ory/model/version.ex b/clients/hydra/elixir/lib/ory/model/version.ex index 023a927ddea..987d7928534 100644 --- a/clients/hydra/elixir/lib/ory/model/version.ex +++ b/clients/hydra/elixir/lib/ory/model/version.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.Model.Version do diff --git a/clients/hydra/elixir/lib/ory/request_builder.ex b/clients/hydra/elixir/lib/ory/request_builder.ex index 47016a0e74f..94b11a40f56 100644 --- a/clients/hydra/elixir/lib/ory/request_builder.ex +++ b/clients/hydra/elixir/lib/ory/request_builder.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.7.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule Ory.RequestBuilder do diff --git a/clients/hydra/elixir/mix.exs b/clients/hydra/elixir/mix.exs index ac3716cbaeb..d9f2dfa40e0 100644 --- a/clients/hydra/elixir/mix.exs +++ b/clients/hydra/elixir/mix.exs @@ -4,7 +4,7 @@ defmodule Ory.Mixfile do def project do [ app: :ory_hydra, - version: "2.2.0", + version: "2.2.1", elixir: "~> 1.10", build_embedded: Mix.env() == :prod, start_permanent: Mix.env() == :prod, diff --git a/clients/hydra/elixir/mix.lock b/clients/hydra/elixir/mix.lock index 033fab83b7a..1f30ff59723 100644 --- a/clients/hydra/elixir/mix.lock +++ b/clients/hydra/elixir/mix.lock @@ -1,13 +1,13 @@ %{ "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, - "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, - "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, - "makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, - "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.40", "f3534689f6b58f48aa3a9ac850d4f05832654fe257bf0549c08cc290035f70d5", [:mix], [], "hexpm", "cdb34f35892a45325bad21735fadb88033bcb7c4c296a999bde769783f53e46a"}, + "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, + "ex_doc": {:hex, :ex_doc, "0.34.1", "9751a0419bc15bc7580c73fde506b17b07f6402a1e5243be9e0f05a68c723368", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d441f1a86a235f59088978eff870de2e815e290e44a8bd976fe5d64470a4c9d2"}, + "jason": {:hex, :jason, "1.4.3", "d3f984eeb96fe53b85d20e0b049f03e57d075b5acda3ac8d465c969a2536c17b", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "9a90e868927f7c777689baa16d86f4d0e086d968db5c05d917ccff6d443e58a3"}, + "makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.0", "6f0eff9c9c489f26b69b61440bf1b238d95badae49adac77973cbacae87e3c2e", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "ea7a9307de9d1548d2a72d299058d1fd2339e3d398560a0e46c27dab4891e4d2"}, + "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, - "tesla": {:hex, :tesla, "1.8.0", "d511a4f5c5e42538d97eef7c40ec4f3e44effdc5068206f42ed859e09e51d1fd", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "10501f360cd926a309501287470372af1a6e1cbed0f43949203a4c13300bc79f"}, + "tesla": {:hex, :tesla, "1.11.1", "902ec0cd9fb06ba534be765f0eb78acd9d0ef70118230dc3a73fdc9afc91d036", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "c02d7dd149633c55c40adfaad6c3ce2615cfc89258b67a7f428c14bb835c398c"}, } diff --git a/clients/hydra/go/.openapi-generator/VERSION b/clients/hydra/go/.openapi-generator/VERSION index 3769235d3e6..93c8ddab9fe 100644 --- a/clients/hydra/go/.openapi-generator/VERSION +++ b/clients/hydra/go/.openapi-generator/VERSION @@ -1 +1 @@ -7.1.0 \ No newline at end of file +7.6.0 diff --git a/clients/hydra/go/README.md b/clients/hydra/go/README.md index a693aff4083..fa4bbbe4933 100644 --- a/clients/hydra/go/README.md +++ b/clients/hydra/go/README.md @@ -6,15 +6,16 @@ Documentation for all of Ory Hydra's APIs. ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: v2.2.0 +- API version: v2.2.1 - Package version: 1.0.0 +- Generator version: 7.6.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context @@ -22,13 +23,13 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: -```golang +```go import client "github.com/ory/hydra-client-go" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -40,7 +41,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `client.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1) ``` @@ -48,7 +49,7 @@ ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `client.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -62,7 +63,7 @@ Each operation can use different server URL defined using `OperationServers` map An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `client.ContextOperationServerIndices` and `client.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -186,10 +187,10 @@ Authentication schemes defined for the API: Example -```golang +```go auth := context.WithValue(context.Background(), client.ContextBasicAuth, client.BasicAuth{ - UserName: "username", - Password: "password", + UserName: "username", + Password: "password", }) r, err := client.Service.Operation(auth, args) ``` @@ -200,7 +201,7 @@ r, err := client.Service.Operation(auth, args) Example -```golang +```go auth := context.WithValue(context.Background(), client.ContextAccessToken, "BEARER_TOKEN_STRING") r, err := client.Service.Operation(auth, args) ``` @@ -218,14 +219,14 @@ r, err := client.Service.Operation(auth, args) Example -```golang +```go auth := context.WithValue(context.Background(), client.ContextAccessToken, "ACCESSTOKENSTRING") r, err := client.Service.Operation(auth, args) ``` Or via OAuth2 module to automatically refresh tokens and perform user authentication. -```golang +```go import "golang.org/x/oauth2" /* Perform OAuth2 round trip request and obtain a token */ diff --git a/clients/hydra/go/api/openapi.yaml b/clients/hydra/go/api/openapi.yaml index 7f53b57e229..03a95282730 100644 --- a/clients/hydra/go/api/openapi.yaml +++ b/clients/hydra/go/api/openapi.yaml @@ -7,7 +7,7 @@ info: license: name: Apache 2.0 title: Ory Hydra API - version: v2.2.0 + version: v2.2.1 servers: - url: / tags: @@ -2155,6 +2155,15 @@ components: type: integer type: object genericError: + example: + reason: User with ID 1234 does not exist. + request: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + code: 404 + debug: SQL field "foo" is not a bool. + details: "" + id: id + message: The resource could not be found + status: Not Found properties: code: description: The status code @@ -4442,6 +4451,15 @@ components: unexpectedError: type: string verifiableCredentialPrimingResponse: + example: + c_nonce_expires_in: 0 + error_debug: error_debug + status_code: 6 + c_nonce: c_nonce + error_description: error_description + format: format + error: error + error_hint: error_hint properties: c_nonce: type: string @@ -4511,6 +4529,9 @@ components: type: string type: object isReady_503_response: + example: + errors: + key: errors properties: errors: additionalProperties: diff --git a/clients/hydra/go/api_jwk.go b/clients/hydra/go/api_jwk.go index d2b9ce2753d..160248901a3 100644 --- a/clients/hydra/go/api_jwk.go +++ b/clients/hydra/go/api_jwk.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/api_metadata.go b/clients/hydra/go/api_metadata.go index c1dee5bf308..8467127819c 100644 --- a/clients/hydra/go/api_metadata.go +++ b/clients/hydra/go/api_metadata.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/api_o_auth2.go b/clients/hydra/go/api_o_auth2.go index 6e6a326ce77..d2b385b11d3 100644 --- a/clients/hydra/go/api_o_auth2.go +++ b/clients/hydra/go/api_o_auth2.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/api_oidc.go b/clients/hydra/go/api_oidc.go index 4bcf234482e..2b46268670c 100644 --- a/clients/hydra/go/api_oidc.go +++ b/clients/hydra/go/api_oidc.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/api_wellknown.go b/clients/hydra/go/api_wellknown.go index c307aaaa3bd..36ff64ae95d 100644 --- a/clients/hydra/go/api_wellknown.go +++ b/clients/hydra/go/api_wellknown.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/client.go b/clients/hydra/go/client.go index b61786126ca..eb08348929f 100644 --- a/clients/hydra/go/client.go +++ b/clients/hydra/go/client.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -43,7 +43,7 @@ var ( queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the Ory Hydra API API vv2.2.0 +// APIClient manages communication with the Ory Hydra API API vv2.2.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -176,7 +176,7 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri return } if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), collectionType) return } value = v.Type().String() + " value" diff --git a/clients/hydra/go/configuration.go b/clients/hydra/go/configuration.go index f2c1cf6a751..4c3b2acedec 100644 --- a/clients/hydra/go/configuration.go +++ b/clients/hydra/go/configuration.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/docs/JwkAPI.md b/clients/hydra/go/docs/JwkAPI.md index 0952b6b7ce6..ea63dc432c0 100644 --- a/clients/hydra/go/docs/JwkAPI.md +++ b/clients/hydra/go/docs/JwkAPI.md @@ -28,25 +28,25 @@ Create JSON Web Key package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | The JSON Web Key Set ID - createJsonWebKeySet := *openapiclient.NewCreateJsonWebKeySet("Alg_example", "Kid_example", "Use_example") // CreateJsonWebKeySet | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.JwkAPI.CreateJsonWebKeySet(context.Background(), set).CreateJsonWebKeySet(createJsonWebKeySet).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.CreateJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `JwkAPI.CreateJsonWebKeySet`: %v\n", resp) + set := "set_example" // string | The JSON Web Key Set ID + createJsonWebKeySet := *openapiclient.NewCreateJsonWebKeySet("Alg_example", "Kid_example", "Use_example") // CreateJsonWebKeySet | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.JwkAPI.CreateJsonWebKeySet(context.Background(), set).CreateJsonWebKeySet(createJsonWebKeySet).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.CreateJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateJsonWebKeySet`: JsonWebKeySet + fmt.Fprintf(os.Stdout, "Response from `JwkAPI.CreateJsonWebKeySet`: %v\n", resp) } ``` @@ -100,23 +100,23 @@ Delete JSON Web Key package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | The JSON Web Key Set - kid := "kid_example" // string | The JSON Web Key ID (kid) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.JwkAPI.DeleteJsonWebKey(context.Background(), set, kid).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.DeleteJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + set := "set_example" // string | The JSON Web Key Set + kid := "kid_example" // string | The JSON Web Key ID (kid) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.JwkAPI.DeleteJsonWebKey(context.Background(), set, kid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.DeleteJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -171,22 +171,22 @@ Delete JSON Web Key Set package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | The JSON Web Key Set - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.JwkAPI.DeleteJsonWebKeySet(context.Background(), set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.DeleteJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + set := "set_example" // string | The JSON Web Key Set + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.JwkAPI.DeleteJsonWebKeySet(context.Background(), set).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.DeleteJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -239,25 +239,25 @@ Get JSON Web Key package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | JSON Web Key Set ID - kid := "kid_example" // string | JSON Web Key ID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.JwkAPI.GetJsonWebKey(context.Background(), set, kid).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.GetJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJsonWebKey`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `JwkAPI.GetJsonWebKey`: %v\n", resp) + set := "set_example" // string | JSON Web Key Set ID + kid := "kid_example" // string | JSON Web Key ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.JwkAPI.GetJsonWebKey(context.Background(), set, kid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.GetJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetJsonWebKey`: JsonWebKeySet + fmt.Fprintf(os.Stdout, "Response from `JwkAPI.GetJsonWebKey`: %v\n", resp) } ``` @@ -312,24 +312,24 @@ Retrieve a JSON Web Key Set package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | JSON Web Key Set ID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.JwkAPI.GetJsonWebKeySet(context.Background(), set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.GetJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `JwkAPI.GetJsonWebKeySet`: %v\n", resp) + set := "set_example" // string | JSON Web Key Set ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.JwkAPI.GetJsonWebKeySet(context.Background(), set).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.GetJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetJsonWebKeySet`: JsonWebKeySet + fmt.Fprintf(os.Stdout, "Response from `JwkAPI.GetJsonWebKeySet`: %v\n", resp) } ``` @@ -382,26 +382,26 @@ Set JSON Web Key package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | The JSON Web Key Set ID - kid := "kid_example" // string | JSON Web Key ID - jsonWebKey := *openapiclient.NewJsonWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig") // JsonWebKey | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.JwkAPI.SetJsonWebKey(context.Background(), set, kid).JsonWebKey(jsonWebKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.SetJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetJsonWebKey`: JsonWebKey - fmt.Fprintf(os.Stdout, "Response from `JwkAPI.SetJsonWebKey`: %v\n", resp) + set := "set_example" // string | The JSON Web Key Set ID + kid := "kid_example" // string | JSON Web Key ID + jsonWebKey := *openapiclient.NewJsonWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig") // JsonWebKey | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.JwkAPI.SetJsonWebKey(context.Background(), set, kid).JsonWebKey(jsonWebKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.SetJsonWebKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetJsonWebKey`: JsonWebKey + fmt.Fprintf(os.Stdout, "Response from `JwkAPI.SetJsonWebKey`: %v\n", resp) } ``` @@ -457,25 +457,25 @@ Update a JSON Web Key Set package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - set := "set_example" // string | The JSON Web Key Set ID - jsonWebKeySet := *openapiclient.NewJsonWebKeySet() // JsonWebKeySet | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.JwkAPI.SetJsonWebKeySet(context.Background(), set).JsonWebKeySet(jsonWebKeySet).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.SetJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetJsonWebKeySet`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `JwkAPI.SetJsonWebKeySet`: %v\n", resp) + set := "set_example" // string | The JSON Web Key Set ID + jsonWebKeySet := *openapiclient.NewJsonWebKeySet() // JsonWebKeySet | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.JwkAPI.SetJsonWebKeySet(context.Background(), set).JsonWebKeySet(jsonWebKeySet).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `JwkAPI.SetJsonWebKeySet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetJsonWebKeySet`: JsonWebKeySet + fmt.Fprintf(os.Stdout, "Response from `JwkAPI.SetJsonWebKeySet`: %v\n", resp) } ``` diff --git a/clients/hydra/go/docs/MetadataAPI.md b/clients/hydra/go/docs/MetadataAPI.md index c146cabf7fe..e8461c04c48 100644 --- a/clients/hydra/go/docs/MetadataAPI.md +++ b/clients/hydra/go/docs/MetadataAPI.md @@ -24,23 +24,23 @@ Return Running Software Version. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MetadataAPI.GetVersion(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.GetVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetVersion`: GetVersion200Response - fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.GetVersion`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetadataAPI.GetVersion(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.GetVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetVersion`: GetVersion200Response + fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.GetVersion`: %v\n", resp) } ``` @@ -85,23 +85,23 @@ Check HTTP Server Status package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MetadataAPI.IsAlive(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.IsAlive``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IsAlive`: HealthStatus - fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.IsAlive`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetadataAPI.IsAlive(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.IsAlive``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IsAlive`: HealthStatus + fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.IsAlive`: %v\n", resp) } ``` @@ -146,23 +146,23 @@ Check HTTP Server and Database Status package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MetadataAPI.IsReady(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.IsReady``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IsReady`: IsReady200Response - fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.IsReady`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetadataAPI.IsReady(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetadataAPI.IsReady``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IsReady`: IsReady200Response + fmt.Fprintf(os.Stdout, "Response from `MetadataAPI.IsReady`: %v\n", resp) } ``` diff --git a/clients/hydra/go/docs/OAuth2API.md b/clients/hydra/go/docs/OAuth2API.md index 4c878278694..b452c6edaef 100644 --- a/clients/hydra/go/docs/OAuth2API.md +++ b/clients/hydra/go/docs/OAuth2API.md @@ -49,25 +49,25 @@ Accept OAuth 2.0 Consent Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge - acceptOAuth2ConsentRequest := *openapiclient.NewAcceptOAuth2ConsentRequest() // AcceptOAuth2ConsentRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.AcceptOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2ConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptOAuth2ConsentRequest`: OAuth2RedirectTo - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2ConsentRequest`: %v\n", resp) + consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge + acceptOAuth2ConsentRequest := *openapiclient.NewAcceptOAuth2ConsentRequest() // AcceptOAuth2ConsentRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.AcceptOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AcceptOAuth2ConsentRequest`: OAuth2RedirectTo + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -117,25 +117,25 @@ Accept OAuth 2.0 Login Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge - acceptOAuth2LoginRequest := *openapiclient.NewAcceptOAuth2LoginRequest("Subject_example") // AcceptOAuth2LoginRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.AcceptOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2LoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptOAuth2LoginRequest`: OAuth2RedirectTo - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2LoginRequest`: %v\n", resp) + loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge + acceptOAuth2LoginRequest := *openapiclient.NewAcceptOAuth2LoginRequest("Subject_example") // AcceptOAuth2LoginRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.AcceptOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AcceptOAuth2LoginRequest`: OAuth2RedirectTo + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2LoginRequest`: %v\n", resp) } ``` @@ -185,24 +185,24 @@ Accept OAuth 2.0 Session Logout Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - logoutChallenge := "logoutChallenge_example" // string | OAuth 2.0 Logout Request Challenge - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.AcceptOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2LogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptOAuth2LogoutRequest`: OAuth2RedirectTo - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2LogoutRequest`: %v\n", resp) + logoutChallenge := "logoutChallenge_example" // string | OAuth 2.0 Logout Request Challenge + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.AcceptOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.AcceptOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AcceptOAuth2LogoutRequest`: OAuth2RedirectTo + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.AcceptOAuth2LogoutRequest`: %v\n", resp) } ``` @@ -251,24 +251,24 @@ Create OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.CreateOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.CreateOAuth2Client`: %v\n", resp) + oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.CreateOAuth2Client(context.Background()).OAuth2Client(oAuth2Client).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.CreateOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateOAuth2Client`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.CreateOAuth2Client`: %v\n", resp) } ``` @@ -317,22 +317,22 @@ Delete OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.DeleteOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | The id of the OAuth 2.0 Client. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.DeleteOAuth2Client(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -385,22 +385,22 @@ Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - clientId := "clientId_example" // string | OAuth 2.0 Client ID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.DeleteOAuth2Token(context.Background()).ClientId(clientId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | OAuth 2.0 Client ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.DeleteOAuth2Token(context.Background()).ClientId(clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -449,22 +449,22 @@ Delete Trusted OAuth2 JWT Bearer Grant Type Issuer package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the desired grant - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.DeleteTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteTrustedOAuth2JwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | The id of the desired grant + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.DeleteTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.DeleteTrustedOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -517,24 +517,24 @@ Get an OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.GetOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2Client`: %v\n", resp) + id := "id_example" // string | The id of the OAuth 2.0 Client. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.GetOAuth2Client(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOAuth2Client`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2Client`: %v\n", resp) } ``` @@ -587,24 +587,24 @@ Get OAuth 2.0 Consent Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.GetOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2ConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOAuth2ConsentRequest`: OAuth2ConsentRequest - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2ConsentRequest`: %v\n", resp) + consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.GetOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOAuth2ConsentRequest`: OAuth2ConsentRequest + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -653,24 +653,24 @@ Get OAuth 2.0 Login Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.GetOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2LoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOAuth2LoginRequest`: OAuth2LoginRequest - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2LoginRequest`: %v\n", resp) + loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.GetOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOAuth2LoginRequest`: OAuth2LoginRequest + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2LoginRequest`: %v\n", resp) } ``` @@ -719,24 +719,24 @@ Get OAuth 2.0 Session Logout Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - logoutChallenge := "logoutChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.GetOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2LogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOAuth2LogoutRequest`: OAuth2LogoutRequest - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2LogoutRequest`: %v\n", resp) + logoutChallenge := "logoutChallenge_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.GetOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOAuth2LogoutRequest`: OAuth2LogoutRequest + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetOAuth2LogoutRequest`: %v\n", resp) } ``` @@ -785,24 +785,24 @@ Get Trusted OAuth2 JWT Bearer Grant Type Issuer package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the desired grant - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.GetTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetTrustedOAuth2JwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTrustedOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetTrustedOAuth2JwtGrantIssuer`: %v\n", resp) + id := "id_example" // string | The id of the desired grant + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.GetTrustedOAuth2JwtGrantIssuer(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.GetTrustedOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTrustedOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.GetTrustedOAuth2JwtGrantIssuer`: %v\n", resp) } ``` @@ -855,25 +855,25 @@ Introspect OAuth2 Access and Refresh Tokens package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - token := "token_example" // string | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. - scope := "scope_example" // string | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.IntrospectOAuth2Token(context.Background()).Token(token).Scope(scope).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.IntrospectOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IntrospectOAuth2Token`: IntrospectedOAuth2Token - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.IntrospectOAuth2Token`: %v\n", resp) + token := "token_example" // string | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + scope := "scope_example" // string | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.IntrospectOAuth2Token(context.Background()).Token(token).Scope(scope).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.IntrospectOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IntrospectOAuth2Token`: IntrospectedOAuth2Token + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.IntrospectOAuth2Token`: %v\n", resp) } ``` @@ -923,27 +923,27 @@ List OAuth 2.0 Clients package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) - pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") - clientName := "clientName_example" // string | The name of the clients to filter by. (optional) - owner := "owner_example" // string | The owner of the clients to filter by. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.ListOAuth2Clients(context.Background()).PageSize(pageSize).PageToken(pageToken).ClientName(clientName).Owner(owner).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListOAuth2Clients``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListOAuth2Clients`: []OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListOAuth2Clients`: %v\n", resp) + pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) + pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") + clientName := "clientName_example" // string | The name of the clients to filter by. (optional) + owner := "owner_example" // string | The owner of the clients to filter by. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.ListOAuth2Clients(context.Background()).PageSize(pageSize).PageToken(pageToken).ClientName(clientName).Owner(owner).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListOAuth2Clients``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListOAuth2Clients`: []OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListOAuth2Clients`: %v\n", resp) } ``` @@ -995,27 +995,27 @@ List OAuth 2.0 Consent Sessions of a Subject package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - subject := "subject_example" // string | The subject to list the consent sessions for. - pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) - pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") - loginSessionId := "loginSessionId_example" // string | The login session id to list the consent sessions for. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.ListOAuth2ConsentSessions(context.Background()).Subject(subject).PageSize(pageSize).PageToken(pageToken).LoginSessionId(loginSessionId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListOAuth2ConsentSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListOAuth2ConsentSessions`: []OAuth2ConsentSession - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListOAuth2ConsentSessions`: %v\n", resp) + subject := "subject_example" // string | The subject to list the consent sessions for. + pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) + pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to "1") + loginSessionId := "loginSessionId_example" // string | The login session id to list the consent sessions for. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.ListOAuth2ConsentSessions(context.Background()).Subject(subject).PageSize(pageSize).PageToken(pageToken).LoginSessionId(loginSessionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListOAuth2ConsentSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListOAuth2ConsentSessions`: []OAuth2ConsentSession + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListOAuth2ConsentSessions`: %v\n", resp) } ``` @@ -1067,26 +1067,26 @@ List Trusted OAuth2 JWT Bearer Grant Type Issuers package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - maxItems := int64(789) // int64 | (optional) - defaultItems := int64(789) // int64 | (optional) - issuer := "issuer_example" // string | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.ListTrustedOAuth2JwtGrantIssuers(context.Background()).MaxItems(maxItems).DefaultItems(defaultItems).Issuer(issuer).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListTrustedOAuth2JwtGrantIssuers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListTrustedOAuth2JwtGrantIssuers`: []TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListTrustedOAuth2JwtGrantIssuers`: %v\n", resp) + maxItems := int64(789) // int64 | (optional) + defaultItems := int64(789) // int64 | (optional) + issuer := "issuer_example" // string | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.ListTrustedOAuth2JwtGrantIssuers(context.Background()).MaxItems(maxItems).DefaultItems(defaultItems).Issuer(issuer).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.ListTrustedOAuth2JwtGrantIssuers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTrustedOAuth2JwtGrantIssuers`: []TrustedOAuth2JwtGrantIssuer + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.ListTrustedOAuth2JwtGrantIssuers`: %v\n", resp) } ``` @@ -1137,23 +1137,23 @@ OAuth 2.0 Authorize Endpoint package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.OAuth2Authorize(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.OAuth2Authorize``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OAuth2Authorize`: ErrorOAuth2 - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.OAuth2Authorize`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.OAuth2Authorize(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.OAuth2Authorize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OAuth2Authorize`: ErrorOAuth2 + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.OAuth2Authorize`: %v\n", resp) } ``` @@ -1198,28 +1198,28 @@ The OAuth 2.0 Token Endpoint package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - grantType := "grantType_example" // string | - clientId := "clientId_example" // string | (optional) - code := "code_example" // string | (optional) - redirectUri := "redirectUri_example" // string | (optional) - refreshToken := "refreshToken_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.Oauth2TokenExchange(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.Oauth2TokenExchange``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Oauth2TokenExchange`: OAuth2TokenExchange - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.Oauth2TokenExchange`: %v\n", resp) + grantType := "grantType_example" // string | + clientId := "clientId_example" // string | (optional) + code := "code_example" // string | (optional) + redirectUri := "redirectUri_example" // string | (optional) + refreshToken := "refreshToken_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.Oauth2TokenExchange(context.Background()).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.Oauth2TokenExchange``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Oauth2TokenExchange`: OAuth2TokenExchange + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.Oauth2TokenExchange`: %v\n", resp) } ``` @@ -1272,25 +1272,25 @@ Patch OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - jsonPatch := []openapiclient.JsonPatch{*openapiclient.NewJsonPatch("replace", "/name")} // []JsonPatch | OAuth 2.0 Client JSON Patch Body - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.PatchOAuth2Client(context.Background(), id).JsonPatch(jsonPatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.PatchOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.PatchOAuth2Client`: %v\n", resp) + id := "id_example" // string | The id of the OAuth 2.0 Client. + jsonPatch := []openapiclient.JsonPatch{*openapiclient.NewJsonPatch("replace", "/name")} // []JsonPatch | OAuth 2.0 Client JSON Patch Body + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.PatchOAuth2Client(context.Background(), id).JsonPatch(jsonPatch).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.PatchOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchOAuth2Client`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.PatchOAuth2Client`: %v\n", resp) } ``` @@ -1344,25 +1344,25 @@ Reject OAuth 2.0 Consent Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge - rejectOAuth2Request := *openapiclient.NewRejectOAuth2Request() // RejectOAuth2Request | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.RejectOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2ConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RejectOAuth2ConsentRequest`: OAuth2RedirectTo - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.RejectOAuth2ConsentRequest`: %v\n", resp) + consentChallenge := "consentChallenge_example" // string | OAuth 2.0 Consent Request Challenge + rejectOAuth2Request := *openapiclient.NewRejectOAuth2Request() // RejectOAuth2Request | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.RejectOAuth2ConsentRequest(context.Background()).ConsentChallenge(consentChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2ConsentRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RejectOAuth2ConsentRequest`: OAuth2RedirectTo + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.RejectOAuth2ConsentRequest`: %v\n", resp) } ``` @@ -1412,25 +1412,25 @@ Reject OAuth 2.0 Login Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge - rejectOAuth2Request := *openapiclient.NewRejectOAuth2Request() // RejectOAuth2Request | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.RejectOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2LoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RejectOAuth2LoginRequest`: OAuth2RedirectTo - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.RejectOAuth2LoginRequest`: %v\n", resp) + loginChallenge := "loginChallenge_example" // string | OAuth 2.0 Login Request Challenge + rejectOAuth2Request := *openapiclient.NewRejectOAuth2Request() // RejectOAuth2Request | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.RejectOAuth2LoginRequest(context.Background()).LoginChallenge(loginChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2LoginRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RejectOAuth2LoginRequest`: OAuth2RedirectTo + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.RejectOAuth2LoginRequest`: %v\n", resp) } ``` @@ -1480,22 +1480,22 @@ Reject OAuth 2.0 Session Logout Request package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - logoutChallenge := "logoutChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.RejectOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2LogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + logoutChallenge := "logoutChallenge_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.RejectOAuth2LogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RejectOAuth2LogoutRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1544,24 +1544,24 @@ Revoke OAuth 2.0 Consent Sessions of a Subject package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - subject := "subject_example" // string | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - client := "client_example" // string | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) - all := true // bool | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.RevokeOAuth2ConsentSessions(context.Background()).Subject(subject).Client(client).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2ConsentSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + subject := "subject_example" // string | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + client := "client_example" // string | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + all := true // bool | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.RevokeOAuth2ConsentSessions(context.Background()).Subject(subject).Client(client).All(all).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2ConsentSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1612,23 +1612,23 @@ Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) - sid := "sid_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.RevokeOAuth2LoginSessions(context.Background()).Subject(subject).Sid(sid).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2LoginSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + sid := "sid_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.RevokeOAuth2LoginSessions(context.Background()).Subject(subject).Sid(sid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2LoginSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1678,24 +1678,24 @@ Revoke OAuth 2.0 Access or Refresh Token package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - token := "token_example" // string | - clientId := "clientId_example" // string | (optional) - clientSecret := "clientSecret_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OAuth2API.RevokeOAuth2Token(context.Background()).Token(token).ClientId(clientId).ClientSecret(clientSecret).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + token := "token_example" // string | + clientId := "clientId_example" // string | (optional) + clientSecret := "clientSecret_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OAuth2API.RevokeOAuth2Token(context.Background()).Token(token).ClientId(clientId).ClientSecret(clientSecret).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.RevokeOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1746,25 +1746,25 @@ Set OAuth 2.0 Client package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | OAuth 2.0 Client ID - oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.SetOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.SetOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.SetOAuth2Client`: %v\n", resp) + id := "id_example" // string | OAuth 2.0 Client ID + oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.SetOAuth2Client(context.Background(), id).OAuth2Client(oAuth2Client).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.SetOAuth2Client``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetOAuth2Client`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.SetOAuth2Client`: %v\n", resp) } ``` @@ -1818,25 +1818,25 @@ Set OAuth2 Client Token Lifespans package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | OAuth 2.0 Client ID - oAuth2ClientTokenLifespans := *openapiclient.NewOAuth2ClientTokenLifespans() // OAuth2ClientTokenLifespans | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.SetOAuth2ClientLifespans(context.Background(), id).OAuth2ClientTokenLifespans(oAuth2ClientTokenLifespans).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.SetOAuth2ClientLifespans``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetOAuth2ClientLifespans`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.SetOAuth2ClientLifespans`: %v\n", resp) + id := "id_example" // string | OAuth 2.0 Client ID + oAuth2ClientTokenLifespans := *openapiclient.NewOAuth2ClientTokenLifespans() // OAuth2ClientTokenLifespans | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.SetOAuth2ClientLifespans(context.Background(), id).OAuth2ClientTokenLifespans(oAuth2ClientTokenLifespans).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.SetOAuth2ClientLifespans``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetOAuth2ClientLifespans`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.SetOAuth2ClientLifespans`: %v\n", resp) } ``` @@ -1890,25 +1890,25 @@ Trust OAuth2 JWT Bearer Grant Type Issuer package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - openapiclient "github.com/ory/hydra-client-go" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - trustOAuth2JwtGrantIssuer := *openapiclient.NewTrustOAuth2JwtGrantIssuer(time.Now(), "https://jwt-idp.example.com", *openapiclient.NewJsonWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig"), []string{"Scope_example"}) // TrustOAuth2JwtGrantIssuer | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2API.TrustOAuth2JwtGrantIssuer(context.Background()).TrustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.TrustOAuth2JwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TrustOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `OAuth2API.TrustOAuth2JwtGrantIssuer`: %v\n", resp) + trustOAuth2JwtGrantIssuer := *openapiclient.NewTrustOAuth2JwtGrantIssuer(time.Now(), "https://jwt-idp.example.com", *openapiclient.NewJsonWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig"), []string{"Scope_example"}) // TrustOAuth2JwtGrantIssuer | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2API.TrustOAuth2JwtGrantIssuer(context.Background()).TrustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2API.TrustOAuth2JwtGrantIssuer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TrustOAuth2JwtGrantIssuer`: TrustedOAuth2JwtGrantIssuer + fmt.Fprintf(os.Stdout, "Response from `OAuth2API.TrustOAuth2JwtGrantIssuer`: %v\n", resp) } ``` diff --git a/clients/hydra/go/docs/OidcAPI.md b/clients/hydra/go/docs/OidcAPI.md index f14b469e4b3..53fa90192bc 100644 --- a/clients/hydra/go/docs/OidcAPI.md +++ b/clients/hydra/go/docs/OidcAPI.md @@ -29,24 +29,24 @@ Register OAuth2 Client using OpenID Dynamic Client Registration package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | Dynamic Client Registration Request Body - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.CreateOidcDynamicClient(context.Background()).OAuth2Client(oAuth2Client).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.CreateOidcDynamicClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOidcDynamicClient`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.CreateOidcDynamicClient`: %v\n", resp) + oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | Dynamic Client Registration Request Body + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.CreateOidcDynamicClient(context.Background()).OAuth2Client(oAuth2Client).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.CreateOidcDynamicClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateOidcDynamicClient`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.CreateOidcDynamicClient`: %v\n", resp) } ``` @@ -95,24 +95,24 @@ Issues a Verifiable Credential package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - createVerifiableCredentialRequestBody := *openapiclient.NewCreateVerifiableCredentialRequestBody() // CreateVerifiableCredentialRequestBody | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.CreateVerifiableCredential(context.Background()).CreateVerifiableCredentialRequestBody(createVerifiableCredentialRequestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.CreateVerifiableCredential``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateVerifiableCredential`: VerifiableCredentialResponse - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.CreateVerifiableCredential`: %v\n", resp) + createVerifiableCredentialRequestBody := *openapiclient.NewCreateVerifiableCredentialRequestBody() // CreateVerifiableCredentialRequestBody | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.CreateVerifiableCredential(context.Background()).CreateVerifiableCredentialRequestBody(createVerifiableCredentialRequestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.CreateVerifiableCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateVerifiableCredential`: VerifiableCredentialResponse + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.CreateVerifiableCredential`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OidcAPI.DeleteOidcDynamicClient(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.DeleteOidcDynamicClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | The id of the OAuth 2.0 Client. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OidcAPI.DeleteOidcDynamicClient(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.DeleteOidcDynamicClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,23 +229,23 @@ OpenID Connect Discovery package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.DiscoverOidcConfiguration(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.DiscoverOidcConfiguration``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DiscoverOidcConfiguration`: OidcConfiguration - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.DiscoverOidcConfiguration`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.DiscoverOidcConfiguration(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.DiscoverOidcConfiguration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DiscoverOidcConfiguration`: OidcConfiguration + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.DiscoverOidcConfiguration`: %v\n", resp) } ``` @@ -290,24 +290,24 @@ Get OAuth2 Client using OpenID Dynamic Client Registration package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.GetOidcDynamicClient(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.GetOidcDynamicClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOidcDynamicClient`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.GetOidcDynamicClient`: %v\n", resp) + id := "id_example" // string | The id of the OAuth 2.0 Client. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.GetOidcDynamicClient(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.GetOidcDynamicClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOidcDynamicClient`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.GetOidcDynamicClient`: %v\n", resp) } ``` @@ -360,23 +360,23 @@ OpenID Connect Userinfo package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.GetOidcUserInfo(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.GetOidcUserInfo``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOidcUserInfo`: OidcUserInfo - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.GetOidcUserInfo`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.GetOidcUserInfo(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.GetOidcUserInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOidcUserInfo`: OidcUserInfo + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.GetOidcUserInfo`: %v\n", resp) } ``` @@ -421,21 +421,21 @@ OpenID Connect Front- and Back-channel Enabled Logout package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OidcAPI.RevokeOidcSession(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.RevokeOidcSession``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OidcAPI.RevokeOidcSession(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.RevokeOidcSession``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -480,25 +480,25 @@ Set OAuth2 Client using OpenID Dynamic Client Registration package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - id := "id_example" // string | OAuth 2.0 Client ID - oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OidcAPI.SetOidcDynamicClient(context.Background(), id).OAuth2Client(oAuth2Client).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.SetOidcDynamicClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetOidcDynamicClient`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `OidcAPI.SetOidcDynamicClient`: %v\n", resp) + id := "id_example" // string | OAuth 2.0 Client ID + oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OidcAPI.SetOidcDynamicClient(context.Background(), id).OAuth2Client(oAuth2Client).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OidcAPI.SetOidcDynamicClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetOidcDynamicClient`: OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `OidcAPI.SetOidcDynamicClient`: %v\n", resp) } ``` diff --git a/clients/hydra/go/docs/WellknownAPI.md b/clients/hydra/go/docs/WellknownAPI.md index ae82abcb08d..cb10524bfc4 100644 --- a/clients/hydra/go/docs/WellknownAPI.md +++ b/clients/hydra/go/docs/WellknownAPI.md @@ -22,23 +22,23 @@ Discover Well-Known JSON Web Keys package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/ory/hydra-client-go" + "context" + "fmt" + "os" + openapiclient "github.com/ory/hydra-client-go" ) func main() { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WellknownAPI.DiscoverJsonWebKeys(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WellknownAPI.DiscoverJsonWebKeys``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DiscoverJsonWebKeys`: JsonWebKeySet - fmt.Fprintf(os.Stdout, "Response from `WellknownAPI.DiscoverJsonWebKeys`: %v\n", resp) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WellknownAPI.DiscoverJsonWebKeys(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WellknownAPI.DiscoverJsonWebKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DiscoverJsonWebKeys`: JsonWebKeySet + fmt.Fprintf(os.Stdout, "Response from `WellknownAPI.DiscoverJsonWebKeys`: %v\n", resp) } ``` diff --git a/clients/hydra/go/go.mod b/clients/hydra/go/go.mod index 9d987db34da..cb582dcb831 100644 --- a/clients/hydra/go/go.mod +++ b/clients/hydra/go/go.mod @@ -4,16 +4,12 @@ go 1.17 require ( github.com/ory/hydra-client-go v1.11.8 - github.com/stretchr/testify v1.8.4 - golang.org/x/oauth2 v0.17.0 + github.com/stretchr/testify v1.9.0 + golang.org/x/oauth2 v0.21.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.21.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/clients/hydra/go/go.sum b/clients/hydra/go/go.sum index 3ec7e89a21e..345d097f696 100644 --- a/clients/hydra/go/go.sum +++ b/clients/hydra/go/go.sum @@ -73,9 +73,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -85,7 +82,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -118,8 +114,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -189,16 +185,14 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -306,8 +300,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -359,10 +351,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/clients/hydra/go/model_accept_o_auth2_consent_request.go b/clients/hydra/go/model_accept_o_auth2_consent_request.go index b2e9e2322f5..8a87b6434b1 100644 --- a/clients/hydra/go/model_accept_o_auth2_consent_request.go +++ b/clients/hydra/go/model_accept_o_auth2_consent_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -73,7 +73,7 @@ func (o *AcceptOAuth2ConsentRequest) GetContextOk() (*interface{}, bool) { // HasContext returns a boolean if a field has been set. func (o *AcceptOAuth2ConsentRequest) HasContext() bool { - if o != nil && IsNil(o.Context) { + if o != nil && !IsNil(o.Context) { return true } @@ -316,10 +316,10 @@ func (o AcceptOAuth2ConsentRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *AcceptOAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { +func (o *AcceptOAuth2ConsentRequest) UnmarshalJSON(data []byte) (err error) { varAcceptOAuth2ConsentRequest := _AcceptOAuth2ConsentRequest{} - err = json.Unmarshal(bytes, &varAcceptOAuth2ConsentRequest) + err = json.Unmarshal(data, &varAcceptOAuth2ConsentRequest) if err != nil { return err @@ -329,7 +329,7 @@ func (o *AcceptOAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "context") delete(additionalProperties, "grant_access_token_audience") delete(additionalProperties, "grant_scope") diff --git a/clients/hydra/go/model_accept_o_auth2_consent_request_session.go b/clients/hydra/go/model_accept_o_auth2_consent_request_session.go index 44edfacc746..4142119fe51 100644 --- a/clients/hydra/go/model_accept_o_auth2_consent_request_session.go +++ b/clients/hydra/go/model_accept_o_auth2_consent_request_session.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -67,7 +67,7 @@ func (o *AcceptOAuth2ConsentRequestSession) GetAccessTokenOk() (*interface{}, bo // HasAccessToken returns a boolean if a field has been set. func (o *AcceptOAuth2ConsentRequestSession) HasAccessToken() bool { - if o != nil && IsNil(o.AccessToken) { + if o != nil && !IsNil(o.AccessToken) { return true } @@ -100,7 +100,7 @@ func (o *AcceptOAuth2ConsentRequestSession) GetIdTokenOk() (*interface{}, bool) // HasIdToken returns a boolean if a field has been set. func (o *AcceptOAuth2ConsentRequestSession) HasIdToken() bool { - if o != nil && IsNil(o.IdToken) { + if o != nil && !IsNil(o.IdToken) { return true } @@ -136,10 +136,10 @@ func (o AcceptOAuth2ConsentRequestSession) ToMap() (map[string]interface{}, erro return toSerialize, nil } -func (o *AcceptOAuth2ConsentRequestSession) UnmarshalJSON(bytes []byte) (err error) { +func (o *AcceptOAuth2ConsentRequestSession) UnmarshalJSON(data []byte) (err error) { varAcceptOAuth2ConsentRequestSession := _AcceptOAuth2ConsentRequestSession{} - err = json.Unmarshal(bytes, &varAcceptOAuth2ConsentRequestSession) + err = json.Unmarshal(data, &varAcceptOAuth2ConsentRequestSession) if err != nil { return err @@ -149,7 +149,7 @@ func (o *AcceptOAuth2ConsentRequestSession) UnmarshalJSON(bytes []byte) (err err additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access_token") delete(additionalProperties, "id_token") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_accept_o_auth2_login_request.go b/clients/hydra/go/model_accept_o_auth2_login_request.go index c5c8c0afa4f..0fb95a8436c 100644 --- a/clients/hydra/go/model_accept_o_auth2_login_request.go +++ b/clients/hydra/go/model_accept_o_auth2_login_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -145,7 +145,7 @@ func (o *AcceptOAuth2LoginRequest) GetContextOk() (*interface{}, bool) { // HasContext returns a boolean if a field has been set. func (o *AcceptOAuth2LoginRequest) HasContext() bool { - if o != nil && IsNil(o.Context) { + if o != nil && !IsNil(o.Context) { return true } @@ -384,8 +384,8 @@ func (o AcceptOAuth2LoginRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *AcceptOAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *AcceptOAuth2LoginRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -394,7 +394,7 @@ func (o *AcceptOAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -408,7 +408,7 @@ func (o *AcceptOAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { varAcceptOAuth2LoginRequest := _AcceptOAuth2LoginRequest{} - err = json.Unmarshal(bytes, &varAcceptOAuth2LoginRequest) + err = json.Unmarshal(data, &varAcceptOAuth2LoginRequest) if err != nil { return err @@ -418,7 +418,7 @@ func (o *AcceptOAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acr") delete(additionalProperties, "amr") delete(additionalProperties, "context") diff --git a/clients/hydra/go/model_create_json_web_key_set.go b/clients/hydra/go/model_create_json_web_key_set.go index b00c1212c41..5f6b2f8dd6e 100644 --- a/clients/hydra/go/model_create_json_web_key_set.go +++ b/clients/hydra/go/model_create_json_web_key_set.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -145,8 +145,8 @@ func (o CreateJsonWebKeySet) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *CreateJsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *CreateJsonWebKeySet) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -157,7 +157,7 @@ func (o *CreateJsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -171,7 +171,7 @@ func (o *CreateJsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { varCreateJsonWebKeySet := _CreateJsonWebKeySet{} - err = json.Unmarshal(bytes, &varCreateJsonWebKeySet) + err = json.Unmarshal(data, &varCreateJsonWebKeySet) if err != nil { return err @@ -181,7 +181,7 @@ func (o *CreateJsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "alg") delete(additionalProperties, "kid") delete(additionalProperties, "use") diff --git a/clients/hydra/go/model_create_verifiable_credential_request_body.go b/clients/hydra/go/model_create_verifiable_credential_request_body.go index 73ddd50dad7..17cd724f71f 100644 --- a/clients/hydra/go/model_create_verifiable_credential_request_body.go +++ b/clients/hydra/go/model_create_verifiable_credential_request_body.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -168,10 +168,10 @@ func (o CreateVerifiableCredentialRequestBody) ToMap() (map[string]interface{}, return toSerialize, nil } -func (o *CreateVerifiableCredentialRequestBody) UnmarshalJSON(bytes []byte) (err error) { +func (o *CreateVerifiableCredentialRequestBody) UnmarshalJSON(data []byte) (err error) { varCreateVerifiableCredentialRequestBody := _CreateVerifiableCredentialRequestBody{} - err = json.Unmarshal(bytes, &varCreateVerifiableCredentialRequestBody) + err = json.Unmarshal(data, &varCreateVerifiableCredentialRequestBody) if err != nil { return err @@ -181,7 +181,7 @@ func (o *CreateVerifiableCredentialRequestBody) UnmarshalJSON(bytes []byte) (err additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "format") delete(additionalProperties, "proof") delete(additionalProperties, "types") diff --git a/clients/hydra/go/model_credential_supported_draft00.go b/clients/hydra/go/model_credential_supported_draft00.go index c3fdf9a01eb..cbf5de6f858 100644 --- a/clients/hydra/go/model_credential_supported_draft00.go +++ b/clients/hydra/go/model_credential_supported_draft00.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -208,10 +208,10 @@ func (o CredentialSupportedDraft00) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *CredentialSupportedDraft00) UnmarshalJSON(bytes []byte) (err error) { +func (o *CredentialSupportedDraft00) UnmarshalJSON(data []byte) (err error) { varCredentialSupportedDraft00 := _CredentialSupportedDraft00{} - err = json.Unmarshal(bytes, &varCredentialSupportedDraft00) + err = json.Unmarshal(data, &varCredentialSupportedDraft00) if err != nil { return err @@ -221,7 +221,7 @@ func (o *CredentialSupportedDraft00) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "cryptographic_binding_methods_supported") delete(additionalProperties, "cryptographic_suites_supported") delete(additionalProperties, "format") diff --git a/clients/hydra/go/model_error_o_auth2.go b/clients/hydra/go/model_error_o_auth2.go index 69bc0e6284d..a65f7fdb5d3 100644 --- a/clients/hydra/go/model_error_o_auth2.go +++ b/clients/hydra/go/model_error_o_auth2.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -245,10 +245,10 @@ func (o ErrorOAuth2) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *ErrorOAuth2) UnmarshalJSON(bytes []byte) (err error) { +func (o *ErrorOAuth2) UnmarshalJSON(data []byte) (err error) { varErrorOAuth2 := _ErrorOAuth2{} - err = json.Unmarshal(bytes, &varErrorOAuth2) + err = json.Unmarshal(data, &varErrorOAuth2) if err != nil { return err @@ -258,7 +258,7 @@ func (o *ErrorOAuth2) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "error") delete(additionalProperties, "error_debug") delete(additionalProperties, "error_description") diff --git a/clients/hydra/go/model_generic_error.go b/clients/hydra/go/model_generic_error.go index c68fb773d5a..676f3a751eb 100644 --- a/clients/hydra/go/model_generic_error.go +++ b/clients/hydra/go/model_generic_error.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -145,7 +145,7 @@ func (o *GenericError) GetDetailsOk() (*interface{}, bool) { // HasDetails returns a boolean if a field has been set. func (o *GenericError) HasDetails() bool { - if o != nil && IsNil(o.Details) { + if o != nil && !IsNil(o.Details) { return true } @@ -349,8 +349,8 @@ func (o GenericError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *GenericError) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *GenericError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -359,7 +359,7 @@ func (o *GenericError) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -373,7 +373,7 @@ func (o *GenericError) UnmarshalJSON(bytes []byte) (err error) { varGenericError := _GenericError{} - err = json.Unmarshal(bytes, &varGenericError) + err = json.Unmarshal(data, &varGenericError) if err != nil { return err @@ -383,7 +383,7 @@ func (o *GenericError) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "code") delete(additionalProperties, "debug") delete(additionalProperties, "details") diff --git a/clients/hydra/go/model_get_version_200_response.go b/clients/hydra/go/model_get_version_200_response.go index 3fa0f06e628..1139f837d29 100644 --- a/clients/hydra/go/model_get_version_200_response.go +++ b/clients/hydra/go/model_get_version_200_response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o GetVersion200Response) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *GetVersion200Response) UnmarshalJSON(bytes []byte) (err error) { +func (o *GetVersion200Response) UnmarshalJSON(data []byte) (err error) { varGetVersion200Response := _GetVersion200Response{} - err = json.Unmarshal(bytes, &varGetVersion200Response) + err = json.Unmarshal(data, &varGetVersion200Response) if err != nil { return err @@ -110,7 +110,7 @@ func (o *GetVersion200Response) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "version") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_health_not_ready_status.go b/clients/hydra/go/model_health_not_ready_status.go index f55c924a287..35f8fdb4221 100644 --- a/clients/hydra/go/model_health_not_ready_status.go +++ b/clients/hydra/go/model_health_not_ready_status.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o HealthNotReadyStatus) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *HealthNotReadyStatus) UnmarshalJSON(bytes []byte) (err error) { +func (o *HealthNotReadyStatus) UnmarshalJSON(data []byte) (err error) { varHealthNotReadyStatus := _HealthNotReadyStatus{} - err = json.Unmarshal(bytes, &varHealthNotReadyStatus) + err = json.Unmarshal(data, &varHealthNotReadyStatus) if err != nil { return err @@ -110,7 +110,7 @@ func (o *HealthNotReadyStatus) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "errors") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_health_status.go b/clients/hydra/go/model_health_status.go index 0a1214a95c2..abff65aae1c 100644 --- a/clients/hydra/go/model_health_status.go +++ b/clients/hydra/go/model_health_status.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o HealthStatus) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *HealthStatus) UnmarshalJSON(bytes []byte) (err error) { +func (o *HealthStatus) UnmarshalJSON(data []byte) (err error) { varHealthStatus := _HealthStatus{} - err = json.Unmarshal(bytes, &varHealthStatus) + err = json.Unmarshal(data, &varHealthStatus) if err != nil { return err @@ -110,7 +110,7 @@ func (o *HealthStatus) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "status") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_introspected_o_auth2_token.go b/clients/hydra/go/model_introspected_o_auth2_token.go index 78b2619fdef..f9af5076747 100644 --- a/clients/hydra/go/model_introspected_o_auth2_token.go +++ b/clients/hydra/go/model_introspected_o_auth2_token.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -570,8 +570,8 @@ func (o IntrospectedOAuth2Token) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *IntrospectedOAuth2Token) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *IntrospectedOAuth2Token) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -580,7 +580,7 @@ func (o *IntrospectedOAuth2Token) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -594,7 +594,7 @@ func (o *IntrospectedOAuth2Token) UnmarshalJSON(bytes []byte) (err error) { varIntrospectedOAuth2Token := _IntrospectedOAuth2Token{} - err = json.Unmarshal(bytes, &varIntrospectedOAuth2Token) + err = json.Unmarshal(data, &varIntrospectedOAuth2Token) if err != nil { return err @@ -604,7 +604,7 @@ func (o *IntrospectedOAuth2Token) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "active") delete(additionalProperties, "aud") delete(additionalProperties, "client_id") diff --git a/clients/hydra/go/model_is_ready_200_response.go b/clients/hydra/go/model_is_ready_200_response.go index ad20880b164..797bffcf719 100644 --- a/clients/hydra/go/model_is_ready_200_response.go +++ b/clients/hydra/go/model_is_ready_200_response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o IsReady200Response) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *IsReady200Response) UnmarshalJSON(bytes []byte) (err error) { +func (o *IsReady200Response) UnmarshalJSON(data []byte) (err error) { varIsReady200Response := _IsReady200Response{} - err = json.Unmarshal(bytes, &varIsReady200Response) + err = json.Unmarshal(data, &varIsReady200Response) if err != nil { return err @@ -110,7 +110,7 @@ func (o *IsReady200Response) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "status") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_is_ready_503_response.go b/clients/hydra/go/model_is_ready_503_response.go index 47f00c90501..0801a12466b 100644 --- a/clients/hydra/go/model_is_ready_503_response.go +++ b/clients/hydra/go/model_is_ready_503_response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o IsReady503Response) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *IsReady503Response) UnmarshalJSON(bytes []byte) (err error) { +func (o *IsReady503Response) UnmarshalJSON(data []byte) (err error) { varIsReady503Response := _IsReady503Response{} - err = json.Unmarshal(bytes, &varIsReady503Response) + err = json.Unmarshal(data, &varIsReady503Response) if err != nil { return err @@ -110,7 +110,7 @@ func (o *IsReady503Response) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "errors") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_json_patch.go b/clients/hydra/go/model_json_patch.go index 62137a9f639..09352316bdd 100644 --- a/clients/hydra/go/model_json_patch.go +++ b/clients/hydra/go/model_json_patch.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -154,7 +154,7 @@ func (o *JsonPatch) GetValueOk() (*interface{}, bool) { // HasValue returns a boolean if a field has been set. func (o *JsonPatch) HasValue() bool { - if o != nil && IsNil(o.Value) { + if o != nil && !IsNil(o.Value) { return true } @@ -192,8 +192,8 @@ func (o JsonPatch) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *JsonPatch) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *JsonPatch) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -203,7 +203,7 @@ func (o *JsonPatch) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -217,7 +217,7 @@ func (o *JsonPatch) UnmarshalJSON(bytes []byte) (err error) { varJsonPatch := _JsonPatch{} - err = json.Unmarshal(bytes, &varJsonPatch) + err = json.Unmarshal(data, &varJsonPatch) if err != nil { return err @@ -227,7 +227,7 @@ func (o *JsonPatch) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "from") delete(additionalProperties, "op") delete(additionalProperties, "path") diff --git a/clients/hydra/go/model_json_web_key.go b/clients/hydra/go/model_json_web_key.go index 57eb85ce939..4f7ec2b4d14 100644 --- a/clients/hydra/go/model_json_web_key.go +++ b/clients/hydra/go/model_json_web_key.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -642,8 +642,8 @@ func (o JsonWebKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *JsonWebKey) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *JsonWebKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -655,7 +655,7 @@ func (o *JsonWebKey) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -669,7 +669,7 @@ func (o *JsonWebKey) UnmarshalJSON(bytes []byte) (err error) { varJsonWebKey := _JsonWebKey{} - err = json.Unmarshal(bytes, &varJsonWebKey) + err = json.Unmarshal(data, &varJsonWebKey) if err != nil { return err @@ -679,7 +679,7 @@ func (o *JsonWebKey) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "alg") delete(additionalProperties, "crv") delete(additionalProperties, "d") diff --git a/clients/hydra/go/model_json_web_key_set.go b/clients/hydra/go/model_json_web_key_set.go index 2be708c067f..d7573504605 100644 --- a/clients/hydra/go/model_json_web_key_set.go +++ b/clients/hydra/go/model_json_web_key_set.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o JsonWebKeySet) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *JsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { +func (o *JsonWebKeySet) UnmarshalJSON(data []byte) (err error) { varJsonWebKeySet := _JsonWebKeySet{} - err = json.Unmarshal(bytes, &varJsonWebKeySet) + err = json.Unmarshal(data, &varJsonWebKeySet) if err != nil { return err @@ -110,7 +110,7 @@ func (o *JsonWebKeySet) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "keys") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_o_auth2_client.go b/clients/hydra/go/model_o_auth2_client.go index c17e2ce851a..0d1c443f4cd 100644 --- a/clients/hydra/go/model_o_auth2_client.go +++ b/clients/hydra/go/model_o_auth2_client.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -827,7 +827,7 @@ func (o *OAuth2Client) GetJwksOk() (*interface{}, bool) { // HasJwks returns a boolean if a field has been set. func (o *OAuth2Client) HasJwks() bool { - if o != nil && IsNil(o.Jwks) { + if o != nil && !IsNil(o.Jwks) { return true } @@ -956,7 +956,7 @@ func (o *OAuth2Client) GetMetadataOk() (*interface{}, bool) { // HasMetadata returns a boolean if a field has been set. func (o *OAuth2Client) HasMetadata() bool { - if o != nil && IsNil(o.Metadata) { + if o != nil && !IsNil(o.Metadata) { return true } @@ -1834,10 +1834,10 @@ func (o OAuth2Client) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2Client) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2Client) UnmarshalJSON(data []byte) (err error) { varOAuth2Client := _OAuth2Client{} - err = json.Unmarshal(bytes, &varOAuth2Client) + err = json.Unmarshal(data, &varOAuth2Client) if err != nil { return err @@ -1847,7 +1847,7 @@ func (o *OAuth2Client) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access_token_strategy") delete(additionalProperties, "allowed_cors_origins") delete(additionalProperties, "audience") diff --git a/clients/hydra/go/model_o_auth2_client_token_lifespans.go b/clients/hydra/go/model_o_auth2_client_token_lifespans.go index 93d509f8aea..6c5787cda45 100644 --- a/clients/hydra/go/model_o_auth2_client_token_lifespans.go +++ b/clients/hydra/go/model_o_auth2_client_token_lifespans.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -430,10 +430,10 @@ func (o OAuth2ClientTokenLifespans) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2ClientTokenLifespans) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2ClientTokenLifespans) UnmarshalJSON(data []byte) (err error) { varOAuth2ClientTokenLifespans := _OAuth2ClientTokenLifespans{} - err = json.Unmarshal(bytes, &varOAuth2ClientTokenLifespans) + err = json.Unmarshal(data, &varOAuth2ClientTokenLifespans) if err != nil { return err @@ -443,7 +443,7 @@ func (o *OAuth2ClientTokenLifespans) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "authorization_code_grant_access_token_lifespan") delete(additionalProperties, "authorization_code_grant_id_token_lifespan") delete(additionalProperties, "authorization_code_grant_refresh_token_lifespan") diff --git a/clients/hydra/go/model_o_auth2_consent_request.go b/clients/hydra/go/model_o_auth2_consent_request.go index 30b79f99592..262680858a8 100644 --- a/clients/hydra/go/model_o_auth2_consent_request.go +++ b/clients/hydra/go/model_o_auth2_consent_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -205,7 +205,7 @@ func (o *OAuth2ConsentRequest) GetContextOk() (*interface{}, bool) { // HasContext returns a boolean if a field has been set. func (o *OAuth2ConsentRequest) HasContext() bool { - if o != nil && IsNil(o.Context) { + if o != nil && !IsNil(o.Context) { return true } @@ -528,8 +528,8 @@ func (o OAuth2ConsentRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *OAuth2ConsentRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -538,7 +538,7 @@ func (o *OAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -552,7 +552,7 @@ func (o *OAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { varOAuth2ConsentRequest := _OAuth2ConsentRequest{} - err = json.Unmarshal(bytes, &varOAuth2ConsentRequest) + err = json.Unmarshal(data, &varOAuth2ConsentRequest) if err != nil { return err @@ -562,7 +562,7 @@ func (o *OAuth2ConsentRequest) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acr") delete(additionalProperties, "amr") delete(additionalProperties, "challenge") diff --git a/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go b/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go index f8e271827a2..8e585e37cc5 100644 --- a/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go +++ b/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -245,10 +245,10 @@ func (o OAuth2ConsentRequestOpenIDConnectContext) ToMap() (map[string]interface{ return toSerialize, nil } -func (o *OAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(data []byte) (err error) { varOAuth2ConsentRequestOpenIDConnectContext := _OAuth2ConsentRequestOpenIDConnectContext{} - err = json.Unmarshal(bytes, &varOAuth2ConsentRequestOpenIDConnectContext) + err = json.Unmarshal(data, &varOAuth2ConsentRequestOpenIDConnectContext) if err != nil { return err @@ -258,7 +258,7 @@ func (o *OAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(bytes []byte) ( additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "acr_values") delete(additionalProperties, "display") delete(additionalProperties, "id_token_hint_claims") diff --git a/clients/hydra/go/model_o_auth2_consent_session.go b/clients/hydra/go/model_o_auth2_consent_session.go index 685d6c4f642..6e830bca522 100644 --- a/clients/hydra/go/model_o_auth2_consent_session.go +++ b/clients/hydra/go/model_o_auth2_consent_session.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -107,7 +107,7 @@ func (o *OAuth2ConsentSession) GetContextOk() (*interface{}, bool) { // HasContext returns a boolean if a field has been set. func (o *OAuth2ConsentSession) HasContext() bool { - if o != nil && IsNil(o.Context) { + if o != nil && !IsNil(o.Context) { return true } @@ -388,10 +388,10 @@ func (o OAuth2ConsentSession) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2ConsentSession) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2ConsentSession) UnmarshalJSON(data []byte) (err error) { varOAuth2ConsentSession := _OAuth2ConsentSession{} - err = json.Unmarshal(bytes, &varOAuth2ConsentSession) + err = json.Unmarshal(data, &varOAuth2ConsentSession) if err != nil { return err @@ -401,7 +401,7 @@ func (o *OAuth2ConsentSession) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "consent_request") delete(additionalProperties, "context") delete(additionalProperties, "expires_at") diff --git a/clients/hydra/go/model_o_auth2_consent_session_expires_at.go b/clients/hydra/go/model_o_auth2_consent_session_expires_at.go index d9969a63ca0..3583e5802bf 100644 --- a/clients/hydra/go/model_o_auth2_consent_session_expires_at.go +++ b/clients/hydra/go/model_o_auth2_consent_session_expires_at.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -241,10 +241,10 @@ func (o OAuth2ConsentSessionExpiresAt) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2ConsentSessionExpiresAt) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2ConsentSessionExpiresAt) UnmarshalJSON(data []byte) (err error) { varOAuth2ConsentSessionExpiresAt := _OAuth2ConsentSessionExpiresAt{} - err = json.Unmarshal(bytes, &varOAuth2ConsentSessionExpiresAt) + err = json.Unmarshal(data, &varOAuth2ConsentSessionExpiresAt) if err != nil { return err @@ -254,7 +254,7 @@ func (o *OAuth2ConsentSessionExpiresAt) UnmarshalJSON(bytes []byte) (err error) additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access_token") delete(additionalProperties, "authorize_code") delete(additionalProperties, "id_token") diff --git a/clients/hydra/go/model_o_auth2_login_request.go b/clients/hydra/go/model_o_auth2_login_request.go index 2842ec66a3b..22f465e1cb1 100644 --- a/clients/hydra/go/model_o_auth2_login_request.go +++ b/clients/hydra/go/model_o_auth2_login_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -345,8 +345,8 @@ func (o OAuth2LoginRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *OAuth2LoginRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -359,7 +359,7 @@ func (o *OAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -373,7 +373,7 @@ func (o *OAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { varOAuth2LoginRequest := _OAuth2LoginRequest{} - err = json.Unmarshal(bytes, &varOAuth2LoginRequest) + err = json.Unmarshal(data, &varOAuth2LoginRequest) if err != nil { return err @@ -383,7 +383,7 @@ func (o *OAuth2LoginRequest) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "challenge") delete(additionalProperties, "client") delete(additionalProperties, "oidc_context") diff --git a/clients/hydra/go/model_o_auth2_logout_request.go b/clients/hydra/go/model_o_auth2_logout_request.go index 468de71ef7c..32e699ef69d 100644 --- a/clients/hydra/go/model_o_auth2_logout_request.go +++ b/clients/hydra/go/model_o_auth2_logout_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -281,10 +281,10 @@ func (o OAuth2LogoutRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2LogoutRequest) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2LogoutRequest) UnmarshalJSON(data []byte) (err error) { varOAuth2LogoutRequest := _OAuth2LogoutRequest{} - err = json.Unmarshal(bytes, &varOAuth2LogoutRequest) + err = json.Unmarshal(data, &varOAuth2LogoutRequest) if err != nil { return err @@ -294,7 +294,7 @@ func (o *OAuth2LogoutRequest) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "challenge") delete(additionalProperties, "client") delete(additionalProperties, "request_url") diff --git a/clients/hydra/go/model_o_auth2_redirect_to.go b/clients/hydra/go/model_o_auth2_redirect_to.go index c41d34b7e29..5e5099782ee 100644 --- a/clients/hydra/go/model_o_auth2_redirect_to.go +++ b/clients/hydra/go/model_o_auth2_redirect_to.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -89,8 +89,8 @@ func (o OAuth2RedirectTo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2RedirectTo) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *OAuth2RedirectTo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -99,7 +99,7 @@ func (o *OAuth2RedirectTo) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -113,7 +113,7 @@ func (o *OAuth2RedirectTo) UnmarshalJSON(bytes []byte) (err error) { varOAuth2RedirectTo := _OAuth2RedirectTo{} - err = json.Unmarshal(bytes, &varOAuth2RedirectTo) + err = json.Unmarshal(data, &varOAuth2RedirectTo) if err != nil { return err @@ -123,7 +123,7 @@ func (o *OAuth2RedirectTo) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "redirect_to") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/model_o_auth2_token_exchange.go b/clients/hydra/go/model_o_auth2_token_exchange.go index ecc41304adb..70c77190a23 100644 --- a/clients/hydra/go/model_o_auth2_token_exchange.go +++ b/clients/hydra/go/model_o_auth2_token_exchange.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -282,10 +282,10 @@ func (o OAuth2TokenExchange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OAuth2TokenExchange) UnmarshalJSON(bytes []byte) (err error) { +func (o *OAuth2TokenExchange) UnmarshalJSON(data []byte) (err error) { varOAuth2TokenExchange := _OAuth2TokenExchange{} - err = json.Unmarshal(bytes, &varOAuth2TokenExchange) + err = json.Unmarshal(data, &varOAuth2TokenExchange) if err != nil { return err @@ -295,7 +295,7 @@ func (o *OAuth2TokenExchange) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "access_token") delete(additionalProperties, "expires_in") delete(additionalProperties, "id_token") diff --git a/clients/hydra/go/model_oidc_configuration.go b/clients/hydra/go/model_oidc_configuration.go index 8fbe534e339..f1ee7de2b7b 100644 --- a/clients/hydra/go/model_oidc_configuration.go +++ b/clients/hydra/go/model_oidc_configuration.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -1127,8 +1127,8 @@ func (o OidcConfiguration) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OidcConfiguration) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *OidcConfiguration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -1145,7 +1145,7 @@ func (o *OidcConfiguration) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -1159,7 +1159,7 @@ func (o *OidcConfiguration) UnmarshalJSON(bytes []byte) (err error) { varOidcConfiguration := _OidcConfiguration{} - err = json.Unmarshal(bytes, &varOidcConfiguration) + err = json.Unmarshal(data, &varOidcConfiguration) if err != nil { return err @@ -1169,7 +1169,7 @@ func (o *OidcConfiguration) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "authorization_endpoint") delete(additionalProperties, "backchannel_logout_session_supported") delete(additionalProperties, "backchannel_logout_supported") diff --git a/clients/hydra/go/model_oidc_user_info.go b/clients/hydra/go/model_oidc_user_info.go index 771848818a1..d6ae68134a2 100644 --- a/clients/hydra/go/model_oidc_user_info.go +++ b/clients/hydra/go/model_oidc_user_info.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -763,10 +763,10 @@ func (o OidcUserInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *OidcUserInfo) UnmarshalJSON(bytes []byte) (err error) { +func (o *OidcUserInfo) UnmarshalJSON(data []byte) (err error) { varOidcUserInfo := _OidcUserInfo{} - err = json.Unmarshal(bytes, &varOidcUserInfo) + err = json.Unmarshal(data, &varOidcUserInfo) if err != nil { return err @@ -776,7 +776,7 @@ func (o *OidcUserInfo) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "birthdate") delete(additionalProperties, "email") delete(additionalProperties, "email_verified") diff --git a/clients/hydra/go/model_pagination.go b/clients/hydra/go/model_pagination.go index ab2274176fc..1c8d466ff19 100644 --- a/clients/hydra/go/model_pagination.go +++ b/clients/hydra/go/model_pagination.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -142,10 +142,10 @@ func (o Pagination) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *Pagination) UnmarshalJSON(bytes []byte) (err error) { +func (o *Pagination) UnmarshalJSON(data []byte) (err error) { varPagination := _Pagination{} - err = json.Unmarshal(bytes, &varPagination) + err = json.Unmarshal(data, &varPagination) if err != nil { return err @@ -155,7 +155,7 @@ func (o *Pagination) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "page_size") delete(additionalProperties, "page_token") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_pagination_headers.go b/clients/hydra/go/model_pagination_headers.go index 1778d7a8747..4f036fa23e9 100644 --- a/clients/hydra/go/model_pagination_headers.go +++ b/clients/hydra/go/model_pagination_headers.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -134,10 +134,10 @@ func (o PaginationHeaders) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *PaginationHeaders) UnmarshalJSON(bytes []byte) (err error) { +func (o *PaginationHeaders) UnmarshalJSON(data []byte) (err error) { varPaginationHeaders := _PaginationHeaders{} - err = json.Unmarshal(bytes, &varPaginationHeaders) + err = json.Unmarshal(data, &varPaginationHeaders) if err != nil { return err @@ -147,7 +147,7 @@ func (o *PaginationHeaders) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "link") delete(additionalProperties, "x-total-count") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_reject_o_auth2_request.go b/clients/hydra/go/model_reject_o_auth2_request.go index 719d157d11b..d90616f9f2c 100644 --- a/clients/hydra/go/model_reject_o_auth2_request.go +++ b/clients/hydra/go/model_reject_o_auth2_request.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -245,10 +245,10 @@ func (o RejectOAuth2Request) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *RejectOAuth2Request) UnmarshalJSON(bytes []byte) (err error) { +func (o *RejectOAuth2Request) UnmarshalJSON(data []byte) (err error) { varRejectOAuth2Request := _RejectOAuth2Request{} - err = json.Unmarshal(bytes, &varRejectOAuth2Request) + err = json.Unmarshal(data, &varRejectOAuth2Request) if err != nil { return err @@ -258,7 +258,7 @@ func (o *RejectOAuth2Request) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "error") delete(additionalProperties, "error_debug") delete(additionalProperties, "error_description") diff --git a/clients/hydra/go/model_rfc6749_error_json.go b/clients/hydra/go/model_rfc6749_error_json.go index 96b74f4232c..bac947f65c0 100644 --- a/clients/hydra/go/model_rfc6749_error_json.go +++ b/clients/hydra/go/model_rfc6749_error_json.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -240,10 +240,10 @@ func (o RFC6749ErrorJson) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *RFC6749ErrorJson) UnmarshalJSON(bytes []byte) (err error) { +func (o *RFC6749ErrorJson) UnmarshalJSON(data []byte) (err error) { varRFC6749ErrorJson := _RFC6749ErrorJson{} - err = json.Unmarshal(bytes, &varRFC6749ErrorJson) + err = json.Unmarshal(data, &varRFC6749ErrorJson) if err != nil { return err @@ -253,7 +253,7 @@ func (o *RFC6749ErrorJson) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "error") delete(additionalProperties, "error_debug") delete(additionalProperties, "error_description") diff --git a/clients/hydra/go/model_token_pagination.go b/clients/hydra/go/model_token_pagination.go index b9af1a270a5..7468ed928dc 100644 --- a/clients/hydra/go/model_token_pagination.go +++ b/clients/hydra/go/model_token_pagination.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -142,10 +142,10 @@ func (o TokenPagination) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *TokenPagination) UnmarshalJSON(bytes []byte) (err error) { +func (o *TokenPagination) UnmarshalJSON(data []byte) (err error) { varTokenPagination := _TokenPagination{} - err = json.Unmarshal(bytes, &varTokenPagination) + err = json.Unmarshal(data, &varTokenPagination) if err != nil { return err @@ -155,7 +155,7 @@ func (o *TokenPagination) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "page_size") delete(additionalProperties, "page_token") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_token_pagination_headers.go b/clients/hydra/go/model_token_pagination_headers.go index cb35090bbe9..5d17dc75e36 100644 --- a/clients/hydra/go/model_token_pagination_headers.go +++ b/clients/hydra/go/model_token_pagination_headers.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -134,10 +134,10 @@ func (o TokenPaginationHeaders) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *TokenPaginationHeaders) UnmarshalJSON(bytes []byte) (err error) { +func (o *TokenPaginationHeaders) UnmarshalJSON(data []byte) (err error) { varTokenPaginationHeaders := _TokenPaginationHeaders{} - err = json.Unmarshal(bytes, &varTokenPaginationHeaders) + err = json.Unmarshal(data, &varTokenPaginationHeaders) if err != nil { return err @@ -147,7 +147,7 @@ func (o *TokenPaginationHeaders) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "link") delete(additionalProperties, "x-total-count") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_token_pagination_request_parameters.go b/clients/hydra/go/model_token_pagination_request_parameters.go index 801d8ab390e..8905fbff9cb 100644 --- a/clients/hydra/go/model_token_pagination_request_parameters.go +++ b/clients/hydra/go/model_token_pagination_request_parameters.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -142,10 +142,10 @@ func (o TokenPaginationRequestParameters) ToMap() (map[string]interface{}, error return toSerialize, nil } -func (o *TokenPaginationRequestParameters) UnmarshalJSON(bytes []byte) (err error) { +func (o *TokenPaginationRequestParameters) UnmarshalJSON(data []byte) (err error) { varTokenPaginationRequestParameters := _TokenPaginationRequestParameters{} - err = json.Unmarshal(bytes, &varTokenPaginationRequestParameters) + err = json.Unmarshal(data, &varTokenPaginationRequestParameters) if err != nil { return err @@ -155,7 +155,7 @@ func (o *TokenPaginationRequestParameters) UnmarshalJSON(bytes []byte) (err erro additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "page_size") delete(additionalProperties, "page_token") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_token_pagination_response_headers.go b/clients/hydra/go/model_token_pagination_response_headers.go index a619a0b27d5..51248b86ea7 100644 --- a/clients/hydra/go/model_token_pagination_response_headers.go +++ b/clients/hydra/go/model_token_pagination_response_headers.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -134,10 +134,10 @@ func (o TokenPaginationResponseHeaders) ToMap() (map[string]interface{}, error) return toSerialize, nil } -func (o *TokenPaginationResponseHeaders) UnmarshalJSON(bytes []byte) (err error) { +func (o *TokenPaginationResponseHeaders) UnmarshalJSON(data []byte) (err error) { varTokenPaginationResponseHeaders := _TokenPaginationResponseHeaders{} - err = json.Unmarshal(bytes, &varTokenPaginationResponseHeaders) + err = json.Unmarshal(data, &varTokenPaginationResponseHeaders) if err != nil { return err @@ -147,7 +147,7 @@ func (o *TokenPaginationResponseHeaders) UnmarshalJSON(bytes []byte) (err error) additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "link") delete(additionalProperties, "x-total-count") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go b/clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go index 9038213c84e..fb21a0be1b7 100644 --- a/clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go +++ b/clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -247,8 +247,8 @@ func (o TrustOAuth2JwtGrantIssuer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *TrustOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { - // This validates that all required properties are included in the JSON object +func (o *TrustOAuth2JwtGrantIssuer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ @@ -260,7 +260,7 @@ func (o *TrustOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { allProperties := make(map[string]interface{}) - err = json.Unmarshal(bytes, &allProperties) + err = json.Unmarshal(data, &allProperties) if err != nil { return err; @@ -274,7 +274,7 @@ func (o *TrustOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { varTrustOAuth2JwtGrantIssuer := _TrustOAuth2JwtGrantIssuer{} - err = json.Unmarshal(bytes, &varTrustOAuth2JwtGrantIssuer) + err = json.Unmarshal(data, &varTrustOAuth2JwtGrantIssuer) if err != nil { return err @@ -284,7 +284,7 @@ func (o *TrustOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allow_any_subject") delete(additionalProperties, "expires_at") delete(additionalProperties, "issuer") diff --git a/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go index e0f515bd869..dc2a31e883d 100644 --- a/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go +++ b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -355,10 +355,10 @@ func (o TrustedOAuth2JwtGrantIssuer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *TrustedOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { +func (o *TrustedOAuth2JwtGrantIssuer) UnmarshalJSON(data []byte) (err error) { varTrustedOAuth2JwtGrantIssuer := _TrustedOAuth2JwtGrantIssuer{} - err = json.Unmarshal(bytes, &varTrustedOAuth2JwtGrantIssuer) + err = json.Unmarshal(data, &varTrustedOAuth2JwtGrantIssuer) if err != nil { return err @@ -368,7 +368,7 @@ func (o *TrustedOAuth2JwtGrantIssuer) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "allow_any_subject") delete(additionalProperties, "created_at") delete(additionalProperties, "expires_at") diff --git a/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go index f56805d9840..208079c3dfb 100644 --- a/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go +++ b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -134,10 +134,10 @@ func (o TrustedOAuth2JwtGrantJsonWebKey) ToMap() (map[string]interface{}, error) return toSerialize, nil } -func (o *TrustedOAuth2JwtGrantJsonWebKey) UnmarshalJSON(bytes []byte) (err error) { +func (o *TrustedOAuth2JwtGrantJsonWebKey) UnmarshalJSON(data []byte) (err error) { varTrustedOAuth2JwtGrantJsonWebKey := _TrustedOAuth2JwtGrantJsonWebKey{} - err = json.Unmarshal(bytes, &varTrustedOAuth2JwtGrantJsonWebKey) + err = json.Unmarshal(data, &varTrustedOAuth2JwtGrantJsonWebKey) if err != nil { return err @@ -147,7 +147,7 @@ func (o *TrustedOAuth2JwtGrantJsonWebKey) UnmarshalJSON(bytes []byte) (err error additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "kid") delete(additionalProperties, "set") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_verifiable_credential_priming_response.go b/clients/hydra/go/model_verifiable_credential_priming_response.go index 8e8f6fadeb0..f6c72e3ab80 100644 --- a/clients/hydra/go/model_verifiable_credential_priming_response.go +++ b/clients/hydra/go/model_verifiable_credential_priming_response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -348,10 +348,10 @@ func (o VerifiableCredentialPrimingResponse) ToMap() (map[string]interface{}, er return toSerialize, nil } -func (o *VerifiableCredentialPrimingResponse) UnmarshalJSON(bytes []byte) (err error) { +func (o *VerifiableCredentialPrimingResponse) UnmarshalJSON(data []byte) (err error) { varVerifiableCredentialPrimingResponse := _VerifiableCredentialPrimingResponse{} - err = json.Unmarshal(bytes, &varVerifiableCredentialPrimingResponse) + err = json.Unmarshal(data, &varVerifiableCredentialPrimingResponse) if err != nil { return err @@ -361,7 +361,7 @@ func (o *VerifiableCredentialPrimingResponse) UnmarshalJSON(bytes []byte) (err e additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "c_nonce") delete(additionalProperties, "c_nonce_expires_in") delete(additionalProperties, "error") diff --git a/clients/hydra/go/model_verifiable_credential_proof.go b/clients/hydra/go/model_verifiable_credential_proof.go index b17bca8da10..1267c8f8d44 100644 --- a/clients/hydra/go/model_verifiable_credential_proof.go +++ b/clients/hydra/go/model_verifiable_credential_proof.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -132,10 +132,10 @@ func (o VerifiableCredentialProof) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *VerifiableCredentialProof) UnmarshalJSON(bytes []byte) (err error) { +func (o *VerifiableCredentialProof) UnmarshalJSON(data []byte) (err error) { varVerifiableCredentialProof := _VerifiableCredentialProof{} - err = json.Unmarshal(bytes, &varVerifiableCredentialProof) + err = json.Unmarshal(data, &varVerifiableCredentialProof) if err != nil { return err @@ -145,7 +145,7 @@ func (o *VerifiableCredentialProof) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "jwt") delete(additionalProperties, "proof_type") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_verifiable_credential_response.go b/clients/hydra/go/model_verifiable_credential_response.go index 0ecbe61e8be..0143e2cbf7a 100644 --- a/clients/hydra/go/model_verifiable_credential_response.go +++ b/clients/hydra/go/model_verifiable_credential_response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -132,10 +132,10 @@ func (o VerifiableCredentialResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *VerifiableCredentialResponse) UnmarshalJSON(bytes []byte) (err error) { +func (o *VerifiableCredentialResponse) UnmarshalJSON(data []byte) (err error) { varVerifiableCredentialResponse := _VerifiableCredentialResponse{} - err = json.Unmarshal(bytes, &varVerifiableCredentialResponse) + err = json.Unmarshal(data, &varVerifiableCredentialResponse) if err != nil { return err @@ -145,7 +145,7 @@ func (o *VerifiableCredentialResponse) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "credential_draft_00") delete(additionalProperties, "format") o.AdditionalProperties = additionalProperties diff --git a/clients/hydra/go/model_version.go b/clients/hydra/go/model_version.go index 5975e723649..aa969ae27ee 100644 --- a/clients/hydra/go/model_version.go +++ b/clients/hydra/go/model_version.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -97,10 +97,10 @@ func (o Version) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -func (o *Version) UnmarshalJSON(bytes []byte) (err error) { +func (o *Version) UnmarshalJSON(data []byte) (err error) { varVersion := _Version{} - err = json.Unmarshal(bytes, &varVersion) + err = json.Unmarshal(data, &varVersion) if err != nil { return err @@ -110,7 +110,7 @@ func (o *Version) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]interface{}) - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "version") o.AdditionalProperties = additionalProperties } diff --git a/clients/hydra/go/response.go b/clients/hydra/go/response.go index d42d346bf35..9cf97f4ab0a 100644 --- a/clients/hydra/go/response.go +++ b/clients/hydra/go/response.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ diff --git a/clients/hydra/go/utils.go b/clients/hydra/go/utils.go index 25aa4c7b13d..c5e27e9c74f 100644 --- a/clients/hydra/go/utils.go +++ b/clients/hydra/go/utils.go @@ -3,7 +3,7 @@ Ory Hydra API Documentation for all of Ory Hydra's APIs. -API version: v2.2.0 +API version: v2.2.1 Contact: hi@ory.sh */ @@ -321,7 +321,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/clients/hydra/java/.github/workflows/maven.yml b/clients/hydra/java/.github/workflows/maven.yml index 5f88c8d02d3..de3ac747535 100644 --- a/clients/hydra/java/.github/workflows/maven.yml +++ b/clients/hydra/java/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8' ] + java: [ 17, 21 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} distribution: 'temurin' diff --git a/clients/hydra/java/.openapi-generator/VERSION b/clients/hydra/java/.openapi-generator/VERSION index 0df17dd0f6a..1985849fb58 100644 --- a/clients/hydra/java/.openapi-generator/VERSION +++ b/clients/hydra/java/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/java/README.md b/clients/hydra/java/README.md index aa1f7db63c5..e50b5e7d494 100644 --- a/clients/hydra/java/README.md +++ b/clients/hydra/java/README.md @@ -1,8 +1,9 @@ # hydra-client Ory Hydra API -- API version: v2.2.0 - - Build date: 2024-02-12T11:42:01.945599172Z[Etc/UTC] +- API version: v2.2.1 + - Build date: 2024-07-08T13:20:22.059623837Z[Etc/UTC] + - Generator version: 7.7.0 Documentation for all of Ory Hydra's APIs. @@ -41,7 +42,7 @@ Add this dependency to your project's POM: sh.ory.hydra hydra-client - v2.2.0 + v2.2.1 compile ``` @@ -57,7 +58,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "sh.ory.hydra:hydra-client:v2.2.0" + implementation "sh.ory.hydra:hydra-client:v2.2.1" } ``` @@ -71,7 +72,7 @@ mvn clean package Then manually install the following JARs: -* `target/hydra-client-v2.2.0.jar` +* `target/hydra-client-v2.2.1.jar` * `target/lib/*.jar` ## Getting Started @@ -213,17 +214,22 @@ Class | Method | HTTP request | Description - [Version](docs/Version.md) + ## Documentation for Authorization + Authentication schemes defined for the API: + ### basic - **Type**: HTTP basic authentication + ### bearer -- **Type**: HTTP basic authentication +- **Type**: HTTP Bearer Token authentication + ### oauth2 - **Type**: OAuth diff --git a/clients/hydra/java/api/openapi.yaml b/clients/hydra/java/api/openapi.yaml index 71d4887eee4..ef6fdc21fdd 100644 --- a/clients/hydra/java/api/openapi.yaml +++ b/clients/hydra/java/api/openapi.yaml @@ -7,7 +7,7 @@ info: license: name: Apache 2.0 title: Ory Hydra API - version: v2.2.0 + version: v2.2.1 servers: - url: / tags: @@ -45,7 +45,8 @@ paths: summary: Discover Well-Known JSON Web Keys tags: - wellknown - x-accepts: application/json + x-accepts: + - application/json /.well-known/openid-configuration: get: description: |- @@ -70,7 +71,8 @@ paths: summary: OpenID Connect Discovery tags: - oidc - x-accepts: application/json + x-accepts: + - application/json /admin/clients: get: description: |- @@ -142,7 +144,8 @@ paths: summary: List OAuth 2.0 Clients tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json post: description: |- Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret @@ -179,7 +182,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/clients/{id}: delete: description: |- @@ -213,7 +217,8 @@ paths: summary: Delete OAuth 2.0 Client tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json get: description: |- Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. @@ -246,7 +251,8 @@ paths: summary: Get an OAuth 2.0 Client tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json patch: description: |- Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` @@ -296,7 +302,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json put: description: |- Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, @@ -353,7 +360,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/clients/{id}/lifespans: put: description: Set lifespans of different token types issued for this OAuth 2.0 @@ -391,7 +399,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/keys/{set}: delete: description: |- @@ -422,7 +431,8 @@ paths: summary: Delete JSON Web Key Set tags: - jwk - x-accepts: application/json + x-accepts: + - application/json get: description: |- This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. @@ -454,7 +464,8 @@ paths: summary: Retrieve a JSON Web Key Set tags: - jwk - x-accepts: application/json + x-accepts: + - application/json post: description: |- This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. @@ -494,7 +505,8 @@ paths: tags: - jwk x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json put: description: |- Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. @@ -533,7 +545,8 @@ paths: tags: - jwk x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/keys/{set}/{kid}: delete: description: |- @@ -575,7 +588,8 @@ paths: summary: Delete JSON Web Key tags: - jwk - x-accepts: application/json + x-accepts: + - application/json get: description: This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). @@ -613,7 +627,8 @@ paths: summary: Get JSON Web Key tags: - jwk - x-accepts: application/json + x-accepts: + - application/json put: description: |- Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. @@ -660,7 +675,8 @@ paths: tags: - jwk x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/consent: get: description: |- @@ -706,7 +722,8 @@ paths: summary: Get OAuth 2.0 Consent Request tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/consent/accept: put: description: |- @@ -759,7 +776,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/consent/reject: put: description: |- @@ -811,7 +829,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/login: get: description: |- @@ -856,7 +875,8 @@ paths: summary: Get OAuth 2.0 Login Request tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/login/accept: put: description: |- @@ -904,7 +924,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/login/reject: put: description: |- @@ -951,7 +972,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/logout: get: description: Use this endpoint to fetch an Ory OAuth 2.0 logout request. @@ -986,7 +1008,8 @@ paths: summary: Get OAuth 2.0 Session Logout Request tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/logout/accept: put: description: |- @@ -1019,7 +1042,8 @@ paths: summary: Accept OAuth 2.0 Session Logout Request tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/requests/logout/reject: put: description: |- @@ -1050,7 +1074,8 @@ paths: summary: Reject OAuth 2.0 Session Logout Request tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/sessions/consent: delete: description: |- @@ -1105,7 +1130,8 @@ paths: summary: Revoke OAuth 2.0 Consent Sessions of a Subject tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json get: description: |- This endpoint lists all subject's granted consent sessions, including client and granted scope. @@ -1175,7 +1201,8 @@ paths: summary: List OAuth 2.0 Consent Sessions of a Subject tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/auth/sessions/login: delete: description: |- @@ -1225,7 +1252,8 @@ paths: summary: Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/introspect: post: description: |- @@ -1255,7 +1283,8 @@ paths: tags: - oAuth2 x-content-type: application/x-www-form-urlencoded - x-accepts: application/json + x-accepts: + - application/json /admin/oauth2/tokens: delete: description: This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 @@ -1284,7 +1313,8 @@ paths: summary: Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /admin/trust/grants/jwt-bearer/issuers: get: description: Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. @@ -1331,7 +1361,8 @@ paths: summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json post: description: |- Use this endpoint to establish a trust relationship for a JWT issuer @@ -1361,7 +1392,8 @@ paths: tags: - oAuth2 x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /admin/trust/grants/jwt-bearer/issuers/{id}: delete: description: |- @@ -1394,7 +1426,8 @@ paths: summary: Delete Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json get: description: |- Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you @@ -1425,7 +1458,8 @@ paths: summary: Get Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /credentials: post: description: |- @@ -1465,7 +1499,8 @@ paths: tags: - oidc x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /health/alive: get: description: |- @@ -1494,7 +1529,8 @@ paths: summary: Check HTTP Server Status tags: - metadata - x-accepts: application/json + x-accepts: + - application/json /health/ready: get: description: |- @@ -1523,7 +1559,8 @@ paths: summary: Check HTTP Server and Database Status tags: - metadata - x-accepts: application/json + x-accepts: + - application/json /oauth2/auth: get: description: |- @@ -1546,7 +1583,8 @@ paths: summary: OAuth 2.0 Authorize Endpoint tags: - oAuth2 - x-accepts: application/json + x-accepts: + - application/json /oauth2/register: post: description: |- @@ -1593,7 +1631,8 @@ paths: tags: - oidc x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /oauth2/register/{id}: delete: description: |- @@ -1635,7 +1674,8 @@ paths: Management Protocol tags: - oidc - x-accepts: application/json + x-accepts: + - application/json get: description: |- This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the @@ -1673,7 +1713,8 @@ paths: summary: Get OAuth2 Client using OpenID Dynamic Client Registration tags: - oidc - x-accepts: application/json + x-accepts: + - application/json put: description: |- This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the @@ -1734,7 +1775,8 @@ paths: tags: - oidc x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /oauth2/revoke: post: description: |- @@ -1766,7 +1808,8 @@ paths: tags: - oAuth2 x-content-type: application/x-www-form-urlencoded - x-accepts: application/json + x-accepts: + - application/json /oauth2/sessions/logout: get: description: |- @@ -1785,7 +1828,8 @@ paths: summary: OpenID Connect Front- and Back-channel Enabled Logout tags: - oidc - x-accepts: application/json + x-accepts: + - application/json /oauth2/token: post: description: |- @@ -1819,7 +1863,8 @@ paths: tags: - oAuth2 x-content-type: application/x-www-form-urlencoded - x-accepts: application/json + x-accepts: + - application/json /userinfo: get: description: |- @@ -1848,7 +1893,8 @@ paths: summary: OpenID Connect Userinfo tags: - oidc - x-accepts: application/json + x-accepts: + - application/json /version: get: description: |- @@ -1870,7 +1916,8 @@ paths: summary: Return Running Software Version. tags: - metadata - x-accepts: application/json + x-accepts: + - application/json components: responses: emptyResponse: @@ -2220,6 +2267,15 @@ components: type: integer type: object genericError: + example: + reason: User with ID 1234 does not exist. + request: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + code: 404 + debug: SQL field "foo" is not a bool. + details: "" + id: id + message: The resource could not be found + status: Not Found properties: code: description: The status code @@ -4507,6 +4563,15 @@ components: unexpectedError: type: string verifiableCredentialPrimingResponse: + example: + c_nonce_expires_in: 0 + error_debug: error_debug + status_code: 6 + c_nonce: c_nonce + error_description: error_description + format: format + error: error + error_hint: error_hint properties: c_nonce: type: string @@ -4576,6 +4641,9 @@ components: type: string type: object isReady_503_response: + example: + errors: + key: errors properties: errors: additionalProperties: diff --git a/clients/hydra/java/build.gradle b/clients/hydra/java/build.gradle index 5a28b0b3e1f..dfc7312cd05 100644 --- a/clients/hydra/java/build.gradle +++ b/clients/hydra/java/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'sh.ory.hydra' -version = 'v2.2.0' +version = 'v2.2.1' buildscript { repositories { @@ -62,9 +62,9 @@ if(hasProperty('target') && target == 'android') { def task = project.tasks.create "jar${variant.name.capitalize()}", Jar task.description = "Create jar artifact for ${variant.name}" task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" artifacts.add('archives', task) } } @@ -108,19 +108,19 @@ ext { dependencies { implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' + implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'javax.ws.rs:jsr311-api:1.1.1' implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.4' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2' testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2' } javadoc { diff --git a/clients/hydra/java/build.sbt b/clients/hydra/java/build.sbt index a0a75636223..22b993fa055 100644 --- a/clients/hydra/java/build.sbt +++ b/clients/hydra/java/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "sh.ory.hydra", name := "hydra-client", - version := "v2.2.0", + version := "v2.2.1", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), @@ -10,19 +10,19 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.4", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test", "org.mockito" % "mockito-core" % "3.12.4" % "test" ) diff --git a/clients/hydra/java/docs/JwkApi.md b/clients/hydra/java/docs/JwkApi.md index ef6966ce50a..4cc218d4421 100644 --- a/clients/hydra/java/docs/JwkApi.md +++ b/clients/hydra/java/docs/JwkApi.md @@ -13,7 +13,7 @@ All URIs are relative to *http://localhost* | [**setJsonWebKeySet**](JwkApi.md#setJsonWebKeySet) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set | - + # **createJsonWebKeySet** > JsonWebKeySet createJsonWebKeySet(set, createJsonWebKeySet) @@ -78,7 +78,7 @@ No authorization required | **201** | jsonWebKeySet | - | | **0** | errorOAuth2 | - | - + # **deleteJsonWebKey** > deleteJsonWebKey(set, kid) @@ -142,7 +142,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **deleteJsonWebKeySet** > deleteJsonWebKeySet(set) @@ -204,7 +204,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **getJsonWebKey** > JsonWebKeySet getJsonWebKey(set, kid) @@ -269,7 +269,7 @@ No authorization required | **200** | jsonWebKeySet | - | | **0** | errorOAuth2 | - | - + # **getJsonWebKeySet** > JsonWebKeySet getJsonWebKeySet(set) @@ -332,7 +332,7 @@ No authorization required | **200** | jsonWebKeySet | - | | **0** | errorOAuth2 | - | - + # **setJsonWebKey** > JsonWebKey setJsonWebKey(set, kid, jsonWebKey) @@ -399,7 +399,7 @@ No authorization required | **200** | jsonWebKey | - | | **0** | errorOAuth2 | - | - + # **setJsonWebKeySet** > JsonWebKeySet setJsonWebKeySet(set, jsonWebKeySet) diff --git a/clients/hydra/java/docs/MetadataApi.md b/clients/hydra/java/docs/MetadataApi.md index 810ae35e428..2d0e8f46be8 100644 --- a/clients/hydra/java/docs/MetadataApi.md +++ b/clients/hydra/java/docs/MetadataApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://localhost* | [**isReady**](MetadataApi.md#isReady) | **GET** /health/ready | Check HTTP Server and Database Status | - + # **getVersion** > GetVersion200Response getVersion() @@ -67,7 +67,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Returns the Ory Hydra version. | - | - + # **isAlive** > HealthStatus isAlive() @@ -126,7 +126,7 @@ No authorization required | **200** | Ory Hydra is ready to accept connections. | - | | **500** | genericError | - | - + # **isReady** > IsReady200Response isReady() diff --git a/clients/hydra/java/docs/OAuth2Api.md b/clients/hydra/java/docs/OAuth2Api.md index 5da37ce36e6..c3aac7b3b1b 100644 --- a/clients/hydra/java/docs/OAuth2Api.md +++ b/clients/hydra/java/docs/OAuth2Api.md @@ -34,7 +34,7 @@ All URIs are relative to *http://localhost* | [**trustOAuth2JwtGrantIssuer**](OAuth2Api.md#trustOAuth2JwtGrantIssuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer | - + # **acceptOAuth2ConsentRequest** > OAuth2RedirectTo acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest) @@ -99,7 +99,7 @@ No authorization required | **200** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **acceptOAuth2LoginRequest** > OAuth2RedirectTo acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest) @@ -164,7 +164,7 @@ No authorization required | **200** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **acceptOAuth2LogoutRequest** > OAuth2RedirectTo acceptOAuth2LogoutRequest(logoutChallenge) @@ -227,7 +227,7 @@ No authorization required | **200** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **createOAuth2Client** > OAuth2Client createOAuth2Client(oauth2Client) @@ -291,7 +291,7 @@ No authorization required | **400** | Bad Request Error Response | - | | **0** | Default Error Response | - | - + # **deleteOAuth2Client** > deleteOAuth2Client(id) @@ -353,7 +353,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | genericError | - | - + # **deleteOAuth2Token** > deleteOAuth2Token(clientId) @@ -415,7 +415,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **deleteTrustedOAuth2JwtGrantIssuer** > deleteTrustedOAuth2JwtGrantIssuer(id) @@ -477,7 +477,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | genericError | - | - + # **getOAuth2Client** > OAuth2Client getOAuth2Client(id) @@ -540,7 +540,7 @@ No authorization required | **200** | oAuth2Client | - | | **0** | Default Error Response | - | - + # **getOAuth2ConsentRequest** > OAuth2ConsentRequest getOAuth2ConsentRequest(consentChallenge) @@ -604,7 +604,7 @@ No authorization required | **410** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **getOAuth2LoginRequest** > OAuth2LoginRequest getOAuth2LoginRequest(loginChallenge) @@ -668,7 +668,7 @@ No authorization required | **410** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **getOAuth2LogoutRequest** > OAuth2LogoutRequest getOAuth2LogoutRequest(logoutChallenge) @@ -732,7 +732,7 @@ No authorization required | **410** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **getTrustedOAuth2JwtGrantIssuer** > TrustedOAuth2JwtGrantIssuer getTrustedOAuth2JwtGrantIssuer(id) @@ -795,7 +795,7 @@ No authorization required | **200** | trustedOAuth2JwtGrantIssuer | - | | **0** | genericError | - | - + # **introspectOAuth2Token** > IntrospectedOAuth2Token introspectOAuth2Token(token, scope) @@ -860,7 +860,7 @@ No authorization required | **200** | introspectedOAuth2Token | - | | **0** | errorOAuth2 | - | - + # **listOAuth2Clients** > List<OAuth2Client> listOAuth2Clients(pageSize, pageToken, clientName, owner) @@ -929,7 +929,7 @@ No authorization required | **200** | Paginated OAuth2 Client List Response | - | | **0** | Default Error Response | - | - + # **listOAuth2ConsentSessions** > List<OAuth2ConsentSession> listOAuth2ConsentSessions(subject, pageSize, pageToken, loginSessionId) @@ -998,7 +998,7 @@ No authorization required | **200** | oAuth2ConsentSessions | - | | **0** | errorOAuth2 | - | - + # **listTrustedOAuth2JwtGrantIssuers** > List<TrustedOAuth2JwtGrantIssuer> listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer) @@ -1065,7 +1065,7 @@ No authorization required | **200** | trustedOAuth2JwtGrantIssuers | - | | **0** | genericError | - | - + # **oAuth2Authorize** > ErrorOAuth2 oAuth2Authorize() @@ -1124,7 +1124,7 @@ No authorization required | **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **oauth2TokenExchange** > OAuth2TokenExchange oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken) @@ -1205,7 +1205,7 @@ public class Example { | **200** | oAuth2TokenExchange | - | | **0** | errorOAuth2 | - | - + # **patchOAuth2Client** > OAuth2Client patchOAuth2Client(id, jsonPatch) @@ -1271,7 +1271,7 @@ No authorization required | **404** | Not Found Error Response | - | | **0** | Default Error Response | - | - + # **rejectOAuth2ConsentRequest** > OAuth2RedirectTo rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request) @@ -1336,7 +1336,7 @@ No authorization required | **200** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **rejectOAuth2LoginRequest** > OAuth2RedirectTo rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request) @@ -1401,7 +1401,7 @@ No authorization required | **200** | oAuth2RedirectTo | - | | **0** | errorOAuth2 | - | - + # **rejectOAuth2LogoutRequest** > rejectOAuth2LogoutRequest(logoutChallenge) @@ -1463,7 +1463,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **revokeOAuth2ConsentSessions** > revokeOAuth2ConsentSessions(subject, client, all) @@ -1529,7 +1529,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **revokeOAuth2LoginSessions** > revokeOAuth2LoginSessions(subject, sid) @@ -1593,7 +1593,7 @@ No authorization required | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **revokeOAuth2Token** > revokeOAuth2Token(token, clientId, clientSecret) @@ -1669,7 +1669,7 @@ null (empty response body) | **200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | errorOAuth2 | - | - + # **setOAuth2Client** > OAuth2Client setOAuth2Client(id, oauth2Client) @@ -1736,7 +1736,7 @@ No authorization required | **404** | Not Found Error Response | - | | **0** | Default Error Response | - | - + # **setOAuth2ClientLifespans** > OAuth2Client setOAuth2ClientLifespans(id, oauth2ClientTokenLifespans) @@ -1801,7 +1801,7 @@ No authorization required | **200** | oAuth2Client | - | | **0** | genericError | - | - + # **trustOAuth2JwtGrantIssuer** > TrustedOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer) diff --git a/clients/hydra/java/docs/OidcApi.md b/clients/hydra/java/docs/OidcApi.md index c924e506d45..61d9251eda4 100644 --- a/clients/hydra/java/docs/OidcApi.md +++ b/clients/hydra/java/docs/OidcApi.md @@ -14,7 +14,7 @@ All URIs are relative to *http://localhost* | [**setOidcDynamicClient**](OidcApi.md#setOidcDynamicClient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration | - + # **createOidcDynamicClient** > OAuth2Client createOidcDynamicClient(oauth2Client) @@ -78,7 +78,7 @@ No authorization required | **400** | Bad Request Error Response | - | | **0** | Default Error Response | - | - + # **createVerifiableCredential** > VerifiableCredentialResponse createVerifiableCredential(createVerifiableCredentialRequestBody) @@ -142,7 +142,7 @@ No authorization required | **400** | verifiableCredentialPrimingResponse | - | | **0** | errorOAuth2 | - | - + # **deleteOidcDynamicClient** > deleteOidcDynamicClient(id) @@ -209,7 +209,7 @@ null (empty response body) | **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | | **0** | genericError | - | - + # **discoverOidcConfiguration** > OidcConfiguration discoverOidcConfiguration() @@ -268,7 +268,7 @@ No authorization required | **200** | oidcConfiguration | - | | **0** | errorOAuth2 | - | - + # **getOidcDynamicClient** > OAuth2Client getOidcDynamicClient(id) @@ -336,7 +336,7 @@ public class Example { | **200** | oAuth2Client | - | | **0** | Default Error Response | - | - + # **getOidcUserInfo** > OidcUserInfo getOidcUserInfo() @@ -400,7 +400,7 @@ This endpoint does not need any parameter. | **200** | oidcUserInfo | - | | **0** | errorOAuth2 | - | - + # **revokeOidcSession** > revokeOidcSession() @@ -457,7 +457,7 @@ No authorization required |-------------|-------------|------------------| | **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | - + # **setOidcDynamicClient** > OAuth2Client setOidcDynamicClient(id, oauth2Client) diff --git a/clients/hydra/java/docs/WellknownApi.md b/clients/hydra/java/docs/WellknownApi.md index 00975c0ac83..897ddb730e0 100644 --- a/clients/hydra/java/docs/WellknownApi.md +++ b/clients/hydra/java/docs/WellknownApi.md @@ -7,7 +7,7 @@ All URIs are relative to *http://localhost* | [**discoverJsonWebKeys**](WellknownApi.md#discoverJsonWebKeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys | - + # **discoverJsonWebKeys** > JsonWebKeySet discoverJsonWebKeys() diff --git a/clients/hydra/java/gradle/wrapper/gradle-wrapper.jar b/clients/hydra/java/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..e6441136f3d4ba8a0da8d277868979cfbc8ad796 100644 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vSTxF-Vi3+ZOI=Thq2} zyQgjYY1_7^ZQHh{?P))4+qUiQJLi1&{yE>h?~jU%tjdV0h|FENbM3X(KnJdPKc?~k zh=^Ixv*+smUll!DTWH!jrV*wSh*(mx0o6}1@JExzF(#9FXgmTXVoU+>kDe68N)dkQ zH#_98Zv$}lQwjKL@yBd;U(UD0UCl322=pav<=6g>03{O_3oKTq;9bLFX1ia*lw;#K zOiYDcBJf)82->83N_Y(J7Kr_3lE)hAu;)Q(nUVydv+l+nQ$?|%MWTy`t>{havFSQloHwiIkGK9YZ79^9?AZo0ZyQlVR#}lF%dn5n%xYksXf8gnBm=wO7g_^! zauQ-bH1Dc@3ItZ-9D_*pH}p!IG7j8A_o94#~>$LR|TFq zZ-b00*nuw|-5C2lJDCw&8p5N~Z1J&TrcyErds&!l3$eSz%`(*izc;-?HAFD9AHb-| z>)id`QCrzRws^9(#&=pIx9OEf2rmlob8sK&xPCWS+nD~qzU|qG6KwA{zbikcfQrdH z+ zQg>O<`K4L8rN7`GJB0*3<3`z({lWe#K!4AZLsI{%z#ja^OpfjU{!{)x0ZH~RB0W5X zTwN^w=|nA!4PEU2=LR05x~}|B&ZP?#pNgDMwD*ajI6oJqv!L81gu=KpqH22avXf0w zX3HjbCI!n9>l046)5rr5&v5ja!xkKK42zmqHzPx$9Nn_MZk`gLeSLgC=LFf;H1O#B zn=8|^1iRrujHfbgA+8i<9jaXc;CQBAmQvMGQPhFec2H1knCK2x!T`e6soyrqCamX% zTQ4dX_E*8so)E*TB$*io{$c6X)~{aWfaqdTh=xEeGvOAN9H&-t5tEE-qso<+C!2>+ zskX51H-H}#X{A75wqFe-J{?o8Bx|>fTBtl&tcbdR|132Ztqu5X0i-pisB-z8n71%q%>EF}yy5?z=Ve`}hVh{Drv1YWL zW=%ug_&chF11gDv3D6B)Tz5g54H0mDHNjuKZ+)CKFk4Z|$RD zfRuKLW`1B>B?*RUfVd0+u8h3r-{@fZ{k)c!93t1b0+Q9vOaRnEn1*IL>5Z4E4dZ!7 ztp4GP-^1d>8~LMeb}bW!(aAnB1tM_*la=Xx)q(I0Y@__Zd$!KYb8T2VBRw%e$iSdZ zkwdMwd}eV9q*;YvrBFTv1>1+}{H!JK2M*C|TNe$ZSA>UHKk);wz$(F$rXVc|sI^lD zV^?_J!3cLM;GJuBMbftbaRUs$;F}HDEDtIeHQ)^EJJ1F9FKJTGH<(Jj`phE6OuvE) zqK^K`;3S{Y#1M@8yRQwH`?kHMq4tHX#rJ>5lY3DM#o@or4&^_xtBC(|JpGTfrbGkA z2Tu+AyT^pHannww!4^!$5?@5v`LYy~T`qs7SYt$JgrY(w%C+IWA;ZkwEF)u5sDvOK zGk;G>Mh&elvXDcV69J_h02l&O;!{$({fng9Rlc3ID#tmB^FIG^w{HLUpF+iB`|
NnX)EH+Nua)3Y(c z&{(nX_ht=QbJ%DzAya}!&uNu!4V0xI)QE$SY__m)SAKcN0P(&JcoK*Lxr@P zY&P=}&B3*UWNlc|&$Oh{BEqwK2+N2U$4WB7Fd|aIal`FGANUa9E-O)!gV`((ZGCc$ zBJA|FFrlg~9OBp#f7aHodCe{6= zay$6vN~zj1ddMZ9gQ4p32(7wD?(dE>KA2;SOzXRmPBiBc6g`eOsy+pVcHu=;Yd8@{ zSGgXf@%sKKQz~;!J;|2fC@emm#^_rnO0esEn^QxXgJYd`#FPWOUU5b;9eMAF zZhfiZb|gk8aJIw*YLp4!*(=3l8Cp{(%p?ho22*vN9+5NLV0TTazNY$B5L6UKUrd$n zjbX%#m7&F#U?QNOBXkiiWB*_tk+H?N3`vg;1F-I+83{M2!8<^nydGr5XX}tC!10&e z7D36bLaB56WrjL&HiiMVtpff|K%|*{t*ltt^5ood{FOG0<>k&1h95qPio)2`eL${YAGIx(b4VN*~nKn6E~SIQUuRH zQ+5zP6jfnP$S0iJ@~t!Ai3o`X7biohli;E zT#yXyl{bojG@-TGZzpdVDXhbmF%F9+-^YSIv|MT1l3j zrxOFq>gd2%U}?6}8mIj?M zc077Zc9fq(-)4+gXv?Az26IO6eV`RAJz8e3)SC7~>%rlzDwySVx*q$ygTR5kW2ds- z!HBgcq0KON9*8Ff$X0wOq$`T7ml(@TF)VeoF}x1OttjuVHn3~sHrMB++}f7f9H%@f z=|kP_?#+fve@{0MlbkC9tyvQ_R?lRdRJ@$qcB(8*jyMyeME5ns6ypVI1Xm*Zr{DuS zZ!1)rQfa89c~;l~VkCiHI|PCBd`S*2RLNQM8!g9L6?n`^evQNEwfO@&JJRme+uopQX0%Jo zgd5G&#&{nX{o?TQwQvF1<^Cg3?2co;_06=~Hcb6~4XWpNFL!WU{+CK;>gH%|BLOh7@!hsa(>pNDAmpcuVO-?;Bic17R}^|6@8DahH)G z!EmhsfunLL|3b=M0MeK2vqZ|OqUqS8npxwge$w-4pFVXFq$_EKrZY?BuP@Az@(k`L z`ViQBSk`y+YwRT;&W| z2e3UfkCo^uTA4}Qmmtqs+nk#gNr2W4 zTH%hhErhB)pkXR{B!q5P3-OM+M;qu~f>}IjtF%>w{~K-0*jPVLl?Chz&zIdxp}bjx zStp&Iufr58FTQ36AHU)0+CmvaOpKF;W@sMTFpJ`j;3d)J_$tNQI^c<^1o<49Z(~K> z;EZTBaVT%14(bFw2ob@?JLQ2@(1pCdg3S%E4*dJ}dA*v}_a4_P(a`cHnBFJxNobAv zf&Zl-Yt*lhn-wjZsq<9v-IsXxAxMZ58C@e0!rzhJ+D@9^3~?~yllY^s$?&oNwyH!#~6x4gUrfxplCvK#!f z$viuszW>MFEcFL?>ux*((!L$;R?xc*myjRIjgnQX79@UPD$6Dz0jutM@7h_pq z0Zr)#O<^y_K6jfY^X%A-ip>P%3saX{!v;fxT-*0C_j4=UMH+Xth(XVkVGiiKE#f)q z%Jp=JT)uy{&}Iq2E*xr4YsJ5>w^=#-mRZ4vPXpI6q~1aFwi+lQcimO45V-JXP;>(Q zo={U`{=_JF`EQj87Wf}{Qy35s8r1*9Mxg({CvOt}?Vh9d&(}iI-quvs-rm~P;eRA@ zG5?1HO}puruc@S{YNAF3vmUc2B4!k*yi))<5BQmvd3tr}cIs#9)*AX>t`=~{f#Uz0 z0&Nk!7sSZwJe}=)-R^$0{yeS!V`Dh7w{w5rZ9ir!Z7Cd7dwZcK;BT#V0bzTt>;@Cl z#|#A!-IL6CZ@eHH!CG>OO8!%G8&8t4)Ro@}USB*k>oEUo0LsljsJ-%5Mo^MJF2I8- z#v7a5VdJ-Cd%(a+y6QwTmi+?f8Nxtm{g-+WGL>t;s#epv7ug>inqimZCVm!uT5Pf6 ziEgQt7^%xJf#!aPWbuC_3Nxfb&CFbQy!(8ANpkWLI4oSnH?Q3f?0k1t$3d+lkQs{~(>06l&v|MpcFsyAv zin6N!-;pggosR*vV=DO(#+}4ps|5$`udE%Kdmp?G7B#y%H`R|i8skKOd9Xzx8xgR$>Zo2R2Ytktq^w#ul4uicxW#{ zFjG_RNlBroV_n;a7U(KIpcp*{M~e~@>Q#Av90Jc5v%0c>egEdY4v3%|K1XvB{O_8G zkTWLC>OZKf;XguMH2-Pw{BKbFzaY;4v2seZV0>^7Q~d4O=AwaPhP3h|!hw5aqOtT@ z!SNz}$of**Bl3TK209@F=Tn1+mgZa8yh(Png%Zd6Mt}^NSjy)etQrF zme*llAW=N_8R*O~d2!apJnF%(JcN??=`$qs3Y+~xs>L9x`0^NIn!8mMRFA_tg`etw z3k{9JAjnl@ygIiJcNHTy02GMAvBVqEss&t2<2mnw!; zU`J)0>lWiqVqo|ex7!+@0i>B~BSU1A_0w#Ee+2pJx0BFiZ7RDHEvE*ptc9md(B{&+ zKE>TM)+Pd>HEmdJao7U@S>nL(qq*A)#eLOuIfAS@j`_sK0UEY6OAJJ-kOrHG zjHx`g!9j*_jRcJ%>CE9K2MVf?BUZKFHY?EpV6ai7sET-tqk=nDFh-(65rhjtlKEY% z@G&cQ<5BKatfdA1FKuB=i>CCC5(|9TMW%K~GbA4}80I5%B}(gck#Wlq@$nO3%@QP_ z8nvPkJFa|znk>V92cA!K1rKtr)skHEJD;k8P|R8RkCq1Rh^&}Evwa4BUJz2f!2=MH zo4j8Y$YL2313}H~F7@J7mh>u%556Hw0VUOz-Un@ZASCL)y8}4XXS`t1AC*^>PLwIc zUQok5PFS=*#)Z!3JZN&eZ6ZDP^-c@StY*t20JhCnbMxXf=LK#;`4KHEqMZ-Ly9KsS zI2VUJGY&PmdbM+iT)zek)#Qc#_i4uH43 z@T5SZBrhNCiK~~esjsO9!qBpaWK<`>!-`b71Y5ReXQ4AJU~T2Njri1CEp5oKw;Lnm)-Y@Z3sEY}XIgSy%xo=uek(kAAH5MsV$V3uTUsoTzxp_rF=tx zV07vlJNKtJhCu`b}*#m&5LV4TAE&%KtHViDAdv#c^x`J7bg z&N;#I2GkF@SIGht6p-V}`!F_~lCXjl1BdTLIjD2hH$J^YFN`7f{Q?OHPFEM$65^!u zNwkelo*5+$ZT|oQ%o%;rBX$+?xhvjb)SHgNHE_yP%wYkkvXHS{Bf$OiKJ5d1gI0j< zF6N}Aq=(WDo(J{e-uOecxPD>XZ@|u-tgTR<972`q8;&ZD!cep^@B5CaqFz|oU!iFj zU0;6fQX&~15E53EW&w1s9gQQ~Zk16X%6 zjG`j0yq}4deX2?Tr(03kg>C(!7a|b9qFI?jcE^Y>-VhudI@&LI6Qa}WQ>4H_!UVyF z((cm&!3gmq@;BD#5P~0;_2qgZhtJS|>WdtjY=q zLnHH~Fm!cxw|Z?Vw8*~?I$g#9j&uvgm7vPr#&iZgPP~v~BI4jOv;*OQ?jYJtzO<^y z7-#C={r7CO810!^s(MT!@@Vz_SVU)7VBi(e1%1rvS!?PTa}Uv`J!EP3s6Y!xUgM^8 z4f!fq<3Wer_#;u!5ECZ|^c1{|q_lh3m^9|nsMR1#Qm|?4Yp5~|er2?W^7~cl;_r4WSme_o68J9p03~Hc%X#VcX!xAu%1`R!dfGJCp zV*&m47>s^%Ib0~-2f$6oSgn3jg8m%UA;ArcdcRyM5;}|r;)?a^D*lel5C`V5G=c~k zy*w_&BfySOxE!(~PI$*dwG><+-%KT5p?whOUMA*k<9*gi#T{h3DAxzAPxN&Xws8o9Cp*`PA5>d9*Z-ynV# z9yY*1WR^D8|C%I@vo+d8r^pjJ$>eo|j>XiLWvTWLl(^;JHCsoPgem6PvegHb-OTf| zvTgsHSa;BkbG=(NgPO|CZu9gUCGr$8*EoH2_Z#^BnxF0yM~t`|9ws_xZ8X8iZYqh! zAh;HXJ)3P&)Q0(&F>!LN0g#bdbis-cQxyGn9Qgh`q+~49Fqd2epikEUw9caM%V6WgP)532RMRW}8gNS%V%Hx7apSz}tn@bQy!<=lbhmAH=FsMD?leawbnP5BWM0 z5{)@EEIYMu5;u)!+HQWhQ;D3_Cm_NADNeb-f56}<{41aYq8p4=93d=-=q0Yx#knGYfXVt z+kMxlus}t2T5FEyCN~!}90O_X@@PQpuy;kuGz@bWft%diBTx?d)_xWd_-(!LmVrh**oKg!1CNF&LX4{*j|) zIvjCR0I2UUuuEXh<9}oT_zT#jOrJAHNLFT~Ilh9hGJPI1<5`C-WA{tUYlyMeoy!+U zhA#=p!u1R7DNg9u4|QfED-2TuKI}>p#2P9--z;Bbf4Op*;Q9LCbO&aL2i<0O$ByoI z!9;Ght733FC>Pz>$_mw(F`zU?`m@>gE`9_p*=7o=7av`-&ifU(^)UU`Kg3Kw`h9-1 z6`e6+im=|m2v`pN(2dE%%n8YyQz;#3Q-|x`91z?gj68cMrHl}C25|6(_dIGk*8cA3 zRHB|Nwv{@sP4W+YZM)VKI>RlB`n=Oj~Rzx~M+Khz$N$45rLn6k1nvvD^&HtsMA4`s=MmuOJID@$s8Ph4E zAmSV^+s-z8cfv~Yd(40Sh4JG#F~aB>WFoX7ykaOr3JaJ&Lb49=B8Vk-SQT9%7TYhv z?-Pprt{|=Y5ZQ1?od|A<_IJU93|l4oAfBm?3-wk{O<8ea+`}u%(kub(LFo2zFtd?4 zwpN|2mBNywv+d^y_8#<$r>*5+$wRTCygFLcrwT(qc^n&@9r+}Kd_u@Ithz(6Qb4}A zWo_HdBj#V$VE#l6pD0a=NfB0l^6W^g`vm^sta>Tly?$E&{F?TTX~DsKF~poFfmN%2 z4x`Dc{u{Lkqz&y!33;X}weD}&;7p>xiI&ZUb1H9iD25a(gI|`|;G^NwJPv=1S5e)j z;U;`?n}jnY6rA{V^ zxTd{bK)Gi^odL3l989DQlN+Zs39Xe&otGeY(b5>rlIqfc7Ap4}EC?j<{M=hlH{1+d zw|c}}yx88_xQr`{98Z!d^FNH77=u(p-L{W6RvIn40f-BldeF-YD>p6#)(Qzf)lfZj z?3wAMtPPp>vMehkT`3gToPd%|D8~4`5WK{`#+}{L{jRUMt zrFz+O$C7y8$M&E4@+p+oV5c%uYzbqd2Y%SSgYy#xh4G3hQv>V*BnuKQhBa#=oZB~w{azUB+q%bRe_R^ z>fHBilnRTUfaJ201czL8^~Ix#+qOHSO)A|xWLqOxB$dT2W~)e-r9;bm=;p;RjYahB z*1hegN(VKK+ztr~h1}YP@6cfj{e#|sS`;3tJhIJK=tVJ-*h-5y9n*&cYCSdg#EHE# zSIx=r#qOaLJoVVf6v;(okg6?*L_55atl^W(gm^yjR?$GplNP>BZsBYEf_>wM0Lc;T zhf&gpzOWNxS>m+mN92N0{;4uw`P+9^*|-1~$uXpggj4- z^SFc4`uzj2OwdEVT@}Q`(^EcQ_5(ZtXTql*yGzdS&vrS_w>~~ra|Nb5abwf}Y!uq6R5f&6g2ge~2p(%c< z@O)cz%%rr4*cRJ5f`n@lvHNk@lE1a*96Kw6lJ~B-XfJW%?&-y?;E&?1AacU@`N`!O z6}V>8^%RZ7SQnZ-z$(jsX`amu*5Fj8g!3RTRwK^`2_QHe;_2y_n|6gSaGyPmI#kA0sYV<_qOZc#-2BO%hX)f$s-Z3xlI!ub z^;3ru11DA`4heAu%}HIXo&ctujzE2!6DIGE{?Zs>2}J+p&C$rc7gJC35gxhflorvsb%sGOxpuWhF)dL_&7&Z99=5M0b~Qa;Mo!j&Ti_kXW!86N%n= zSC@6Lw>UQ__F&+&Rzv?gscwAz8IP!n63>SP)^62(HK98nGjLY2*e^OwOq`3O|C92? z;TVhZ2SK%9AGW4ZavTB9?)mUbOoF`V7S=XM;#3EUpR+^oHtdV!GK^nXzCu>tpR|89 zdD{fnvCaN^^LL%amZ^}-E+214g&^56rpdc@yv0b<3}Ys?)f|fXN4oHf$six)-@<;W&&_kj z-B}M5U*1sb4)77aR=@%I?|Wkn-QJVuA96an25;~!gq(g1@O-5VGo7y&E_srxL6ZfS z*R%$gR}dyONgju*D&?geiSj7SZ@ftyA|}(*Y4KbvU!YLsi1EDQQCnb+-cM=K1io78o!v*);o<XwjaQH%)uIP&Zm?)Nfbfn;jIr z)d#!$gOe3QHp}2NBak@yYv3m(CPKkwI|{;d=gi552u?xj9ObCU^DJFQp4t4e1tPzM zvsRIGZ6VF+{6PvqsplMZWhz10YwS={?`~O0Ec$`-!klNUYtzWA^f9m7tkEzCy<_nS z=&<(awFeZvt51>@o_~>PLs05CY)$;}Oo$VDO)?l-{CS1Co=nxjqben*O1BR>#9`0^ zkwk^k-wcLCLGh|XLjdWv0_Hg54B&OzCE^3NCP}~OajK-LuRW53CkV~Su0U>zN%yQP zH8UH#W5P3-!ToO-2k&)}nFe`t+mdqCxxAHgcifup^gKpMObbox9LFK;LP3}0dP-UW z?Zo*^nrQ6*$FtZ(>kLCc2LY*|{!dUn$^RW~m9leoF|@Jy|M5p-G~j%+P0_#orRKf8 zvuu5<*XO!B?1E}-*SY~MOa$6c%2cM+xa8}_8x*aVn~57v&W(0mqN1W`5a7*VN{SUH zXz98DDyCnX2EPl-`Lesf`=AQT%YSDb`$%;(jUTrNen$NPJrlpPDP}prI>Ml!r6bCT;mjsg@X^#&<}CGf0JtR{Ecwd&)2zuhr#nqdgHj+g2n}GK9CHuwO zk>oZxy{vcOL)$8-}L^iVfJHAGfwN$prHjYV0ju}8%jWquw>}_W6j~m<}Jf!G?~r5&Rx)!9JNX!ts#SGe2HzobV5); zpj@&`cNcO&q+%*<%D7za|?m5qlmFK$=MJ_iv{aRs+BGVrs)98BlN^nMr{V_fcl_;jkzRju+c-y?gqBC_@J0dFLq-D9@VN&-`R9U;nv$Hg?>$oe4N&Ht$V_(JR3TG^! zzJsbQbi zFE6-{#9{G{+Z}ww!ycl*7rRdmU#_&|DqPfX3CR1I{Kk;bHwF6jh0opI`UV2W{*|nn zf_Y@%wW6APb&9RrbEN=PQRBEpM(N1w`81s=(xQj6 z-eO0k9=Al|>Ej|Mw&G`%q8e$2xVz1v4DXAi8G};R$y)ww638Y=9y$ZYFDM$}vzusg zUf+~BPX>(SjA|tgaFZr_e0{)+z9i6G#lgt=F_n$d=beAt0Sa0a7>z-?vcjl3e+W}+ z1&9=|vC=$co}-Zh*%3588G?v&U7%N1Qf-wNWJ)(v`iO5KHSkC5&g7CrKu8V}uQGcfcz zmBz#Lbqwqy#Z~UzHgOQ;Q-rPxrRNvl(&u6ts4~0=KkeS;zqURz%!-ERppmd%0v>iRlEf+H$yl{_8TMJzo0 z>n)`On|7=WQdsqhXI?#V{>+~}qt-cQbokEbgwV3QvSP7&hK4R{Z{aGHVS3;+h{|Hz z6$Js}_AJr383c_+6sNR|$qu6dqHXQTc6?(XWPCVZv=)D#6_;D_8P-=zOGEN5&?~8S zl5jQ?NL$c%O)*bOohdNwGIKM#jSAC?BVY={@A#c9GmX0=T(0G}xs`-%f3r=m6-cpK z!%waekyAvm9C3%>sixdZj+I(wQlbB4wv9xKI*T13DYG^T%}zZYJ|0$Oj^YtY+d$V$ zAVudSc-)FMl|54n=N{BnZTM|!>=bhaja?o7s+v1*U$!v!qQ%`T-6fBvmdPbVmro&d zk07TOp*KuxRUSTLRrBj{mjsnF8`d}rMViY8j`jo~Hp$fkv9F_g(jUo#Arp;Xw0M$~ zRIN!B22~$kx;QYmOkos@%|5k)!QypDMVe}1M9tZfkpXKGOxvKXB!=lo`p?|R1l=tA zp(1}c6T3Fwj_CPJwVsYtgeRKg?9?}%oRq0F+r+kdB=bFUdVDRPa;E~~>2$w}>O>v=?|e>#(-Lyx?nbg=ckJ#5U6;RT zNvHhXk$P}m9wSvFyU3}=7!y?Y z=fg$PbV8d7g25&-jOcs{%}wTDKm>!Vk);&rr;O1nvO0VrU&Q?TtYVU=ir`te8SLlS zKSNmV=+vF|ATGg`4$N1uS|n??f}C_4Sz!f|4Ly8#yTW-FBfvS48Tef|-46C(wEO_%pPhUC5$-~Y?!0vFZ^Gu`x=m7X99_?C-`|h zfmMM&Y@zdfitA@KPw4Mc(YHcY1)3*1xvW9V-r4n-9ZuBpFcf{yz+SR{ zo$ZSU_|fgwF~aakGr(9Be`~A|3)B=9`$M-TWKipq-NqRDRQc}ABo*s_5kV%doIX7LRLRau_gd@Rd_aLFXGSU+U?uAqh z8qusWWcvgQ&wu{|sRXmv?sl=xc<$6AR$+cl& zFNh5q1~kffG{3lDUdvEZu5c(aAG~+64FxdlfwY^*;JSS|m~CJusvi-!$XR`6@XtY2 znDHSz7}_Bx7zGq-^5{stTRy|I@N=>*y$zz>m^}^{d&~h;0kYiq8<^Wq7Dz0w31ShO^~LUfW6rfitR0(=3;Uue`Y%y@ex#eKPOW zO~V?)M#AeHB2kovn1v=n^D?2{2jhIQd9t|_Q+c|ZFaWt+r&#yrOu-!4pXAJuxM+Cx z*H&>eZ0v8Y`t}8{TV6smOj=__gFC=eah)mZt9gwz>>W$!>b3O;Rm^Ig*POZP8Rl0f zT~o=Nu1J|lO>}xX&#P58%Yl z83`HRs5#32Qm9mdCrMlV|NKNC+Z~ z9OB8xk5HJ>gBLi+m@(pvpw)1(OaVJKs*$Ou#@Knd#bk+V@y;YXT?)4eP9E5{J%KGtYinNYJUH9PU3A}66c>Xn zZ{Bn0<;8$WCOAL$^NqTjwM?5d=RHgw3!72WRo0c;+houoUA@HWLZM;^U$&sycWrFd zE7ekt9;kb0`lps{>R(}YnXlyGY}5pPd9zBpgXeJTY_jwaJGSJQC#-KJqmh-;ad&F- z-Y)E>!&`Rz!HtCz>%yOJ|v(u7P*I$jqEY3}(Z-orn4 zlI?CYKNl`6I){#2P1h)y(6?i;^z`N3bxTV%wNvQW+eu|x=kbj~s8rhCR*0H=iGkSj zk23lr9kr|p7#qKL=UjgO`@UnvzU)`&fI>1Qs7ubq{@+lK{hH* zvl6eSb9%yngRn^T<;jG1SVa)eA>T^XX=yUS@NCKpk?ovCW1D@!=@kn;l_BrG;hOTC z6K&H{<8K#dI(A+zw-MWxS+~{g$tI7|SfP$EYKxA}LlVO^sT#Oby^grkdZ^^lA}uEF zBSj$weBJG{+Bh@Yffzsw=HyChS(dtLE3i*}Zj@~!_T-Ay7z=B)+*~3|?w`Zd)Co2t zC&4DyB!o&YgSw+fJn6`sn$e)29`kUwAc+1MND7YjV%lO;H2}fNy>hD#=gT ze+-aFNpyKIoXY~Vq-}OWPBe?Rfu^{ps8>Xy%42r@RV#*QV~P83jdlFNgkPN=T|Kt7 zV*M`Rh*30&AWlb$;ae130e@}Tqi3zx2^JQHpM>j$6x`#{mu%tZlwx9Gj@Hc92IuY* zarmT|*d0E~vt6<+r?W^UW0&#U&)8B6+1+;k^2|FWBRP9?C4Rk)HAh&=AS8FS|NQaZ z2j!iZ)nbEyg4ZTp-zHwVlfLC~tXIrv(xrP8PAtR{*c;T24ycA-;auWsya-!kF~CWZ zw_uZ|%urXgUbc@x=L=_g@QJ@m#5beS@6W195Hn7>_}z@Xt{DIEA`A&V82bc^#!q8$ zFh?z_Vn|ozJ;NPd^5uu(9tspo8t%&-U9Ckay-s@DnM*R5rtu|4)~e)`z0P-sy?)kc zs_k&J@0&0!q4~%cKL)2l;N*T&0;mqX5T{Qy60%JtKTQZ-xb%KOcgqwJmb%MOOKk7N zgq})R_6**{8A|6H?fO+2`#QU)p$Ei2&nbj6TpLSIT^D$|`TcSeh+)}VMb}LmvZ{O| ze*1IdCt3+yhdYVxcM)Q_V0bIXLgr6~%JS<<&dxIgfL=Vnx4YHuU@I34JXA|+$_S3~ zy~X#gO_X!cSs^XM{yzDGNM>?v(+sF#<0;AH^YrE8smx<36bUsHbN#y57K8WEu(`qHvQ6cAZPo=J5C(lSmUCZ57Rj6cx!e^rfaI5%w}unz}4 zoX=nt)FVNV%QDJH`o!u9olLD4O5fl)xp+#RloZlaA92o3x4->?rB4`gS$;WO{R;Z3>cG3IgFX2EA?PK^M}@%1%A;?f6}s&CV$cIyEr#q5;yHdNZ9h{| z-=dX+a5elJoDo?Eq&Og!nN6A)5yYpnGEp}?=!C-V)(*~z-+?kY1Q7qs#Rsy%hu_60rdbB+QQNr?S1 z?;xtjUv|*E3}HmuNyB9aFL5H~3Ho0UsmuMZELp1a#CA1g`P{-mT?BchuLEtK}!QZ=3AWakRu~?f9V~3F;TV`5%9Pcs_$gq&CcU}r8gOO zC2&SWPsSG{&o-LIGTBqp6SLQZPvYKp$$7L4WRRZ0BR$Kf0I0SCFkqveCp@f)o8W)! z$%7D1R`&j7W9Q9CGus_)b%+B#J2G;l*FLz#s$hw{BHS~WNLODV#(!u_2Pe&tMsq={ zdm7>_WecWF#D=?eMjLj=-_z`aHMZ=3_-&E8;ibPmM}61i6J3is*=dKf%HC>=xbj4$ zS|Q-hWQ8T5mWde6h@;mS+?k=89?1FU<%qH9B(l&O>k|u_aD|DY*@~(`_pb|B#rJ&g zR0(~(68fpUPz6TdS@4JT5MOPrqDh5_H(eX1$P2SQrkvN8sTxwV>l0)Qq z0pzTuvtEAKRDkKGhhv^jk%|HQ1DdF%5oKq5BS>szk-CIke{%js?~%@$uaN3^Uz6Wf z_iyx{bZ(;9y4X&>LPV=L=d+A}7I4GkK0c1Xts{rrW1Q7apHf-))`BgC^0^F(>At1* za@e7{lq%yAkn*NH8Q1{@{lKhRg*^TfGvv!Sn*ed*x@6>M%aaqySxR|oNadYt1mpUZ z6H(rupHYf&Z z29$5g#|0MX#aR6TZ$@eGxxABRKakDYtD%5BmKp;HbG_ZbT+=81E&=XRk6m_3t9PvD zr5Cqy(v?gHcYvYvXkNH@S#Po~q(_7MOuCAB8G$a9BC##gw^5mW16cML=T=ERL7wsk zzNEayTG?mtB=x*wc@ifBCJ|irFVMOvH)AFRW8WE~U()QT=HBCe@s$dA9O!@`zAAT) zaOZ7l6vyR+Nk_OOF!ZlZmjoImKh)dxFbbR~z(cMhfeX1l7S_`;h|v3gI}n9$sSQ>+3@AFAy9=B_y$)q;Wdl|C-X|VV3w8 z2S#>|5dGA8^9%Bu&fhmVRrTX>Z7{~3V&0UpJNEl0=N32euvDGCJ>#6dUSi&PxFW*s zS`}TB>?}H(T2lxBJ!V#2taV;q%zd6fOr=SGHpoSG*4PDaiG0pdb5`jelVipkEk%FV zThLc@Hc_AL1#D&T4D=w@UezYNJ%0=f3iVRuVL5H?eeZM}4W*bomebEU@e2d`M<~uW zf#Bugwf`VezG|^Qbt6R_=U0}|=k;mIIakz99*>FrsQR{0aQRP6ko?5<7bkDN8evZ& zB@_KqQG?ErKL=1*ZM9_5?Pq%lcS4uLSzN(Mr5=t6xHLS~Ym`UgM@D&VNu8e?_=nSFtF$u@hpPSmI4Vo_t&v?>$~K4y(O~Rb*(MFy_igM7 z*~yYUyR6yQgzWnWMUgDov!!g=lInM+=lOmOk4L`O?{i&qxy&D*_qorRbDwj6?)!ef z#JLd7F6Z2I$S0iYI={rZNk*<{HtIl^mx=h>Cim*04K4+Z4IJtd*-)%6XV2(MCscPiw_a+y*?BKbTS@BZ3AUao^%Zi#PhoY9Vib4N>SE%4>=Jco0v zH_Miey{E;FkdlZSq)e<{`+S3W=*ttvD#hB8w=|2aV*D=yOV}(&p%0LbEWH$&@$X3x~CiF-?ejQ*N+-M zc8zT@3iwkdRT2t(XS`d7`tJQAjRmKAhiw{WOqpuvFp`i@Q@!KMhwKgsA}%@sw8Xo5Y=F zhRJZg)O4uqNWj?V&&vth*H#je6T}}p_<>!Dr#89q@uSjWv~JuW(>FqoJ5^ho0%K?E z9?x_Q;kmcsQ@5=}z@tdljMSt9-Z3xn$k)kEjK|qXS>EfuDmu(Z8|(W?gY6-l z@R_#M8=vxKMAoi&PwnaIYw2COJM@atcgfr=zK1bvjW?9B`-+Voe$Q+H$j!1$Tjn+* z&LY<%)L@;zhnJlB^Og6I&BOR-m?{IW;tyYC%FZ!&Z>kGjHJ6cqM-F z&19n+e1=9AH1VrVeHrIzqlC`w9=*zfmrerF?JMzO&|Mmv;!4DKc(sp+jy^Dx?(8>1 zH&yS_4yL7m&GWX~mdfgH*AB4{CKo;+egw=PrvkTaoBU+P-4u?E|&!c z)DKc;>$$B6u*Zr1SjUh2)FeuWLWHl5TH(UHWkf zLs>7px!c5n;rbe^lO@qlYLzlDVp(z?6rPZel=YB)Uv&n!2{+Mb$-vQl=xKw( zve&>xYx+jW_NJh!FV||r?;hdP*jOXYcLCp>DOtJ?2S^)DkM{{Eb zS$!L$e_o0(^}n3tA1R3-$SNvgBq;DOEo}fNc|tB%%#g4RA3{|euq)p+xd3I8^4E&m zFrD%}nvG^HUAIKe9_{tXB;tl|G<%>yk6R;8L2)KUJw4yHJXUOPM>(-+jxq4R;z8H#>rnJy*)8N+$wA$^F zN+H*3t)eFEgxLw+Nw3};4WV$qj&_D`%ADV2%r zJCPCo%{=z7;`F98(us5JnT(G@sKTZ^;2FVitXyLe-S5(hV&Ium+1pIUB(CZ#h|g)u zSLJJ<@HgrDiA-}V_6B^x1>c9B6%~847JkQ!^KLZ2skm;q*edo;UA)~?SghG8;QbHh z_6M;ouo_1rq9=x$<`Y@EA{C%6-pEV}B(1#sDoe_e1s3^Y>n#1Sw;N|}8D|s|VPd+g z-_$QhCz`vLxxrVMx3ape1xu3*wjx=yKSlM~nFgkNWb4?DDr*!?U)L_VeffF<+!j|b zZ$Wn2$TDv3C3V@BHpSgv3JUif8%hk%OsGZ=OxH@8&4`bbf$`aAMchl^qN>Eyu3JH} z9-S!x8-s4fE=lad%Pkp8hAs~u?|uRnL48O|;*DEU! zuS0{cpk%1E0nc__2%;apFsTm0bKtd&A0~S3Cj^?72-*Owk3V!ZG*PswDfS~}2<8le z5+W^`Y(&R)yVF*tU_s!XMcJS`;(Tr`J0%>p=Z&InR%D3@KEzzI+-2)HK zuoNZ&o=wUC&+*?ofPb0a(E6(<2Amd6%uSu_^-<1?hsxs~0K5^f(LsGqgEF^+0_H=uNk9S0bb!|O8d?m5gQjUKevPaO+*VfSn^2892K~%crWM8+6 z25@V?Y@J<9w%@NXh-2!}SK_(X)O4AM1-WTg>sj1{lj5@=q&dxE^9xng1_z9w9DK>| z6Iybcd0e zyi;Ew!KBRIfGPGytQ6}z}MeXCfLY0?9%RiyagSp_D1?N&c{ zyo>VbJ4Gy`@Fv+5cKgUgs~na$>BV{*em7PU3%lloy_aEovR+J7TfQKh8BJXyL6|P8un-Jnq(ghd!_HEOh$zlv2$~y3krgeH;9zC}V3f`uDtW(%mT#944DQa~^8ZI+zAUu4U(j0YcDfKR$bK#gvn_{JZ>|gZ5+)u?T$w7Q%F^;!Wk?G z(le7r!ufT*cxS}PR6hIVtXa)i`d$-_1KkyBU>qmgz-=T};uxx&sKgv48akIWQ89F{ z0XiY?WM^~;|T8zBOr zs#zuOONzH?svv*jokd5SK8wG>+yMC)LYL|vLqm^PMHcT=`}V$=nIRHe2?h)8WQa6O zPAU}d`1y(>kZiP~Gr=mtJLMu`i<2CspL|q2DqAgAD^7*$xzM`PU4^ga`ilE134XBQ z99P(LhHU@7qvl9Yzg$M`+dlS=x^(m-_3t|h>S}E0bcFMn=C|KamQ)=w2^e)35p`zY zRV8X?d;s^>Cof2SPR&nP3E+-LCkS0J$H!eh8~k0qo$}00b=7!H_I2O+Ro@3O$nPdm ztmbOO^B+IHzQ5w>@@@J4cKw5&^_w6s!s=H%&byAbUtczPQ7}wfTqxxtQNfn*u73Qw zGuWsrky_ajPx-5`R<)6xHf>C(oqGf_Fw|-U*GfS?xLML$kv;h_pZ@Kk$y0X(S+K80 z6^|z)*`5VUkawg}=z`S;VhZhxyDfrE0$(PMurAxl~<>lfZa>JZ288ULK7D` zl9|#L^JL}Y$j*j`0-K6kH#?bRmg#5L3iB4Z)%iF@SqT+Lp|{i`m%R-|ZE94Np7Pa5 zCqC^V3}B(FR340pmF*qaa}M}+h6}mqE~7Sh!9bDv9YRT|>vBNAqv09zXHMlcuhKD| zcjjA(b*XCIwJ33?CB!+;{)vX@9xns_b-VO{i0y?}{!sdXj1GM8+$#v>W7nw;+O_9B z_{4L;C6ol?(?W0<6taGEn1^uG=?Q3i29sE`RfYCaV$3DKc_;?HsL?D_fSYg}SuO5U zOB_f4^vZ_x%o`5|C@9C5+o=mFy@au{s)sKw!UgC&L35aH(sgDxRE2De%(%OT=VUdN ziVLEmdOvJ&5*tCMKRyXctCwQu_RH%;m*$YK&m;jtbdH#Ak~13T1^f89tn`A%QEHWs~jnY~E}p_Z$XC z=?YXLCkzVSK+Id`xZYTegb@W8_baLt-Fq`Tv|=)JPbFsKRm)4UW;yT+J`<)%#ue9DPOkje)YF2fsCilK9MIIK>p*`fkoD5nGfmLwt)!KOT+> zOFq*VZktDDyM3P5UOg`~XL#cbzC}eL%qMB=Q5$d89MKuN#$6|4gx_Jt0Gfn8w&q}%lq4QU%6#jT*MRT% zrLz~C8FYKHawn-EQWN1B75O&quS+Z81(zN)G>~vN8VwC+e+y(`>HcxC{MrJ;H1Z4k zZWuv$w_F0-Ub%MVcpIc){4PGL^I7M{>;hS?;eH!;gmcOE66z3;Z1Phqo(t zVP(Hg6q#0gIKgsg7L7WE!{Y#1nI(45tx2{$34dDd#!Z0NIyrm)HOn5W#7;f4pQci# zDW!FI(g4e668kI9{2+mLwB+=#9bfqgX%!B34V-$wwSN(_cm*^{y0jQtv*4}eO^sOV z*9xoNvX)c9isB}Tgx&ZRjp3kwhTVK?r9;n!x>^XYT z@Q^7zp{rkIs{2mUSE^2!Gf6$6;j~&4=-0cSJJDizZp6LTe8b45;{AKM%v99}{{FfC zz709%u0mC=1KXTo(=TqmZQ;c?$M3z(!xah>aywrj40sc2y3rKFw4jCq+Y+u=CH@_V zxz|qeTwa>+<|H%8Dz5u>ZI5MmjTFwXS-Fv!TDd*`>3{krWoNVx$<133`(ftS?ZPyY z&4@ah^3^i`vL$BZa>O|Nt?ucewzsF)0zX3qmM^|waXr=T0pfIb0*$AwU=?Ipl|1Y; z*Pk6{C-p4MY;j@IJ|DW>QHZQJcp;Z~?8(Q+Kk3^0qJ}SCk^*n4W zu9ZFwLHUx-$6xvaQ)SUQcYd6fF8&x)V`1bIuX@>{mE$b|Yd(qomn3;bPwnDUc0F=; zh*6_((%bqAYQWQ~odER?h>1mkL4kpb3s7`0m@rDKGU*oyF)$j~Ffd4fXV$?`f~rHf zB%Y)@5SXZvfwm10RY5X?TEo)PK_`L6qgBp=#>fO49$D zDq8Ozj0q6213tV5Qq=;fZ0$|KroY{Dz=l@lU^J)?Ko@ti20TRplXzphBi>XGx4bou zEWrkNjz0t5j!_ke{g5I#PUlEU$Km8g8TE|XK=MkU@PT4T><2OVamoK;wJ}3X0L$vX zgd7gNa359*nc)R-0!`2X@FOTB`+oETOPc=ubp5R)VQgY+5BTZZJ2?9QwnO=dnulIUF3gFn;BODC2)65)HeVd%t86sL7Rv^Y+nbn+&l z6BAJY(ETvwI)Ts$aiE8rht4KD*qNyE{8{x6R|%akbTBzw;2+6Echkt+W+`u^XX z_z&x%n*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL diff --git a/clients/hydra/java/gradle/wrapper/gradle-wrapper.properties b/clients/hydra/java/gradle/wrapper/gradle-wrapper.properties index ffed3a254e9..b82aa23a4f0 100644 --- a/clients/hydra/java/gradle/wrapper/gradle-wrapper.properties +++ b/clients/hydra/java/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/clients/hydra/java/gradlew b/clients/hydra/java/gradlew index 005bcde0428..9d0ce634cb1 100644 --- a/clients/hydra/java/gradlew +++ b/clients/hydra/java/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -69,37 +69,35 @@ app_path=$0 # Need this for daisy-chained symlinks. while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] +APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path +[ -h "$app_path" ] do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac +ls=$( ls -ld "$app_path" ) +link=${ls#*' -> '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum warn () { - echo "$*" +echo "$*" } >&2 die () { - echo - echo "$*" - echo - exit 1 +echo +echo "$*" +echo +exit 1 } >&2 # OS specific support (must be 'true' or 'false'). @@ -108,10 +106,10 @@ msys=false darwin=false nonstop=false case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -119,39 +117,46 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi +fi else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi +fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac fi # Collect all arguments for the java command, stacking in reverse order: @@ -164,46 +169,56 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi # Use "xargs" to parse quoted args. # @@ -225,10 +240,10 @@ set -- \ # eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' exec "$JAVACMD" "$@" diff --git a/clients/hydra/java/gradlew.bat b/clients/hydra/java/gradlew.bat index 6a68175eb70..25da30dbdee 100644 --- a/clients/hydra/java/gradlew.bat +++ b/clients/hydra/java/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -33,20 +34,20 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/clients/hydra/java/pom.xml b/clients/hydra/java/pom.xml index ef220b95c82..570e8fef566 100644 --- a/clients/hydra/java/pom.xml +++ b/clients/hydra/java/pom.xml @@ -5,7 +5,6 @@ hydra-client jar hydra-client - 0.0.0-SNAPSHOT https://github.com/ory/hydra-client-java Java Client for Ory Hydra @@ -34,7 +33,7 @@ - + org.apache.maven.plugins maven-compiler-plugin 3.8.1 @@ -51,7 +50,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.4.1 enforce-maven @@ -71,22 +70,30 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 2.22.2 - + loggerPath conf/log4j.properties - + -Xms512m -Xmx1500m methods 10 + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + maven-dependency-plugin - 3.3.0 + 3.6.1 package @@ -117,7 +124,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.5.0 add_sources @@ -148,7 +155,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.6.3 attach-javadocs @@ -171,7 +178,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 attach-sources @@ -215,7 +222,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.13 true ossrh @@ -230,42 +237,42 @@ Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven --> - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + - - - 1.8 - - true - + + + 1.8 + + true + - - + + - - + + @@ -278,7 +285,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.1 sign-artifacts @@ -334,11 +341,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -409,31 +411,23 @@ ${junit-platform-runner.version} test - - org.mockito - mockito-core - ${mockito-core-version} - test - 1.8 ${java.version} ${java.version} - 1.8.5 - 1.6.5 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.4 + 1.9.0 + 4.11.0 + 2.10.1 + 3.14.0 + 0.2.6 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 + 5.10.2 + 1.10.0 2.1.1 1.1.1 UTF-8 - 2.27.2 + 2.43.0 diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiCallback.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiCallback.java index 96a3dfd5d91..e6ce4738309 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiCallback.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiCallback.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiClient.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiClient.java index 846e95435f6..f7f85fddb5a 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiClient.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiClient.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,6 +49,7 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -66,6 +67,15 @@ public class ApiClient { private String basePath = "http://localhost"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); private Map defaultCookieMap = new HashMap(); @@ -208,7 +218,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/v2.2.0/java"); + setUserAgent("OpenAPI-Generator/v2.2.1/java"); authentications = new HashMap(); } @@ -230,6 +240,34 @@ public String getBasePath() { */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; return this; } @@ -424,14 +462,23 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } - /** - * Helper method to set access token for the first Bearer authentication. - * @param bearerToken Bearer token - */ + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBearerAuth) { - ((HttpBearerAuth) auth).setBearerToken(bearerToken); + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); return; } } @@ -513,6 +560,31 @@ public void setAccessToken(String accessToken) { throw new RuntimeException("No OAuth2 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * @@ -1229,12 +1301,15 @@ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List if (baseUrl != null) { url.append(baseUrl).append(path); } else { - url.append(basePath).append(path); + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); } if (queryParams != null && !queryParams.isEmpty()) { diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiException.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiException.java index 2bbd62ebef4..0addbc8d34e 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiException.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiException.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,18 +16,19 @@ import java.util.Map; import java.util.List; -import javax.ws.rs.core.GenericType; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - + /** *

Constructor for ApiException.

*/ @@ -99,7 +100,7 @@ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiResponse.java index 722414e3a59..eee09fb333b 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ApiResponse.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ApiResponse.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/Configuration.java b/clients/hydra/java/src/main/java/sh/ory/hydra/Configuration.java index ff160c18127..89f3d998638 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/Configuration.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/Configuration.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,10 @@ package sh.ory.hydra; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Configuration { + public static final String VERSION = "v2.2.1"; + private static ApiClient defaultApiClient = new ApiClient(); /** diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/GzipRequestInterceptor.java b/clients/hydra/java/src/main/java/sh/ory/hydra/GzipRequestInterceptor.java index f539bacf3ac..0c8d382c085 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/GzipRequestInterceptor.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/JSON.java b/clients/hydra/java/src/main/java/sh/ory/hydra/JSON.java index 15393aa5ffe..d3489e337af 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/JSON.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/JSON.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -86,7 +86,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - { + static { GsonBuilder gsonBuilder = createGson(); gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/Pair.java b/clients/hydra/java/src/main/java/sh/ory/hydra/Pair.java index 76daeff3751..45c089ac09b 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/Pair.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/Pair.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package sh.ory.hydra; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Pair { private String name = ""; private String value = ""; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressRequestBody.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressRequestBody.java index d7033324dad..09e72b87075 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressRequestBody.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressResponseBody.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressResponseBody.java index 3538d80fc5a..a3aa14d2d17 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressResponseBody.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ServerConfiguration.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ServerConfiguration.java index 5421d9b3b36..35f42be6e32 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ServerConfiguration.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ServerConfiguration.java @@ -5,6 +5,7 @@ /** * Representing a Server configuration. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ServerConfiguration { public String URL; public String description; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/ServerVariable.java b/clients/hydra/java/src/main/java/sh/ory/hydra/ServerVariable.java index 5a85721ff94..e178dbfcbdd 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/ServerVariable.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/ServerVariable.java @@ -5,6 +5,7 @@ /** * Representing a Server Variable for server URL template substitution. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/StringUtil.java b/clients/hydra/java/src/main/java/sh/ory/hydra/StringUtil.java index 3ec770420d9..04f33a0fd6f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/StringUtil.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/StringUtil.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java index 335be974515..c2970308bd2 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class JwkApi { private ApiClient localVarApiClient; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/MetadataApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/MetadataApi.java index 0cd2fc36038..fbe26feeaaf 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/MetadataApi.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/MetadataApi.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MetadataApi { private ApiClient localVarApiClient; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java index 3263184f55f..4380282fad2 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class OAuth2Api { private ApiClient localVarApiClient; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java index 20ab7220b57..f563f797fd9 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class OidcApi { private ApiClient localVarApiClient; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java index c86426df85e..949d560fed2 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35,7 +35,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class WellknownApi { private ApiClient localVarApiClient; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/ApiKeyAuth.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/ApiKeyAuth.java index ede3538f2d9..428ab9de964 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/ApiKeyAuth.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/Authentication.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/Authentication.java index 43d341369a8..2516b66687c 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/Authentication.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/Authentication.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBasicAuth.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBasicAuth.java index 8d7bf3628e2..441cb01e5c2 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBasicAuth.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,8 +22,6 @@ import java.util.Map; import java.util.List; -import java.io.UnsupportedEncodingException; - public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBearerAuth.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBearerAuth.java index 2badaaf909c..c92da6e52b5 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBearerAuth.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,13 +17,15 @@ import sh.ory.hydra.Pair; import java.net.URI; -import java.util.Map; import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class HttpBearerAuth implements Authentication { private final String scheme; - private String bearerToken; + private Supplier tokenSupplier; public HttpBearerAuth(String scheme) { this.scheme = scheme; @@ -35,7 +37,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return bearerToken; + return tokenSupplier.get(); } /** @@ -44,12 +46,22 @@ public String getBearerToken() { * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); if (bearerToken == null) { return; } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuth.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuth.java index 44f170d8d1a..6351c59fc73 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuth.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuth.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth implements Authentication { private String accessToken; diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuthFlow.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuthFlow.java index 6529b2ad99d..fcba975eddb 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuthFlow.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ /** * OAuth flows that are supported by this client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public enum OAuthFlow { ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 IMPLICIT, diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java index 3dcd99ace48..6b726337503 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,14 +17,11 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -import javax.ws.rs.core.GenericType; - -//import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -46,7 +43,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map getSchemas(); + public abstract Map> getSchemas(); /** * Get the actual instance diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java index 9ec54976d16..f9b30e66602 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,17 +14,15 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; @@ -39,13 +37,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -53,7 +54,7 @@ /** * AcceptOAuth2ConsentRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AcceptOAuth2ConsentRequest { public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -61,11 +62,11 @@ public class AcceptOAuth2ConsentRequest { public static final String SERIALIZED_NAME_GRANT_ACCESS_TOKEN_AUDIENCE = "grant_access_token_audience"; @SerializedName(SERIALIZED_NAME_GRANT_ACCESS_TOKEN_AUDIENCE) - private List grantAccessTokenAudience = null; + private List grantAccessTokenAudience = new ArrayList<>(); public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) - private List grantScope = null; + private List grantScope = new ArrayList<>(); public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; @SerializedName(SERIALIZED_NAME_HANDLED_AT) @@ -87,30 +88,25 @@ public AcceptOAuth2ConsentRequest() { } public AcceptOAuth2ConsentRequest context(Object context) { - this.context = context; return this; } - /** + /** * Get context * @return context - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getContext() { return context; } - public void setContext(Object context) { this.context = context; } public AcceptOAuth2ConsentRequest grantAccessTokenAudience(List grantAccessTokenAudience) { - this.grantAccessTokenAudience = grantAccessTokenAudience; return this; } @@ -123,25 +119,21 @@ public AcceptOAuth2ConsentRequest addGrantAccessTokenAudienceItem(String grantAc return this; } - /** + /** * Get grantAccessTokenAudience * @return grantAccessTokenAudience - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGrantAccessTokenAudience() { return grantAccessTokenAudience; } - public void setGrantAccessTokenAudience(List grantAccessTokenAudience) { this.grantAccessTokenAudience = grantAccessTokenAudience; } public AcceptOAuth2ConsentRequest grantScope(List grantScope) { - this.grantScope = grantScope; return this; } @@ -154,110 +146,91 @@ public AcceptOAuth2ConsentRequest addGrantScopeItem(String grantScopeItem) { return this; } - /** + /** * Get grantScope * @return grantScope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGrantScope() { return grantScope; } - public void setGrantScope(List grantScope) { this.grantScope = grantScope; } public AcceptOAuth2ConsentRequest handledAt(OffsetDateTime handledAt) { - this.handledAt = handledAt; return this; } - /** + /** * Get handledAt * @return handledAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getHandledAt() { return handledAt; } - public void setHandledAt(OffsetDateTime handledAt) { this.handledAt = handledAt; } public AcceptOAuth2ConsentRequest remember(Boolean remember) { - this.remember = remember; return this; } - /** + /** * Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. * @return remember - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.") - public Boolean getRemember() { return remember; } - public void setRemember(Boolean remember) { this.remember = remember; } public AcceptOAuth2ConsentRequest rememberFor(Long rememberFor) { - this.rememberFor = rememberFor; return this; } - /** + /** * RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. * @return rememberFor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.") - public Long getRememberFor() { return rememberFor; } - public void setRememberFor(Long rememberFor) { this.rememberFor = rememberFor; } public AcceptOAuth2ConsentRequest session(AcceptOAuth2ConsentRequestSession session) { - this.session = session; return this; } - /** + /** * Get session * @return session - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public AcceptOAuth2ConsentRequestSession getSession() { return session; } - public void setSession(AcceptOAuth2ConsentRequestSession session) { this.session = session; } @@ -389,29 +362,30 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AcceptOAuth2ConsentRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AcceptOAuth2ConsentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AcceptOAuth2ConsentRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AcceptOAuth2ConsentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2ConsentRequest is not found in the empty JSON string", AcceptOAuth2ConsentRequest.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("grant_access_token_audience") != null && !jsonObj.get("grant_access_token_audience").isJsonArray()) { + if (jsonObj.get("grant_access_token_audience") != null && !jsonObj.get("grant_access_token_audience").isJsonNull() && !jsonObj.get("grant_access_token_audience").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_access_token_audience` to be an array in the JSON string but got `%s`", jsonObj.get("grant_access_token_audience").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("grant_scope") != null && !jsonObj.get("grant_scope").isJsonArray()) { + if (jsonObj.get("grant_scope") != null && !jsonObj.get("grant_scope").isJsonNull() && !jsonObj.get("grant_scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_scope` to be an array in the JSON string but got `%s`", jsonObj.get("grant_scope").toString())); } // validate the optional field `session` if (jsonObj.get("session") != null && !jsonObj.get("session").isJsonNull()) { - AcceptOAuth2ConsentRequestSession.validateJsonObject(jsonObj.getAsJsonObject("session")); + AcceptOAuth2ConsentRequestSession.validateJsonElement(jsonObj.get("session")); } } @@ -431,7 +405,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AcceptOAuth2ConsentRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -443,7 +417,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -452,8 +431,9 @@ else if (entry.getValue() instanceof Character) @Override public AcceptOAuth2ConsentRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance AcceptOAuth2ConsentRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -481,22 +461,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of AcceptOAuth2ConsentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AcceptOAuth2ConsentRequest - * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2ConsentRequest - */ + /** + * Create an instance of AcceptOAuth2ConsentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AcceptOAuth2ConsentRequest + * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2ConsentRequest + */ public static AcceptOAuth2ConsentRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AcceptOAuth2ConsentRequest.class); } - /** - * Convert an instance of AcceptOAuth2ConsentRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AcceptOAuth2ConsentRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java index 1d7e890d676..022e90c111f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -49,7 +50,7 @@ /** * AcceptOAuth2ConsentRequestSession */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AcceptOAuth2ConsentRequestSession { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) @@ -63,46 +64,38 @@ public AcceptOAuth2ConsentRequestSession() { } public AcceptOAuth2ConsentRequestSession accessToken(Object accessToken) { - this.accessToken = accessToken; return this; } - /** + /** * AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! * @return accessToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!") - public Object getAccessToken() { return accessToken; } - public void setAccessToken(Object accessToken) { this.accessToken = accessToken; } public AcceptOAuth2ConsentRequestSession idToken(Object idToken) { - this.idToken = idToken; return this; } - /** + /** * IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! * @return idToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care!") - public Object getIdToken() { return idToken; } - public void setIdToken(Object idToken) { this.idToken = idToken; } @@ -219,18 +212,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AcceptOAuth2ConsentRequestSession - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AcceptOAuth2ConsentRequestSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AcceptOAuth2ConsentRequestSession + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AcceptOAuth2ConsentRequestSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2ConsentRequestSession is not found in the empty JSON string", AcceptOAuth2ConsentRequestSession.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -249,7 +243,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AcceptOAuth2ConsentRequestSession value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -261,7 +255,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -270,8 +269,9 @@ else if (entry.getValue() instanceof Character) @Override public AcceptOAuth2ConsentRequestSession read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance AcceptOAuth2ConsentRequestSession instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -299,22 +299,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of AcceptOAuth2ConsentRequestSession given an JSON string - * - * @param jsonString JSON string - * @return An instance of AcceptOAuth2ConsentRequestSession - * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2ConsentRequestSession - */ + /** + * Create an instance of AcceptOAuth2ConsentRequestSession given an JSON string + * + * @param jsonString JSON string + * @return An instance of AcceptOAuth2ConsentRequestSession + * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2ConsentRequestSession + */ public static AcceptOAuth2ConsentRequestSession fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AcceptOAuth2ConsentRequestSession.class); } - /** - * Convert an instance of AcceptOAuth2ConsentRequestSession to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AcceptOAuth2ConsentRequestSession to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java index 1f03b4323f3..3e645d12a1e 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,13 +35,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -51,7 +52,7 @@ /** * AcceptOAuth2LoginRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AcceptOAuth2LoginRequest { public static final String SERIALIZED_NAME_ACR = "acr"; @SerializedName(SERIALIZED_NAME_ACR) @@ -59,7 +60,7 @@ public class AcceptOAuth2LoginRequest { public static final String SERIALIZED_NAME_AMR = "amr"; @SerializedName(SERIALIZED_NAME_AMR) - private List amr = null; + private List amr = new ArrayList<>(); public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -93,30 +94,25 @@ public AcceptOAuth2LoginRequest() { } public AcceptOAuth2LoginRequest acr(String acr) { - this.acr = acr; return this; } - /** + /** * ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. * @return acr - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.") - public String getAcr() { return acr; } - public void setAcr(String acr) { this.acr = acr; } public AcceptOAuth2LoginRequest amr(List amr) { - this.amr = amr; return this; } @@ -129,179 +125,148 @@ public AcceptOAuth2LoginRequest addAmrItem(String amrItem) { return this; } - /** + /** * Get amr * @return amr - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getAmr() { return amr; } - public void setAmr(List amr) { this.amr = amr; } public AcceptOAuth2LoginRequest context(Object context) { - this.context = context; return this; } - /** + /** * Get context * @return context - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getContext() { return context; } - public void setContext(Object context) { this.context = context; } public AcceptOAuth2LoginRequest extendSessionLifespan(Boolean extendSessionLifespan) { - this.extendSessionLifespan = extendSessionLifespan; return this; } - /** + /** * Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. * @return extendSessionLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.") - public Boolean getExtendSessionLifespan() { return extendSessionLifespan; } - public void setExtendSessionLifespan(Boolean extendSessionLifespan) { this.extendSessionLifespan = extendSessionLifespan; } public AcceptOAuth2LoginRequest forceSubjectIdentifier(String forceSubjectIdentifier) { - this.forceSubjectIdentifier = forceSubjectIdentifier; return this; } - /** + /** * ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. * @return forceSubjectIdentifier - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.") - public String getForceSubjectIdentifier() { return forceSubjectIdentifier; } - public void setForceSubjectIdentifier(String forceSubjectIdentifier) { this.forceSubjectIdentifier = forceSubjectIdentifier; } public AcceptOAuth2LoginRequest identityProviderSessionId(String identityProviderSessionId) { - this.identityProviderSessionId = identityProviderSessionId; return this; } - /** + /** * IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout. * @return identityProviderSessionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.") - public String getIdentityProviderSessionId() { return identityProviderSessionId; } - public void setIdentityProviderSessionId(String identityProviderSessionId) { this.identityProviderSessionId = identityProviderSessionId; } public AcceptOAuth2LoginRequest remember(Boolean remember) { - this.remember = remember; return this; } - /** + /** * Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again. * @return remember - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.") - public Boolean getRemember() { return remember; } - public void setRemember(Boolean remember) { this.remember = remember; } public AcceptOAuth2LoginRequest rememberFor(Long rememberFor) { - this.rememberFor = rememberFor; return this; } - /** + /** * RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie). * @return rememberFor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).") - public Long getRememberFor() { return rememberFor; } - public void setRememberFor(Long rememberFor) { this.rememberFor = rememberFor; } public AcceptOAuth2LoginRequest subject(String subject) { - this.subject = subject; return this; } - /** + /** * Subject is the user ID of the end-user that authenticated. * @return subject - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Subject is the user ID of the end-user that authenticated.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -440,30 +405,31 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("subject"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AcceptOAuth2LoginRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AcceptOAuth2LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AcceptOAuth2LoginRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AcceptOAuth2LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2LoginRequest is not found in the empty JSON string", AcceptOAuth2LoginRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AcceptOAuth2LoginRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("acr") != null && !jsonObj.get("acr").isJsonNull()) && !jsonObj.get("acr").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `acr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acr").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("amr") != null && !jsonObj.get("amr").isJsonArray()) { + if (jsonObj.get("amr") != null && !jsonObj.get("amr").isJsonNull() && !jsonObj.get("amr").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `amr` to be an array in the JSON string but got `%s`", jsonObj.get("amr").toString())); } if ((jsonObj.get("force_subject_identifier") != null && !jsonObj.get("force_subject_identifier").isJsonNull()) && !jsonObj.get("force_subject_identifier").isJsonPrimitive()) { @@ -493,7 +459,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, AcceptOAuth2LoginRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -505,7 +471,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -514,8 +485,9 @@ else if (entry.getValue() instanceof Character) @Override public AcceptOAuth2LoginRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance AcceptOAuth2LoginRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -543,22 +515,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of AcceptOAuth2LoginRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AcceptOAuth2LoginRequest - * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2LoginRequest - */ + /** + * Create an instance of AcceptOAuth2LoginRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AcceptOAuth2LoginRequest + * @throws IOException if the JSON string is invalid with respect to AcceptOAuth2LoginRequest + */ public static AcceptOAuth2LoginRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AcceptOAuth2LoginRequest.class); } - /** - * Convert an instance of AcceptOAuth2LoginRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AcceptOAuth2LoginRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java index 04cfbf18f4f..e11b07bd63d 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * Create JSON Web Key Set Request Body */ -@ApiModel(description = "Create JSON Web Key Set Request Body") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateJsonWebKeySet { public static final String SERIALIZED_NAME_ALG = "alg"; @SerializedName(SERIALIZED_NAME_ALG) @@ -67,69 +67,57 @@ public CreateJsonWebKeySet() { } public CreateJsonWebKeySet alg(String alg) { - this.alg = alg; return this; } - /** + /** * JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. * @return alg - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.") - public String getAlg() { return alg; } - public void setAlg(String alg) { this.alg = alg; } public CreateJsonWebKeySet kid(String kid) { - this.kid = kid; return this; } - /** + /** * JSON Web Key ID The Key ID of the key to be created. * @return kid - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "JSON Web Key ID The Key ID of the key to be created.") - public String getKid() { return kid; } - public void setKid(String kid) { this.kid = kid; } public CreateJsonWebKeySet use(String use) { - this.use = use; return this; } - /** + /** * JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". * @return use - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\".") - public String getUse() { return use; } - public void setUse(String use) { this.use = use; } @@ -241,25 +229,26 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("use"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateJsonWebKeySet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateJsonWebKeySet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateJsonWebKeySet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateJsonWebKeySet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateJsonWebKeySet is not found in the empty JSON string", CreateJsonWebKeySet.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateJsonWebKeySet.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("alg").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `alg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("alg").toString())); } @@ -287,7 +276,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CreateJsonWebKeySet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -299,7 +288,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -308,8 +302,9 @@ else if (entry.getValue() instanceof Character) @Override public CreateJsonWebKeySet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance CreateJsonWebKeySet instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -337,22 +332,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of CreateJsonWebKeySet given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateJsonWebKeySet - * @throws IOException if the JSON string is invalid with respect to CreateJsonWebKeySet - */ + /** + * Create an instance of CreateJsonWebKeySet given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateJsonWebKeySet + * @throws IOException if the JSON string is invalid with respect to CreateJsonWebKeySet + */ public static CreateJsonWebKeySet fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateJsonWebKeySet.class); } - /** - * Convert an instance of CreateJsonWebKeySet to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateJsonWebKeySet to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBody.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBody.java index 59d1b7fe954..64aa20dc04f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBody.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBody.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.VerifiableCredentialProof; @@ -37,13 +35,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -51,7 +52,7 @@ /** * CreateVerifiableCredentialRequestBody */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateVerifiableCredentialRequestBody { public static final String SERIALIZED_NAME_FORMAT = "format"; @SerializedName(SERIALIZED_NAME_FORMAT) @@ -63,59 +64,50 @@ public class CreateVerifiableCredentialRequestBody { public static final String SERIALIZED_NAME_TYPES = "types"; @SerializedName(SERIALIZED_NAME_TYPES) - private List types = null; + private List types = new ArrayList<>(); public CreateVerifiableCredentialRequestBody() { } public CreateVerifiableCredentialRequestBody format(String format) { - this.format = format; return this; } - /** + /** * Get format * @return format - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } public CreateVerifiableCredentialRequestBody proof(VerifiableCredentialProof proof) { - this.proof = proof; return this; } - /** + /** * Get proof * @return proof - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public VerifiableCredentialProof getProof() { return proof; } - public void setProof(VerifiableCredentialProof proof) { this.proof = proof; } public CreateVerifiableCredentialRequestBody types(List types) { - this.types = types; return this; } @@ -128,18 +120,15 @@ public CreateVerifiableCredentialRequestBody addTypesItem(String typesItem) { return this; } - /** + /** * Get types * @return types - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTypes() { return types; } - public void setTypes(List types) { this.types = types; } @@ -248,27 +237,28 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateVerifiableCredentialRequestBody - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateVerifiableCredentialRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateVerifiableCredentialRequestBody + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateVerifiableCredentialRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateVerifiableCredentialRequestBody is not found in the empty JSON string", CreateVerifiableCredentialRequestBody.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); } // validate the optional field `proof` if (jsonObj.get("proof") != null && !jsonObj.get("proof").isJsonNull()) { - VerifiableCredentialProof.validateJsonObject(jsonObj.getAsJsonObject("proof")); + VerifiableCredentialProof.validateJsonElement(jsonObj.get("proof")); } // ensure the optional json data is an array if present - if (jsonObj.get("types") != null && !jsonObj.get("types").isJsonArray()) { + if (jsonObj.get("types") != null && !jsonObj.get("types").isJsonNull() && !jsonObj.get("types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `types` to be an array in the JSON string but got `%s`", jsonObj.get("types").toString())); } } @@ -289,7 +279,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CreateVerifiableCredentialRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -301,7 +291,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -310,8 +305,9 @@ else if (entry.getValue() instanceof Character) @Override public CreateVerifiableCredentialRequestBody read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance CreateVerifiableCredentialRequestBody instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -339,22 +335,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of CreateVerifiableCredentialRequestBody given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateVerifiableCredentialRequestBody - * @throws IOException if the JSON string is invalid with respect to CreateVerifiableCredentialRequestBody - */ + /** + * Create an instance of CreateVerifiableCredentialRequestBody given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateVerifiableCredentialRequestBody + * @throws IOException if the JSON string is invalid with respect to CreateVerifiableCredentialRequestBody + */ public static CreateVerifiableCredentialRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateVerifiableCredentialRequestBody.class); } - /** - * Convert an instance of CreateVerifiableCredentialRequestBody to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateVerifiableCredentialRequestBody to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CredentialSupportedDraft00.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CredentialSupportedDraft00.java index 7dacef50c69..fe2ac54762e 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CredentialSupportedDraft00.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CredentialSupportedDraft00.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -50,16 +51,15 @@ /** * Includes information about the supported verifiable credentials. */ -@ApiModel(description = "Includes information about the supported verifiable credentials.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CredentialSupportedDraft00 { public static final String SERIALIZED_NAME_CRYPTOGRAPHIC_BINDING_METHODS_SUPPORTED = "cryptographic_binding_methods_supported"; @SerializedName(SERIALIZED_NAME_CRYPTOGRAPHIC_BINDING_METHODS_SUPPORTED) - private List cryptographicBindingMethodsSupported = null; + private List cryptographicBindingMethodsSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_CRYPTOGRAPHIC_SUITES_SUPPORTED = "cryptographic_suites_supported"; @SerializedName(SERIALIZED_NAME_CRYPTOGRAPHIC_SUITES_SUPPORTED) - private List cryptographicSuitesSupported = null; + private List cryptographicSuitesSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_FORMAT = "format"; @SerializedName(SERIALIZED_NAME_FORMAT) @@ -67,13 +67,12 @@ public class CredentialSupportedDraft00 { public static final String SERIALIZED_NAME_TYPES = "types"; @SerializedName(SERIALIZED_NAME_TYPES) - private List types = null; + private List types = new ArrayList<>(); public CredentialSupportedDraft00() { } public CredentialSupportedDraft00 cryptographicBindingMethodsSupported(List cryptographicBindingMethodsSupported) { - this.cryptographicBindingMethodsSupported = cryptographicBindingMethodsSupported; return this; } @@ -86,25 +85,21 @@ public CredentialSupportedDraft00 addCryptographicBindingMethodsSupportedItem(St return this; } - /** + /** * OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. * @return cryptographicBindingMethodsSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.") - public List getCryptographicBindingMethodsSupported() { return cryptographicBindingMethodsSupported; } - public void setCryptographicBindingMethodsSupported(List cryptographicBindingMethodsSupported) { this.cryptographicBindingMethodsSupported = cryptographicBindingMethodsSupported; } public CredentialSupportedDraft00 cryptographicSuitesSupported(List cryptographicSuitesSupported) { - this.cryptographicSuitesSupported = cryptographicSuitesSupported; return this; } @@ -117,48 +112,40 @@ public CredentialSupportedDraft00 addCryptographicSuitesSupportedItem(String cry return this; } - /** + /** * OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof. * @return cryptographicSuitesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.") - public List getCryptographicSuitesSupported() { return cryptographicSuitesSupported; } - public void setCryptographicSuitesSupported(List cryptographicSuitesSupported) { this.cryptographicSuitesSupported = cryptographicSuitesSupported; } public CredentialSupportedDraft00 format(String format) { - this.format = format; return this; } - /** + /** * OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server. * @return format - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.") - public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } public CredentialSupportedDraft00 types(List types) { - this.types = types; return this; } @@ -171,18 +158,15 @@ public CredentialSupportedDraft00 addTypesItem(String typesItem) { return this; } - /** + /** * OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported. * @return types - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.") - public List getTypes() { return types; } - public void setTypes(List types) { this.types = types; } @@ -294,31 +278,32 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CredentialSupportedDraft00 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CredentialSupportedDraft00.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CredentialSupportedDraft00 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CredentialSupportedDraft00.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CredentialSupportedDraft00 is not found in the empty JSON string", CredentialSupportedDraft00.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("cryptographic_binding_methods_supported") != null && !jsonObj.get("cryptographic_binding_methods_supported").isJsonArray()) { + if (jsonObj.get("cryptographic_binding_methods_supported") != null && !jsonObj.get("cryptographic_binding_methods_supported").isJsonNull() && !jsonObj.get("cryptographic_binding_methods_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `cryptographic_binding_methods_supported` to be an array in the JSON string but got `%s`", jsonObj.get("cryptographic_binding_methods_supported").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("cryptographic_suites_supported") != null && !jsonObj.get("cryptographic_suites_supported").isJsonArray()) { + if (jsonObj.get("cryptographic_suites_supported") != null && !jsonObj.get("cryptographic_suites_supported").isJsonNull() && !jsonObj.get("cryptographic_suites_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `cryptographic_suites_supported` to be an array in the JSON string but got `%s`", jsonObj.get("cryptographic_suites_supported").toString())); } if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("types") != null && !jsonObj.get("types").isJsonArray()) { + if (jsonObj.get("types") != null && !jsonObj.get("types").isJsonNull() && !jsonObj.get("types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `types` to be an array in the JSON string but got `%s`", jsonObj.get("types").toString())); } } @@ -339,7 +324,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, CredentialSupportedDraft00 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -351,7 +336,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -360,8 +350,9 @@ else if (entry.getValue() instanceof Character) @Override public CredentialSupportedDraft00 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance CredentialSupportedDraft00 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -389,22 +380,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of CredentialSupportedDraft00 given an JSON string - * - * @param jsonString JSON string - * @return An instance of CredentialSupportedDraft00 - * @throws IOException if the JSON string is invalid with respect to CredentialSupportedDraft00 - */ + /** + * Create an instance of CredentialSupportedDraft00 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CredentialSupportedDraft00 + * @throws IOException if the JSON string is invalid with respect to CredentialSupportedDraft00 + */ public static CredentialSupportedDraft00 fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CredentialSupportedDraft00.class); } - /** - * Convert an instance of CredentialSupportedDraft00 to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CredentialSupportedDraft00 to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java index b7cd64fdcae..d48863fef11 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * Error */ -@ApiModel(description = "Error") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ErrorOAuth2 { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -75,115 +75,95 @@ public ErrorOAuth2() { } public ErrorOAuth2 error(String error) { - this.error = error; return this; } - /** + /** * Error * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Error") - public String getError() { return error; } - public void setError(String error) { this.error = error; } public ErrorOAuth2 errorDebug(String errorDebug) { - this.errorDebug = errorDebug; return this; } - /** + /** * Error Debug Information Only available in dev mode. * @return errorDebug - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Error Debug Information Only available in dev mode.") - public String getErrorDebug() { return errorDebug; } - public void setErrorDebug(String errorDebug) { this.errorDebug = errorDebug; } public ErrorOAuth2 errorDescription(String errorDescription) { - this.errorDescription = errorDescription; return this; } - /** + /** * Error Description * @return errorDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Error Description") - public String getErrorDescription() { return errorDescription; } - public void setErrorDescription(String errorDescription) { this.errorDescription = errorDescription; } public ErrorOAuth2 errorHint(String errorHint) { - this.errorHint = errorHint; return this; } - /** + /** * Error Hint Helps the user identify the error cause. * @return errorHint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "The redirect URL is not allowed.", value = "Error Hint Helps the user identify the error cause.") - public String getErrorHint() { return errorHint; } - public void setErrorHint(String errorHint) { this.errorHint = errorHint; } public ErrorOAuth2 statusCode(Long statusCode) { - this.statusCode = statusCode; return this; } - /** + /** * HTTP Status Code * @return statusCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "401", value = "HTTP Status Code") - public Long getStatusCode() { return statusCode; } - public void setStatusCode(Long statusCode) { this.statusCode = statusCode; } @@ -298,18 +278,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ErrorOAuth2 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ErrorOAuth2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorOAuth2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorOAuth2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorOAuth2 is not found in the empty JSON string", ErrorOAuth2.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -340,7 +321,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, ErrorOAuth2 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -352,7 +333,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -361,8 +347,9 @@ else if (entry.getValue() instanceof Character) @Override public ErrorOAuth2 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance ErrorOAuth2 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -390,22 +377,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of ErrorOAuth2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ErrorOAuth2 - * @throws IOException if the JSON string is invalid with respect to ErrorOAuth2 - */ + /** + * Create an instance of ErrorOAuth2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorOAuth2 + * @throws IOException if the JSON string is invalid with respect to ErrorOAuth2 + */ public static ErrorOAuth2 fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ErrorOAuth2.class); } - /** - * Convert an instance of ErrorOAuth2 to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ErrorOAuth2 to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/GenericError.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/GenericError.java index f49b81d0cee..8142dbe94cf 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/GenericError.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/GenericError.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -49,7 +50,7 @@ /** * GenericError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class GenericError { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -87,184 +88,152 @@ public GenericError() { } public GenericError code(Long code) { - this.code = code; return this; } - /** + /** * The status code * @return code - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "404", value = "The status code") - public Long getCode() { return code; } - public void setCode(Long code) { this.code = code; } public GenericError debug(String debug) { - this.debug = debug; return this; } - /** + /** * Debug information This field is often not exposed to protect against leaking sensitive information. * @return debug - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "SQL field \"foo\" is not a bool.", value = "Debug information This field is often not exposed to protect against leaking sensitive information.") - public String getDebug() { return debug; } - public void setDebug(String debug) { this.debug = debug; } public GenericError details(Object details) { - this.details = details; return this; } - /** + /** * Further error details * @return details - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Further error details") - public Object getDetails() { return details; } - public void setDetails(Object details) { this.details = details; } public GenericError id(String id) { - this.id = id; return this; } - /** + /** * The error ID Useful when trying to identify various errors in application logic. * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The error ID Useful when trying to identify various errors in application logic.") - public String getId() { return id; } - public void setId(String id) { this.id = id; } public GenericError message(String message) { - this.message = message; return this; } - /** + /** * Error message The error's message. * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "The resource could not be found", required = true, value = "Error message The error's message.") - public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public GenericError reason(String reason) { - this.reason = reason; return this; } - /** + /** * A human-readable reason for the error * @return reason - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "User with ID 1234 does not exist.", value = "A human-readable reason for the error") - public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public GenericError request(String request) { - this.request = request; return this; } - /** + /** * The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. * @return request - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "d7ef54b1-ec15-46e6-bccb-524b82c035e6", value = "The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.") - public String getRequest() { return request; } - public void setRequest(String request) { this.request = request; } public GenericError status(String status) { - this.status = status; return this; } - /** + /** * The status description * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Not Found", value = "The status description") - public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } @@ -400,25 +369,26 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("message"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GenericError - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GenericError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GenericError + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GenericError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GenericError is not found in the empty JSON string", GenericError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GenericError.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("debug") != null && !jsonObj.get("debug").isJsonNull()) && !jsonObj.get("debug").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `debug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("debug").toString())); } @@ -455,7 +425,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, GenericError value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -467,7 +437,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -476,8 +451,9 @@ else if (entry.getValue() instanceof Character) @Override public GenericError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance GenericError instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -505,22 +481,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of GenericError given an JSON string - * - * @param jsonString JSON string - * @return An instance of GenericError - * @throws IOException if the JSON string is invalid with respect to GenericError - */ + /** + * Create an instance of GenericError given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericError + * @throws IOException if the JSON string is invalid with respect to GenericError + */ public static GenericError fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GenericError.class); } - /** - * Convert an instance of GenericError to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GenericError to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java index e270dac215b..3d30c1a9cec 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * GetVersion200Response */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class GetVersion200Response { public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) @@ -58,23 +59,19 @@ public GetVersion200Response() { } public GetVersion200Response version(String version) { - this.version = version; return this; } - /** + /** * The version of Ory Hydra. * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The version of Ory Hydra.") - public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -177,18 +174,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GetVersion200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GetVersion200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetVersion200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetVersion200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GetVersion200Response is not found in the empty JSON string", GetVersion200Response.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } @@ -210,7 +208,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, GetVersion200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -222,7 +220,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -231,8 +234,9 @@ else if (entry.getValue() instanceof Character) @Override public GetVersion200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance GetVersion200Response instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -260,22 +264,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of GetVersion200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetVersion200Response - * @throws IOException if the JSON string is invalid with respect to GetVersion200Response - */ + /** + * Create an instance of GetVersion200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetVersion200Response + * @throws IOException if the JSON string is invalid with respect to GetVersion200Response + */ public static GetVersion200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetVersion200Response.class); } - /** - * Convert an instance of GetVersion200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GetVersion200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthNotReadyStatus.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthNotReadyStatus.java index f767b1241e3..3470672dce2 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthNotReadyStatus.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthNotReadyStatus.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -36,13 +34,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -50,17 +51,16 @@ /** * HealthNotReadyStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class HealthNotReadyStatus { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private Map errors = null; + private Map errors = new HashMap<>(); public HealthNotReadyStatus() { } public HealthNotReadyStatus errors(Map errors) { - this.errors = errors; return this; } @@ -73,18 +73,15 @@ public HealthNotReadyStatus putErrorsItem(String key, String errorsItem) { return this; } - /** + /** * Errors contains a list of errors that caused the not ready status. * @return errors - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Errors contains a list of errors that caused the not ready status.") - public Map getErrors() { return errors; } - public void setErrors(Map errors) { this.errors = errors; } @@ -187,18 +184,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to HealthNotReadyStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!HealthNotReadyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HealthNotReadyStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HealthNotReadyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in HealthNotReadyStatus is not found in the empty JSON string", HealthNotReadyStatus.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -217,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, HealthNotReadyStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -229,7 +227,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -238,8 +241,9 @@ else if (entry.getValue() instanceof Character) @Override public HealthNotReadyStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance HealthNotReadyStatus instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -267,22 +271,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of HealthNotReadyStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of HealthNotReadyStatus - * @throws IOException if the JSON string is invalid with respect to HealthNotReadyStatus - */ + /** + * Create an instance of HealthNotReadyStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of HealthNotReadyStatus + * @throws IOException if the JSON string is invalid with respect to HealthNotReadyStatus + */ public static HealthNotReadyStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, HealthNotReadyStatus.class); } - /** - * Convert an instance of HealthNotReadyStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of HealthNotReadyStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthStatus.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthStatus.java index f14d5388851..4b8d8b6be98 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthStatus.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/HealthStatus.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * HealthStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class HealthStatus { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -58,23 +59,19 @@ public HealthStatus() { } public HealthStatus status(String status) { - this.status = status; return this; } - /** + /** * Status always contains \"ok\". * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Status always contains \"ok\".") - public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } @@ -177,18 +174,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to HealthStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!HealthStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to HealthStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!HealthStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in HealthStatus is not found in the empty JSON string", HealthStatus.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -210,7 +208,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, HealthStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -222,7 +220,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -231,8 +234,9 @@ else if (entry.getValue() instanceof Character) @Override public HealthStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance HealthStatus instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -260,22 +264,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of HealthStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of HealthStatus - * @throws IOException if the JSON string is invalid with respect to HealthStatus - */ + /** + * Create an instance of HealthStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of HealthStatus + * @throws IOException if the JSON string is invalid with respect to HealthStatus + */ public static HealthStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, HealthStatus.class); } - /** - * Convert an instance of HealthStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of HealthStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java index dbc1a8dfd97..df66de59ce0 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,8 +53,7 @@ /** * Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) */ -@ApiModel(description = "Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntrospectedOAuth2Token { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) @@ -61,7 +61,7 @@ public class IntrospectedOAuth2Token { public static final String SERIALIZED_NAME_AUD = "aud"; @SerializedName(SERIALIZED_NAME_AUD) - private List aud = null; + private List aud = new ArrayList<>(); public static final String SERIALIZED_NAME_CLIENT_ID = "client_id"; @SerializedName(SERIALIZED_NAME_CLIENT_ID) @@ -73,7 +73,7 @@ public class IntrospectedOAuth2Token { public static final String SERIALIZED_NAME_EXT = "ext"; @SerializedName(SERIALIZED_NAME_EXT) - private Map ext = null; + private Map ext = new HashMap<>(); public static final String SERIALIZED_NAME_IAT = "iat"; @SerializedName(SERIALIZED_NAME_IAT) @@ -115,30 +115,25 @@ public IntrospectedOAuth2Token() { } public IntrospectedOAuth2Token active(Boolean active) { - this.active = active; return this; } - /** + /** * Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). * @return active - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).") - public Boolean getActive() { return active; } - public void setActive(Boolean active) { this.active = active; } public IntrospectedOAuth2Token aud(List aud) { - this.aud = aud; return this; } @@ -151,71 +146,59 @@ public IntrospectedOAuth2Token addAudItem(String audItem) { return this; } - /** + /** * Audience contains a list of the token's intended audiences. * @return aud - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Audience contains a list of the token's intended audiences.") - public List getAud() { return aud; } - public void setAud(List aud) { this.aud = aud; } public IntrospectedOAuth2Token clientId(String clientId) { - this.clientId = clientId; return this; } - /** + /** * ID is aclient identifier for the OAuth 2.0 client that requested this token. * @return clientId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ID is aclient identifier for the OAuth 2.0 client that requested this token.") - public String getClientId() { return clientId; } - public void setClientId(String clientId) { this.clientId = clientId; } public IntrospectedOAuth2Token exp(Long exp) { - this.exp = exp; return this; } - /** + /** * Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. * @return exp - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.") - public Long getExp() { return exp; } - public void setExp(Long exp) { this.exp = exp; } public IntrospectedOAuth2Token ext(Map ext) { - this.ext = ext; return this; } @@ -228,225 +211,186 @@ public IntrospectedOAuth2Token putExtItem(String key, Object extItem) { return this; } - /** + /** * Extra is arbitrary data set by the session. * @return ext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Extra is arbitrary data set by the session.") - public Map getExt() { return ext; } - public void setExt(Map ext) { this.ext = ext; } public IntrospectedOAuth2Token iat(Long iat) { - this.iat = iat; return this; } - /** + /** * Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. * @return iat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.") - public Long getIat() { return iat; } - public void setIat(Long iat) { this.iat = iat; } public IntrospectedOAuth2Token iss(String iss) { - this.iss = iss; return this; } - /** + /** * IssuerURL is a string representing the issuer of this token * @return iss - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "IssuerURL is a string representing the issuer of this token") - public String getIss() { return iss; } - public void setIss(String iss) { this.iss = iss; } public IntrospectedOAuth2Token nbf(Long nbf) { - this.nbf = nbf; return this; } - /** + /** * NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before. * @return nbf - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.") - public Long getNbf() { return nbf; } - public void setNbf(Long nbf) { this.nbf = nbf; } public IntrospectedOAuth2Token obfuscatedSubject(String obfuscatedSubject) { - this.obfuscatedSubject = obfuscatedSubject; return this; } - /** + /** * ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued. * @return obfuscatedSubject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.") - public String getObfuscatedSubject() { return obfuscatedSubject; } - public void setObfuscatedSubject(String obfuscatedSubject) { this.obfuscatedSubject = obfuscatedSubject; } public IntrospectedOAuth2Token scope(String scope) { - this.scope = scope; return this; } - /** + /** * Scope is a JSON string containing a space-separated list of scopes associated with this token. * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Scope is a JSON string containing a space-separated list of scopes associated with this token.") - public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } public IntrospectedOAuth2Token sub(String sub) { - this.sub = sub; return this; } - /** + /** * Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. * @return sub - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.") - public String getSub() { return sub; } - public void setSub(String sub) { this.sub = sub; } public IntrospectedOAuth2Token tokenType(String tokenType) { - this.tokenType = tokenType; return this; } - /** + /** * TokenType is the introspected token's type, typically `Bearer`. * @return tokenType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "TokenType is the introspected token's type, typically `Bearer`.") - public String getTokenType() { return tokenType; } - public void setTokenType(String tokenType) { this.tokenType = tokenType; } public IntrospectedOAuth2Token tokenUse(String tokenUse) { - this.tokenUse = tokenUse; return this; } - /** + /** * TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. * @return tokenUse - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.") - public String getTokenUse() { return tokenUse; } - public void setTokenUse(String tokenUse) { this.tokenUse = tokenUse; } public IntrospectedOAuth2Token username(String username) { - this.username = username; return this; } - /** + /** * Username is a human-readable identifier for the resource owner who authorized this token. * @return username - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Username is a human-readable identifier for the resource owner who authorized this token.") - public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } @@ -589,27 +533,28 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("active"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to IntrospectedOAuth2Token - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!IntrospectedOAuth2Token.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to IntrospectedOAuth2Token + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IntrospectedOAuth2Token.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in IntrospectedOAuth2Token is not found in the empty JSON string", IntrospectedOAuth2Token.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : IntrospectedOAuth2Token.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("aud") != null && !jsonObj.get("aud").isJsonArray()) { + if (jsonObj.get("aud") != null && !jsonObj.get("aud").isJsonNull() && !jsonObj.get("aud").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `aud` to be an array in the JSON string but got `%s`", jsonObj.get("aud").toString())); } if ((jsonObj.get("client_id") != null && !jsonObj.get("client_id").isJsonNull()) && !jsonObj.get("client_id").isJsonPrimitive()) { @@ -654,7 +599,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IntrospectedOAuth2Token value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -666,7 +611,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -675,8 +625,9 @@ else if (entry.getValue() instanceof Character) @Override public IntrospectedOAuth2Token read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance IntrospectedOAuth2Token instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -704,22 +655,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of IntrospectedOAuth2Token given an JSON string - * - * @param jsonString JSON string - * @return An instance of IntrospectedOAuth2Token - * @throws IOException if the JSON string is invalid with respect to IntrospectedOAuth2Token - */ + /** + * Create an instance of IntrospectedOAuth2Token given an JSON string + * + * @param jsonString JSON string + * @return An instance of IntrospectedOAuth2Token + * @throws IOException if the JSON string is invalid with respect to IntrospectedOAuth2Token + */ public static IntrospectedOAuth2Token fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, IntrospectedOAuth2Token.class); } - /** - * Convert an instance of IntrospectedOAuth2Token to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of IntrospectedOAuth2Token to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java index 0f6b1246945..5260fec545d 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * IsReady200Response */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IsReady200Response { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -58,23 +59,19 @@ public IsReady200Response() { } public IsReady200Response status(String status) { - this.status = status; return this; } - /** + /** * Always \"ok\". * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Always \"ok\".") - public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } @@ -177,18 +174,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to IsReady200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!IsReady200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to IsReady200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IsReady200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in IsReady200Response is not found in the empty JSON string", IsReady200Response.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -210,7 +208,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IsReady200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -222,7 +220,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -231,8 +234,9 @@ else if (entry.getValue() instanceof Character) @Override public IsReady200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance IsReady200Response instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -260,22 +264,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of IsReady200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of IsReady200Response - * @throws IOException if the JSON string is invalid with respect to IsReady200Response - */ + /** + * Create an instance of IsReady200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of IsReady200Response + * @throws IOException if the JSON string is invalid with respect to IsReady200Response + */ public static IsReady200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, IsReady200Response.class); } - /** - * Convert an instance of IsReady200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of IsReady200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java index a32bcce5180..eb96d0dcdce 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -36,13 +34,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -50,17 +51,16 @@ /** * IsReady503Response */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IsReady503Response { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private Map errors = null; + private Map errors = new HashMap<>(); public IsReady503Response() { } public IsReady503Response errors(Map errors) { - this.errors = errors; return this; } @@ -73,18 +73,15 @@ public IsReady503Response putErrorsItem(String key, String errorsItem) { return this; } - /** + /** * Errors contains a list of errors that caused the not ready status. * @return errors - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Errors contains a list of errors that caused the not ready status.") - public Map getErrors() { return errors; } - public void setErrors(Map errors) { this.errors = errors; } @@ -187,18 +184,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to IsReady503Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!IsReady503Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to IsReady503Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IsReady503Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in IsReady503Response is not found in the empty JSON string", IsReady503Response.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -217,7 +215,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, IsReady503Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -229,7 +227,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -238,8 +241,9 @@ else if (entry.getValue() instanceof Character) @Override public IsReady503Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance IsReady503Response instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -267,22 +271,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of IsReady503Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of IsReady503Response - * @throws IOException if the JSON string is invalid with respect to IsReady503Response - */ + /** + * Create an instance of IsReady503Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of IsReady503Response + * @throws IOException if the JSON string is invalid with respect to IsReady503Response + */ public static IsReady503Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, IsReady503Response.class); } - /** - * Convert an instance of IsReady503Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of IsReady503Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java index e8e05135ead..2121531e45e 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -49,8 +50,7 @@ /** * A JSONPatch document as defined by RFC 6902 */ -@ApiModel(description = "A JSONPatch document as defined by RFC 6902") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class JsonPatch { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -72,92 +72,76 @@ public JsonPatch() { } public JsonPatch from(String from) { - this.from = from; return this; } - /** + /** * This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @return from - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "/name", value = "This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).") - public String getFrom() { return from; } - public void setFrom(String from) { this.from = from; } public JsonPatch op(String op) { - this.op = op; return this; } - /** + /** * The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". * @return op - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "replace", required = true, value = "The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".") - public String getOp() { return op; } - public void setOp(String op) { this.op = op; } public JsonPatch path(String path) { - this.path = path; return this; } - /** + /** * The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @return path - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "/name", required = true, value = "The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).") - public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public JsonPatch value(Object value) { - this.value = value; return this; } - /** + /** * The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * @return value - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "foobar", value = "The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).") - public Object getValue() { return value; } - public void setValue(Object value) { this.value = value; } @@ -282,25 +266,26 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("path"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JsonPatch - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JsonPatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JsonPatch + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JsonPatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in JsonPatch is not found in the empty JSON string", JsonPatch.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : JsonPatch.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } @@ -328,7 +313,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, JsonPatch value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -340,7 +325,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -349,8 +339,9 @@ else if (entry.getValue() instanceof Character) @Override public JsonPatch read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance JsonPatch instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -378,22 +369,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of JsonPatch given an JSON string - * - * @param jsonString JSON string - * @return An instance of JsonPatch - * @throws IOException if the JSON string is invalid with respect to JsonPatch - */ + /** + * Create an instance of JsonPatch given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonPatch + * @throws IOException if the JSON string is invalid with respect to JsonPatch + */ public static JsonPatch fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JsonPatch.class); } - /** - * Convert an instance of JsonPatch to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JsonPatch to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKey.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKey.java index 49308befa05..92553abae72 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKey.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKey.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -50,7 +51,7 @@ /** * JsonWebKey */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class JsonWebKey { public static final String SERIALIZED_NAME_ALG = "alg"; @SerializedName(SERIALIZED_NAME_ALG) @@ -114,7 +115,7 @@ public class JsonWebKey { public static final String SERIALIZED_NAME_X5C = "x5c"; @SerializedName(SERIALIZED_NAME_X5C) - private List x5c = null; + private List x5c = new ArrayList<>(); public static final String SERIALIZED_NAME_Y = "y"; @SerializedName(SERIALIZED_NAME_Y) @@ -124,352 +125,291 @@ public JsonWebKey() { } public JsonWebKey alg(String alg) { - this.alg = alg; return this; } - /** + /** * The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. * @return alg - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "RS256", required = true, value = "The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.") - public String getAlg() { return alg; } - public void setAlg(String alg) { this.alg = alg; } public JsonWebKey crv(String crv) { - this.crv = crv; return this; } - /** + /** * Get crv * @return crv - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "P-256", value = "") - public String getCrv() { return crv; } - public void setCrv(String crv) { this.crv = crv; } public JsonWebKey d(String d) { - this.d = d; return this; } - /** + /** * Get d * @return d - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE", value = "") - public String getD() { return d; } - public void setD(String d) { this.d = d; } public JsonWebKey dp(String dp) { - this.dp = dp; return this; } - /** + /** * Get dp * @return dp - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0", value = "") - public String getDp() { return dp; } - public void setDp(String dp) { this.dp = dp; } public JsonWebKey dq(String dq) { - this.dq = dq; return this; } - /** + /** * Get dq * @return dq - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk", value = "") - public String getDq() { return dq; } - public void setDq(String dq) { this.dq = dq; } public JsonWebKey e(String e) { - this.e = e; return this; } - /** + /** * Get e * @return e - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "AQAB", value = "") - public String getE() { return e; } - public void setE(String e) { this.e = e; } public JsonWebKey k(String k) { - this.k = k; return this; } - /** + /** * Get k * @return k - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "GawgguFyGrWKav7AX4VKUg", value = "") - public String getK() { return k; } - public void setK(String k) { this.k = k; } public JsonWebKey kid(String kid) { - this.kid = kid; return this; } - /** + /** * The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. * @return kid - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1603dfe0af8f4596", required = true, value = "The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.") - public String getKid() { return kid; } - public void setKid(String kid) { this.kid = kid; } public JsonWebKey kty(String kty) { - this.kty = kty; return this; } - /** + /** * The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. * @return kty - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "RSA", required = true, value = "The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.") - public String getKty() { return kty; } - public void setKty(String kty) { this.kty = kty; } public JsonWebKey n(String n) { - this.n = n; return this; } - /** + /** * Get n * @return n - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0", value = "") - public String getN() { return n; } - public void setN(String n) { this.n = n; } public JsonWebKey p(String p) { - this.p = p; return this; } - /** + /** * Get p * @return p - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ", value = "") - public String getP() { return p; } - public void setP(String p) { this.p = p; } public JsonWebKey q(String q) { - this.q = q; return this; } - /** + /** * Get q * @return q - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ", value = "") - public String getQ() { return q; } - public void setQ(String q) { this.q = q; } public JsonWebKey qi(String qi) { - this.qi = qi; return this; } - /** + /** * Get qi * @return qi - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU", value = "") - public String getQi() { return qi; } - public void setQi(String qi) { this.qi = qi; } public JsonWebKey use(String use) { - this.use = use; return this; } - /** + /** * Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). * @return use - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "sig", required = true, value = "Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).") - public String getUse() { return use; } - public void setUse(String use) { this.use = use; } public JsonWebKey x(String x) { - this.x = x; return this; } - /** + /** * Get x * @return x - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU", value = "") - public String getX() { return x; } - public void setX(String x) { this.x = x; } public JsonWebKey x5c(List x5c) { - this.x5c = x5c; return this; } @@ -482,41 +422,34 @@ public JsonWebKey addX5cItem(String x5cItem) { return this; } - /** + /** * The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. * @return x5c - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.") - public List getX5c() { return x5c; } - public void setX5c(List x5c) { this.x5c = x5c; } public JsonWebKey y(String y) { - this.y = y; return this; } - /** + /** * Get y * @return y - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0", value = "") - public String getY() { return y; } - public void setY(String y) { this.y = y; } @@ -671,25 +604,26 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("use"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JsonWebKey - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JsonWebKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JsonWebKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JsonWebKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in JsonWebKey is not found in the empty JSON string", JsonWebKey.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : JsonWebKey.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("alg").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `alg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("alg").toString())); } @@ -736,7 +670,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `x` to be a primitive type in the JSON string but got `%s`", jsonObj.get("x").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("x5c") != null && !jsonObj.get("x5c").isJsonArray()) { + if (jsonObj.get("x5c") != null && !jsonObj.get("x5c").isJsonNull() && !jsonObj.get("x5c").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `x5c` to be an array in the JSON string but got `%s`", jsonObj.get("x5c").toString())); } if ((jsonObj.get("y") != null && !jsonObj.get("y").isJsonNull()) && !jsonObj.get("y").isJsonPrimitive()) { @@ -760,7 +694,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, JsonWebKey value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -772,7 +706,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -781,8 +720,9 @@ else if (entry.getValue() instanceof Character) @Override public JsonWebKey read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance JsonWebKey instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -810,22 +750,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of JsonWebKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of JsonWebKey - * @throws IOException if the JSON string is invalid with respect to JsonWebKey - */ + /** + * Create an instance of JsonWebKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonWebKey + * @throws IOException if the JSON string is invalid with respect to JsonWebKey + */ public static JsonWebKey fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JsonWebKey.class); } - /** - * Convert an instance of JsonWebKey to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JsonWebKey to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java index 8f9d3c65d89..688a1dee280 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.JsonWebKey; @@ -37,13 +35,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -51,18 +52,16 @@ /** * JSON Web Key Set */ -@ApiModel(description = "JSON Web Key Set") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class JsonWebKeySet { public static final String SERIALIZED_NAME_KEYS = "keys"; @SerializedName(SERIALIZED_NAME_KEYS) - private List keys = null; + private List keys = new ArrayList<>(); public JsonWebKeySet() { } public JsonWebKeySet keys(List keys) { - this.keys = keys; return this; } @@ -75,18 +74,15 @@ public JsonWebKeySet addKeysItem(JsonWebKey keysItem) { return this; } - /** + /** * List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. * @return keys - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.") - public List getKeys() { return keys; } - public void setKeys(List keys) { this.keys = keys; } @@ -189,18 +185,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JsonWebKeySet - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JsonWebKeySet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JsonWebKeySet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JsonWebKeySet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in JsonWebKeySet is not found in the empty JSON string", JsonWebKeySet.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("keys") != null && !jsonObj.get("keys").isJsonNull()) { JsonArray jsonArraykeys = jsonObj.getAsJsonArray("keys"); if (jsonArraykeys != null) { @@ -211,7 +208,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `keys` (array) for (int i = 0; i < jsonArraykeys.size(); i++) { - JsonWebKey.validateJsonObject(jsonArraykeys.get(i).getAsJsonObject()); + JsonWebKey.validateJsonElement(jsonArraykeys.get(i)); }; } } @@ -233,7 +230,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, JsonWebKeySet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -245,7 +242,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -254,8 +256,9 @@ else if (entry.getValue() instanceof Character) @Override public JsonWebKeySet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance JsonWebKeySet instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -283,22 +286,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of JsonWebKeySet given an JSON string - * - * @param jsonString JSON string - * @return An instance of JsonWebKeySet - * @throws IOException if the JSON string is invalid with respect to JsonWebKeySet - */ + /** + * Create an instance of JsonWebKeySet given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonWebKeySet + * @throws IOException if the JSON string is invalid with respect to JsonWebKeySet + */ public static JsonWebKeySet fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JsonWebKeySet.class); } - /** - * Convert an instance of JsonWebKeySet to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JsonWebKeySet to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2Client.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2Client.java index 618c14efbf7..2db9b372569 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2Client.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2Client.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,17 +14,15 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,8 +53,7 @@ /** * OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. */ -@ApiModel(description = "OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2Client { public static final String SERIALIZED_NAME_ACCESS_TOKEN_STRATEGY = "access_token_strategy"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN_STRATEGY) @@ -61,11 +61,11 @@ public class OAuth2Client { public static final String SERIALIZED_NAME_ALLOWED_CORS_ORIGINS = "allowed_cors_origins"; @SerializedName(SERIALIZED_NAME_ALLOWED_CORS_ORIGINS) - private List allowedCorsOrigins = null; + private List allowedCorsOrigins = new ArrayList<>(); public static final String SERIALIZED_NAME_AUDIENCE = "audience"; @SerializedName(SERIALIZED_NAME_AUDIENCE) - private List audience = null; + private List audience = new ArrayList<>(); public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ACCESS_TOKEN_LIFESPAN = "authorization_code_grant_access_token_lifespan"; @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ACCESS_TOKEN_LIFESPAN) @@ -113,7 +113,7 @@ public class OAuth2Client { public static final String SERIALIZED_NAME_CONTACTS = "contacts"; @SerializedName(SERIALIZED_NAME_CONTACTS) - private List contacts = null; + private List contacts = new ArrayList<>(); public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -129,7 +129,7 @@ public class OAuth2Client { public static final String SERIALIZED_NAME_GRANT_TYPES = "grant_types"; @SerializedName(SERIALIZED_NAME_GRANT_TYPES) - private List grantTypes = null; + private List grantTypes = new ArrayList<>(); public static final String SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN = "implicit_grant_access_token_lifespan"; @SerializedName(SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN) @@ -169,11 +169,11 @@ public class OAuth2Client { public static final String SERIALIZED_NAME_POST_LOGOUT_REDIRECT_URIS = "post_logout_redirect_uris"; @SerializedName(SERIALIZED_NAME_POST_LOGOUT_REDIRECT_URIS) - private List postLogoutRedirectUris = null; + private List postLogoutRedirectUris = new ArrayList<>(); public static final String SERIALIZED_NAME_REDIRECT_URIS = "redirect_uris"; @SerializedName(SERIALIZED_NAME_REDIRECT_URIS) - private List redirectUris = null; + private List redirectUris = new ArrayList<>(); public static final String SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ACCESS_TOKEN_LIFESPAN = "refresh_token_grant_access_token_lifespan"; @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ACCESS_TOKEN_LIFESPAN) @@ -201,11 +201,11 @@ public class OAuth2Client { public static final String SERIALIZED_NAME_REQUEST_URIS = "request_uris"; @SerializedName(SERIALIZED_NAME_REQUEST_URIS) - private List requestUris = null; + private List requestUris = new ArrayList<>(); public static final String SERIALIZED_NAME_RESPONSE_TYPES = "response_types"; @SerializedName(SERIALIZED_NAME_RESPONSE_TYPES) - private List responseTypes = null; + private List responseTypes = new ArrayList<>(); public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) @@ -251,30 +251,25 @@ public OAuth2Client() { } public OAuth2Client accessTokenStrategy(String accessTokenStrategy) { - this.accessTokenStrategy = accessTokenStrategy; return this; } - /** + /** * OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. * @return accessTokenStrategy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.") - public String getAccessTokenStrategy() { return accessTokenStrategy; } - public void setAccessTokenStrategy(String accessTokenStrategy) { this.accessTokenStrategy = accessTokenStrategy; } public OAuth2Client allowedCorsOrigins(List allowedCorsOrigins) { - this.allowedCorsOrigins = allowedCorsOrigins; return this; } @@ -287,25 +282,21 @@ public OAuth2Client addAllowedCorsOriginsItem(String allowedCorsOriginsItem) { return this; } - /** + /** * Get allowedCorsOrigins * @return allowedCorsOrigins - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getAllowedCorsOrigins() { return allowedCorsOrigins; } - public void setAllowedCorsOrigins(List allowedCorsOrigins) { this.allowedCorsOrigins = allowedCorsOrigins; } public OAuth2Client audience(List audience) { - this.audience = audience; return this; } @@ -318,278 +309,230 @@ public OAuth2Client addAudienceItem(String audienceItem) { return this; } - /** + /** * Get audience * @return audience - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getAudience() { return audience; } - public void setAudience(List audience) { this.audience = audience; } public OAuth2Client authorizationCodeGrantAccessTokenLifespan(String authorizationCodeGrantAccessTokenLifespan) { - this.authorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantAccessTokenLifespan() { return authorizationCodeGrantAccessTokenLifespan; } - public void setAuthorizationCodeGrantAccessTokenLifespan(String authorizationCodeGrantAccessTokenLifespan) { this.authorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; } public OAuth2Client authorizationCodeGrantIdTokenLifespan(String authorizationCodeGrantIdTokenLifespan) { - this.authorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantIdTokenLifespan() { return authorizationCodeGrantIdTokenLifespan; } - public void setAuthorizationCodeGrantIdTokenLifespan(String authorizationCodeGrantIdTokenLifespan) { this.authorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; } public OAuth2Client authorizationCodeGrantRefreshTokenLifespan(String authorizationCodeGrantRefreshTokenLifespan) { - this.authorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantRefreshTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantRefreshTokenLifespan() { return authorizationCodeGrantRefreshTokenLifespan; } - public void setAuthorizationCodeGrantRefreshTokenLifespan(String authorizationCodeGrantRefreshTokenLifespan) { this.authorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; } public OAuth2Client backchannelLogoutSessionRequired(Boolean backchannelLogoutSessionRequired) { - this.backchannelLogoutSessionRequired = backchannelLogoutSessionRequired; return this; } - /** + /** * OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false. * @return backchannelLogoutSessionRequired - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.") - public Boolean getBackchannelLogoutSessionRequired() { return backchannelLogoutSessionRequired; } - public void setBackchannelLogoutSessionRequired(Boolean backchannelLogoutSessionRequired) { this.backchannelLogoutSessionRequired = backchannelLogoutSessionRequired; } public OAuth2Client backchannelLogoutUri(String backchannelLogoutUri) { - this.backchannelLogoutUri = backchannelLogoutUri; return this; } - /** + /** * OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. * @return backchannelLogoutUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.") - public String getBackchannelLogoutUri() { return backchannelLogoutUri; } - public void setBackchannelLogoutUri(String backchannelLogoutUri) { this.backchannelLogoutUri = backchannelLogoutUri; } public OAuth2Client clientCredentialsGrantAccessTokenLifespan(String clientCredentialsGrantAccessTokenLifespan) { - this.clientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return clientCredentialsGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getClientCredentialsGrantAccessTokenLifespan() { return clientCredentialsGrantAccessTokenLifespan; } - public void setClientCredentialsGrantAccessTokenLifespan(String clientCredentialsGrantAccessTokenLifespan) { this.clientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; } public OAuth2Client clientId(String clientId) { - this.clientId = clientId; return this; } - /** + /** * OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated. * @return clientId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.") - public String getClientId() { return clientId; } - public void setClientId(String clientId) { this.clientId = clientId; } public OAuth2Client clientName(String clientName) { - this.clientName = clientName; return this; } - /** + /** * OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. * @return clientName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.") - public String getClientName() { return clientName; } - public void setClientName(String clientName) { this.clientName = clientName; } public OAuth2Client clientSecret(String clientSecret) { - this.clientSecret = clientSecret; return this; } - /** + /** * OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost. * @return clientSecret - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.") - public String getClientSecret() { return clientSecret; } - public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } public OAuth2Client clientSecretExpiresAt(Long clientSecretExpiresAt) { - this.clientSecretExpiresAt = clientSecretExpiresAt; return this; } - /** + /** * OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. * @return clientSecretExpiresAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.") - public Long getClientSecretExpiresAt() { return clientSecretExpiresAt; } - public void setClientSecretExpiresAt(Long clientSecretExpiresAt) { this.clientSecretExpiresAt = clientSecretExpiresAt; } public OAuth2Client clientUri(String clientUri) { - this.clientUri = clientUri; return this; } - /** + /** * OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion. * @return clientUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.") - public String getClientUri() { return clientUri; } - public void setClientUri(String clientUri) { this.clientUri = clientUri; } public OAuth2Client contacts(List contacts) { - this.contacts = contacts; return this; } @@ -602,94 +545,78 @@ public OAuth2Client addContactsItem(String contactsItem) { return this; } - /** + /** * Get contacts * @return contacts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getContacts() { return contacts; } - public void setContacts(List contacts) { this.contacts = contacts; } public OAuth2Client createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; return this; } - /** + /** * OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.") - public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } public OAuth2Client frontchannelLogoutSessionRequired(Boolean frontchannelLogoutSessionRequired) { - this.frontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired; return this; } - /** + /** * OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false. * @return frontchannelLogoutSessionRequired - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.") - public Boolean getFrontchannelLogoutSessionRequired() { return frontchannelLogoutSessionRequired; } - public void setFrontchannelLogoutSessionRequired(Boolean frontchannelLogoutSessionRequired) { this.frontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired; } public OAuth2Client frontchannelLogoutUri(String frontchannelLogoutUri) { - this.frontchannelLogoutUri = frontchannelLogoutUri; return this; } - /** + /** * OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be. * @return frontchannelLogoutUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.") - public String getFrontchannelLogoutUri() { return frontchannelLogoutUri; } - public void setFrontchannelLogoutUri(String frontchannelLogoutUri) { this.frontchannelLogoutUri = frontchannelLogoutUri; } public OAuth2Client grantTypes(List grantTypes) { - this.grantTypes = grantTypes; return this; } @@ -702,232 +629,192 @@ public OAuth2Client addGrantTypesItem(String grantTypesItem) { return this; } - /** + /** * Get grantTypes * @return grantTypes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGrantTypes() { return grantTypes; } - public void setGrantTypes(List grantTypes) { this.grantTypes = grantTypes; } public OAuth2Client implicitGrantAccessTokenLifespan(String implicitGrantAccessTokenLifespan) { - this.implicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return implicitGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getImplicitGrantAccessTokenLifespan() { return implicitGrantAccessTokenLifespan; } - public void setImplicitGrantAccessTokenLifespan(String implicitGrantAccessTokenLifespan) { this.implicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; } public OAuth2Client implicitGrantIdTokenLifespan(String implicitGrantIdTokenLifespan) { - this.implicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return implicitGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getImplicitGrantIdTokenLifespan() { return implicitGrantIdTokenLifespan; } - public void setImplicitGrantIdTokenLifespan(String implicitGrantIdTokenLifespan) { this.implicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; } public OAuth2Client jwks(Object jwks) { - this.jwks = jwks; return this; } - /** + /** * OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. * @return jwks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.") - public Object getJwks() { return jwks; } - public void setJwks(Object jwks) { this.jwks = jwks; } public OAuth2Client jwksUri(String jwksUri) { - this.jwksUri = jwksUri; return this; } - /** + /** * OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. * @return jwksUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.") - public String getJwksUri() { return jwksUri; } - public void setJwksUri(String jwksUri) { this.jwksUri = jwksUri; } public OAuth2Client jwtBearerGrantAccessTokenLifespan(String jwtBearerGrantAccessTokenLifespan) { - this.jwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return jwtBearerGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getJwtBearerGrantAccessTokenLifespan() { return jwtBearerGrantAccessTokenLifespan; } - public void setJwtBearerGrantAccessTokenLifespan(String jwtBearerGrantAccessTokenLifespan) { this.jwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; } public OAuth2Client logoUri(String logoUri) { - this.logoUri = logoUri; return this; } - /** + /** * OAuth 2.0 Client Logo URI A URL string referencing the client's logo. * @return logoUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Logo URI A URL string referencing the client's logo.") - public String getLogoUri() { return logoUri; } - public void setLogoUri(String logoUri) { this.logoUri = logoUri; } public OAuth2Client metadata(Object metadata) { - this.metadata = metadata; return this; } - /** + /** * Get metadata * @return metadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getMetadata() { return metadata; } - public void setMetadata(Object metadata) { this.metadata = metadata; } public OAuth2Client owner(String owner) { - this.owner = owner; return this; } - /** + /** * OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. * @return owner - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.") - public String getOwner() { return owner; } - public void setOwner(String owner) { this.owner = owner; } public OAuth2Client policyUri(String policyUri) { - this.policyUri = policyUri; return this; } - /** + /** * OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data. * @return policyUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.") - public String getPolicyUri() { return policyUri; } - public void setPolicyUri(String policyUri) { this.policyUri = policyUri; } public OAuth2Client postLogoutRedirectUris(List postLogoutRedirectUris) { - this.postLogoutRedirectUris = postLogoutRedirectUris; return this; } @@ -940,25 +827,21 @@ public OAuth2Client addPostLogoutRedirectUrisItem(String postLogoutRedirectUrisI return this; } - /** + /** * Get postLogoutRedirectUris * @return postLogoutRedirectUris - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPostLogoutRedirectUris() { return postLogoutRedirectUris; } - public void setPostLogoutRedirectUris(List postLogoutRedirectUris) { this.postLogoutRedirectUris = postLogoutRedirectUris; } public OAuth2Client redirectUris(List redirectUris) { - this.redirectUris = redirectUris; return this; } @@ -971,163 +854,135 @@ public OAuth2Client addRedirectUrisItem(String redirectUrisItem) { return this; } - /** + /** * Get redirectUris * @return redirectUris - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRedirectUris() { return redirectUris; } - public void setRedirectUris(List redirectUris) { this.redirectUris = redirectUris; } public OAuth2Client refreshTokenGrantAccessTokenLifespan(String refreshTokenGrantAccessTokenLifespan) { - this.refreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantAccessTokenLifespan() { return refreshTokenGrantAccessTokenLifespan; } - public void setRefreshTokenGrantAccessTokenLifespan(String refreshTokenGrantAccessTokenLifespan) { this.refreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; } public OAuth2Client refreshTokenGrantIdTokenLifespan(String refreshTokenGrantIdTokenLifespan) { - this.refreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantIdTokenLifespan() { return refreshTokenGrantIdTokenLifespan; } - public void setRefreshTokenGrantIdTokenLifespan(String refreshTokenGrantIdTokenLifespan) { this.refreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; } public OAuth2Client refreshTokenGrantRefreshTokenLifespan(String refreshTokenGrantRefreshTokenLifespan) { - this.refreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantRefreshTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantRefreshTokenLifespan() { return refreshTokenGrantRefreshTokenLifespan; } - public void setRefreshTokenGrantRefreshTokenLifespan(String refreshTokenGrantRefreshTokenLifespan) { this.refreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; } public OAuth2Client registrationAccessToken(String registrationAccessToken) { - this.registrationAccessToken = registrationAccessToken; return this; } - /** + /** * OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration. * @return registrationAccessToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.") - public String getRegistrationAccessToken() { return registrationAccessToken; } - public void setRegistrationAccessToken(String registrationAccessToken) { this.registrationAccessToken = registrationAccessToken; } public OAuth2Client registrationClientUri(String registrationClientUri) { - this.registrationClientUri = registrationClientUri; return this; } - /** + /** * OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. * @return registrationClientUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.") - public String getRegistrationClientUri() { return registrationClientUri; } - public void setRegistrationClientUri(String registrationClientUri) { this.registrationClientUri = registrationClientUri; } public OAuth2Client requestObjectSigningAlg(String requestObjectSigningAlg) { - this.requestObjectSigningAlg = requestObjectSigningAlg; return this; } - /** + /** * OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm. * @return requestObjectSigningAlg - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.") - public String getRequestObjectSigningAlg() { return requestObjectSigningAlg; } - public void setRequestObjectSigningAlg(String requestObjectSigningAlg) { this.requestObjectSigningAlg = requestObjectSigningAlg; } public OAuth2Client requestUris(List requestUris) { - this.requestUris = requestUris; return this; } @@ -1140,25 +995,21 @@ public OAuth2Client addRequestUrisItem(String requestUrisItem) { return this; } - /** + /** * Get requestUris * @return requestUris - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequestUris() { return requestUris; } - public void setRequestUris(List requestUris) { this.requestUris = requestUris; } public OAuth2Client responseTypes(List responseTypes) { - this.responseTypes = responseTypes; return this; } @@ -1171,248 +1022,205 @@ public OAuth2Client addResponseTypesItem(String responseTypesItem) { return this; } - /** + /** * Get responseTypes * @return responseTypes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getResponseTypes() { return responseTypes; } - public void setResponseTypes(List responseTypes) { this.responseTypes = responseTypes; } public OAuth2Client scope(String scope) { - this.scope = scope; return this; } - /** + /** * OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "scope1 scope-2 scope.3 scope:4", value = "OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.") - public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } public OAuth2Client sectorIdentifierUri(String sectorIdentifierUri) { - this.sectorIdentifierUri = sectorIdentifierUri; return this; } - /** + /** * OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. * @return sectorIdentifierUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.") - public String getSectorIdentifierUri() { return sectorIdentifierUri; } - public void setSectorIdentifierUri(String sectorIdentifierUri) { this.sectorIdentifierUri = sectorIdentifierUri; } public OAuth2Client skipConsent(Boolean skipConsent) { - this.skipConsent = skipConsent; return this; } - /** + /** * SkipConsent skips the consent screen for this client. This field can only be set from the admin API. * @return skipConsent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SkipConsent skips the consent screen for this client. This field can only be set from the admin API.") - public Boolean getSkipConsent() { return skipConsent; } - public void setSkipConsent(Boolean skipConsent) { this.skipConsent = skipConsent; } public OAuth2Client skipLogoutConsent(Boolean skipLogoutConsent) { - this.skipLogoutConsent = skipLogoutConsent; return this; } - /** + /** * SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API. * @return skipLogoutConsent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.") - public Boolean getSkipLogoutConsent() { return skipLogoutConsent; } - public void setSkipLogoutConsent(Boolean skipLogoutConsent) { this.skipLogoutConsent = skipLogoutConsent; } public OAuth2Client subjectType(String subjectType) { - this.subjectType = subjectType; return this; } - /** + /** * OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. * @return subjectType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.") - public String getSubjectType() { return subjectType; } - public void setSubjectType(String subjectType) { this.subjectType = subjectType; } public OAuth2Client tokenEndpointAuthMethod(String tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; return this; } - /** + /** * OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. * @return tokenEndpointAuthMethod - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.") - public String getTokenEndpointAuthMethod() { return tokenEndpointAuthMethod; } - public void setTokenEndpointAuthMethod(String tokenEndpointAuthMethod) { this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; } public OAuth2Client tokenEndpointAuthSigningAlg(String tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; return this; } - /** + /** * OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. * @return tokenEndpointAuthSigningAlg - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.") - public String getTokenEndpointAuthSigningAlg() { return tokenEndpointAuthSigningAlg; } - public void setTokenEndpointAuthSigningAlg(String tokenEndpointAuthSigningAlg) { this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; } public OAuth2Client tosUri(String tosUri) { - this.tosUri = tosUri; return this; } - /** + /** * OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. * @return tosUri - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.") - public String getTosUri() { return tosUri; } - public void setTosUri(String tosUri) { this.tosUri = tosUri; } public OAuth2Client updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; return this; } - /** + /** * OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } public OAuth2Client userinfoSignedResponseAlg(String userinfoSignedResponseAlg) { - this.userinfoSignedResponseAlg = userinfoSignedResponseAlg; return this; } - /** + /** * OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. * @return userinfoSignedResponseAlg - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.") - public String getUserinfoSignedResponseAlg() { return userinfoSignedResponseAlg; } - public void setUserinfoSignedResponseAlg(String userinfoSignedResponseAlg) { this.userinfoSignedResponseAlg = userinfoSignedResponseAlg; } @@ -1667,27 +1475,28 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2Client - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2Client.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2Client + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2Client.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2Client is not found in the empty JSON string", OAuth2Client.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("access_token_strategy") != null && !jsonObj.get("access_token_strategy").isJsonNull()) && !jsonObj.get("access_token_strategy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_token_strategy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token_strategy").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("allowed_cors_origins") != null && !jsonObj.get("allowed_cors_origins").isJsonArray()) { + if (jsonObj.get("allowed_cors_origins") != null && !jsonObj.get("allowed_cors_origins").isJsonNull() && !jsonObj.get("allowed_cors_origins").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allowed_cors_origins` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_cors_origins").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("audience") != null && !jsonObj.get("audience").isJsonArray()) { + if (jsonObj.get("audience") != null && !jsonObj.get("audience").isJsonNull() && !jsonObj.get("audience").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `audience` to be an array in the JSON string but got `%s`", jsonObj.get("audience").toString())); } if ((jsonObj.get("authorization_code_grant_access_token_lifespan") != null && !jsonObj.get("authorization_code_grant_access_token_lifespan").isJsonNull()) && !jsonObj.get("authorization_code_grant_access_token_lifespan").isJsonPrimitive()) { @@ -1718,14 +1527,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `client_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_uri").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("contacts") != null && !jsonObj.get("contacts").isJsonArray()) { + if (jsonObj.get("contacts") != null && !jsonObj.get("contacts").isJsonNull() && !jsonObj.get("contacts").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `contacts` to be an array in the JSON string but got `%s`", jsonObj.get("contacts").toString())); } if ((jsonObj.get("frontchannel_logout_uri") != null && !jsonObj.get("frontchannel_logout_uri").isJsonNull()) && !jsonObj.get("frontchannel_logout_uri").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `frontchannel_logout_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("frontchannel_logout_uri").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("grant_types") != null && !jsonObj.get("grant_types").isJsonArray()) { + if (jsonObj.get("grant_types") != null && !jsonObj.get("grant_types").isJsonNull() && !jsonObj.get("grant_types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_types` to be an array in the JSON string but got `%s`", jsonObj.get("grant_types").toString())); } if ((jsonObj.get("implicit_grant_access_token_lifespan") != null && !jsonObj.get("implicit_grant_access_token_lifespan").isJsonNull()) && !jsonObj.get("implicit_grant_access_token_lifespan").isJsonPrimitive()) { @@ -1750,11 +1559,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `policy_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policy_uri").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("post_logout_redirect_uris") != null && !jsonObj.get("post_logout_redirect_uris").isJsonArray()) { + if (jsonObj.get("post_logout_redirect_uris") != null && !jsonObj.get("post_logout_redirect_uris").isJsonNull() && !jsonObj.get("post_logout_redirect_uris").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `post_logout_redirect_uris` to be an array in the JSON string but got `%s`", jsonObj.get("post_logout_redirect_uris").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("redirect_uris") != null && !jsonObj.get("redirect_uris").isJsonArray()) { + if (jsonObj.get("redirect_uris") != null && !jsonObj.get("redirect_uris").isJsonNull() && !jsonObj.get("redirect_uris").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `redirect_uris` to be an array in the JSON string but got `%s`", jsonObj.get("redirect_uris").toString())); } if ((jsonObj.get("refresh_token_grant_access_token_lifespan") != null && !jsonObj.get("refresh_token_grant_access_token_lifespan").isJsonNull()) && !jsonObj.get("refresh_token_grant_access_token_lifespan").isJsonPrimitive()) { @@ -1776,11 +1585,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `request_object_signing_alg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_object_signing_alg").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("request_uris") != null && !jsonObj.get("request_uris").isJsonArray()) { + if (jsonObj.get("request_uris") != null && !jsonObj.get("request_uris").isJsonNull() && !jsonObj.get("request_uris").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `request_uris` to be an array in the JSON string but got `%s`", jsonObj.get("request_uris").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("response_types") != null && !jsonObj.get("response_types").isJsonArray()) { + if (jsonObj.get("response_types") != null && !jsonObj.get("response_types").isJsonNull() && !jsonObj.get("response_types").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `response_types` to be an array in the JSON string but got `%s`", jsonObj.get("response_types").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -1822,7 +1631,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2Client value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -1834,7 +1643,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -1843,8 +1657,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2Client read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2Client instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -1872,22 +1687,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2Client given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2Client - * @throws IOException if the JSON string is invalid with respect to OAuth2Client - */ + /** + * Create an instance of OAuth2Client given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2Client + * @throws IOException if the JSON string is invalid with respect to OAuth2Client + */ public static OAuth2Client fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2Client.class); } - /** - * Convert an instance of OAuth2Client to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2Client to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java index d2fef9a8692..df37b93cb96 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * Lifespans of different token types issued for this OAuth 2.0 Client. */ -@ApiModel(description = "Lifespans of different token types issued for this OAuth 2.0 Client.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2ClientTokenLifespans { public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ACCESS_TOKEN_LIFESPAN = "authorization_code_grant_access_token_lifespan"; @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ACCESS_TOKEN_LIFESPAN) @@ -95,230 +95,190 @@ public OAuth2ClientTokenLifespans() { } public OAuth2ClientTokenLifespans authorizationCodeGrantAccessTokenLifespan(String authorizationCodeGrantAccessTokenLifespan) { - this.authorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantAccessTokenLifespan() { return authorizationCodeGrantAccessTokenLifespan; } - public void setAuthorizationCodeGrantAccessTokenLifespan(String authorizationCodeGrantAccessTokenLifespan) { this.authorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; } public OAuth2ClientTokenLifespans authorizationCodeGrantIdTokenLifespan(String authorizationCodeGrantIdTokenLifespan) { - this.authorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantIdTokenLifespan() { return authorizationCodeGrantIdTokenLifespan; } - public void setAuthorizationCodeGrantIdTokenLifespan(String authorizationCodeGrantIdTokenLifespan) { this.authorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; } public OAuth2ClientTokenLifespans authorizationCodeGrantRefreshTokenLifespan(String authorizationCodeGrantRefreshTokenLifespan) { - this.authorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return authorizationCodeGrantRefreshTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getAuthorizationCodeGrantRefreshTokenLifespan() { return authorizationCodeGrantRefreshTokenLifespan; } - public void setAuthorizationCodeGrantRefreshTokenLifespan(String authorizationCodeGrantRefreshTokenLifespan) { this.authorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; } public OAuth2ClientTokenLifespans clientCredentialsGrantAccessTokenLifespan(String clientCredentialsGrantAccessTokenLifespan) { - this.clientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return clientCredentialsGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getClientCredentialsGrantAccessTokenLifespan() { return clientCredentialsGrantAccessTokenLifespan; } - public void setClientCredentialsGrantAccessTokenLifespan(String clientCredentialsGrantAccessTokenLifespan) { this.clientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; } public OAuth2ClientTokenLifespans implicitGrantAccessTokenLifespan(String implicitGrantAccessTokenLifespan) { - this.implicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return implicitGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getImplicitGrantAccessTokenLifespan() { return implicitGrantAccessTokenLifespan; } - public void setImplicitGrantAccessTokenLifespan(String implicitGrantAccessTokenLifespan) { this.implicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; } public OAuth2ClientTokenLifespans implicitGrantIdTokenLifespan(String implicitGrantIdTokenLifespan) { - this.implicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return implicitGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getImplicitGrantIdTokenLifespan() { return implicitGrantIdTokenLifespan; } - public void setImplicitGrantIdTokenLifespan(String implicitGrantIdTokenLifespan) { this.implicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; } public OAuth2ClientTokenLifespans jwtBearerGrantAccessTokenLifespan(String jwtBearerGrantAccessTokenLifespan) { - this.jwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return jwtBearerGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getJwtBearerGrantAccessTokenLifespan() { return jwtBearerGrantAccessTokenLifespan; } - public void setJwtBearerGrantAccessTokenLifespan(String jwtBearerGrantAccessTokenLifespan) { this.jwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; } public OAuth2ClientTokenLifespans refreshTokenGrantAccessTokenLifespan(String refreshTokenGrantAccessTokenLifespan) { - this.refreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantAccessTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantAccessTokenLifespan() { return refreshTokenGrantAccessTokenLifespan; } - public void setRefreshTokenGrantAccessTokenLifespan(String refreshTokenGrantAccessTokenLifespan) { this.refreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; } public OAuth2ClientTokenLifespans refreshTokenGrantIdTokenLifespan(String refreshTokenGrantIdTokenLifespan) { - this.refreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantIdTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantIdTokenLifespan() { return refreshTokenGrantIdTokenLifespan; } - public void setRefreshTokenGrantIdTokenLifespan(String refreshTokenGrantIdTokenLifespan) { this.refreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; } public OAuth2ClientTokenLifespans refreshTokenGrantRefreshTokenLifespan(String refreshTokenGrantRefreshTokenLifespan) { - this.refreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; return this; } - /** + /** * Specify a time duration in milliseconds, seconds, minutes, hours. * @return refreshTokenGrantRefreshTokenLifespan - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify a time duration in milliseconds, seconds, minutes, hours.") - public String getRefreshTokenGrantRefreshTokenLifespan() { return refreshTokenGrantRefreshTokenLifespan; } - public void setRefreshTokenGrantRefreshTokenLifespan(String refreshTokenGrantRefreshTokenLifespan) { this.refreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; } @@ -448,18 +408,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2ClientTokenLifespans - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2ClientTokenLifespans.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2ClientTokenLifespans + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2ClientTokenLifespans.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ClientTokenLifespans is not found in the empty JSON string", OAuth2ClientTokenLifespans.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("authorization_code_grant_access_token_lifespan") != null && !jsonObj.get("authorization_code_grant_access_token_lifespan").isJsonNull()) && !jsonObj.get("authorization_code_grant_access_token_lifespan").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `authorization_code_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_code_grant_access_token_lifespan").toString())); } @@ -508,7 +469,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2ClientTokenLifespans value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -520,7 +481,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -529,8 +495,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2ClientTokenLifespans read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2ClientTokenLifespans instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -558,22 +525,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2ClientTokenLifespans given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2ClientTokenLifespans - * @throws IOException if the JSON string is invalid with respect to OAuth2ClientTokenLifespans - */ + /** + * Create an instance of OAuth2ClientTokenLifespans given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2ClientTokenLifespans + * @throws IOException if the JSON string is invalid with respect to OAuth2ClientTokenLifespans + */ public static OAuth2ClientTokenLifespans fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2ClientTokenLifespans.class); } - /** - * Convert an instance of OAuth2ClientTokenLifespans to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2ClientTokenLifespans to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java index 922c989d1df..4779efd5586 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.OAuth2Client; @@ -39,13 +37,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -53,7 +54,7 @@ /** * OAuth2ConsentRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2ConsentRequest { public static final String SERIALIZED_NAME_ACR = "acr"; @SerializedName(SERIALIZED_NAME_ACR) @@ -61,7 +62,7 @@ public class OAuth2ConsentRequest { public static final String SERIALIZED_NAME_AMR = "amr"; @SerializedName(SERIALIZED_NAME_AMR) - private List amr = null; + private List amr = new ArrayList<>(); public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; @SerializedName(SERIALIZED_NAME_CHALLENGE) @@ -93,11 +94,11 @@ public class OAuth2ConsentRequest { public static final String SERIALIZED_NAME_REQUESTED_ACCESS_TOKEN_AUDIENCE = "requested_access_token_audience"; @SerializedName(SERIALIZED_NAME_REQUESTED_ACCESS_TOKEN_AUDIENCE) - private List requestedAccessTokenAudience = null; + private List requestedAccessTokenAudience = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUESTED_SCOPE = "requested_scope"; @SerializedName(SERIALIZED_NAME_REQUESTED_SCOPE) - private List requestedScope = null; + private List requestedScope = new ArrayList<>(); public static final String SERIALIZED_NAME_SKIP = "skip"; @SerializedName(SERIALIZED_NAME_SKIP) @@ -111,30 +112,25 @@ public OAuth2ConsentRequest() { } public OAuth2ConsentRequest acr(String acr) { - this.acr = acr; return this; } - /** + /** * ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. * @return acr - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.") - public String getAcr() { return acr; } - public void setAcr(String acr) { this.acr = acr; } public OAuth2ConsentRequest amr(List amr) { - this.amr = amr; return this; } @@ -147,186 +143,154 @@ public OAuth2ConsentRequest addAmrItem(String amrItem) { return this; } - /** + /** * Get amr * @return amr - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getAmr() { return amr; } - public void setAmr(List amr) { this.amr = amr; } public OAuth2ConsentRequest challenge(String challenge) { - this.challenge = challenge; return this; } - /** + /** * ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. * @return challenge - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session.") - public String getChallenge() { return challenge; } - public void setChallenge(String challenge) { this.challenge = challenge; } public OAuth2ConsentRequest client(OAuth2Client client) { - this.client = client; return this; } - /** + /** * Get client * @return client - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2Client getClient() { return client; } - public void setClient(OAuth2Client client) { this.client = client; } public OAuth2ConsentRequest context(Object context) { - this.context = context; return this; } - /** + /** * Get context * @return context - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getContext() { return context; } - public void setContext(Object context) { this.context = context; } public OAuth2ConsentRequest loginChallenge(String loginChallenge) { - this.loginChallenge = loginChallenge; return this; } - /** + /** * LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. * @return loginChallenge - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.") - public String getLoginChallenge() { return loginChallenge; } - public void setLoginChallenge(String loginChallenge) { this.loginChallenge = loginChallenge; } public OAuth2ConsentRequest loginSessionId(String loginSessionId) { - this.loginSessionId = loginSessionId; return this; } - /** + /** * LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. * @return loginSessionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.") - public String getLoginSessionId() { return loginSessionId; } - public void setLoginSessionId(String loginSessionId) { this.loginSessionId = loginSessionId; } public OAuth2ConsentRequest oidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { - this.oidcContext = oidcContext; return this; } - /** + /** * Get oidcContext * @return oidcContext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2ConsentRequestOpenIDConnectContext getOidcContext() { return oidcContext; } - public void setOidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; } public OAuth2ConsentRequest requestUrl(String requestUrl) { - this.requestUrl = requestUrl; return this; } - /** + /** * RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. * @return requestUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.") - public String getRequestUrl() { return requestUrl; } - public void setRequestUrl(String requestUrl) { this.requestUrl = requestUrl; } public OAuth2ConsentRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { - this.requestedAccessTokenAudience = requestedAccessTokenAudience; return this; } @@ -339,25 +303,21 @@ public OAuth2ConsentRequest addRequestedAccessTokenAudienceItem(String requested return this; } - /** + /** * Get requestedAccessTokenAudience * @return requestedAccessTokenAudience - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequestedAccessTokenAudience() { return requestedAccessTokenAudience; } - public void setRequestedAccessTokenAudience(List requestedAccessTokenAudience) { this.requestedAccessTokenAudience = requestedAccessTokenAudience; } public OAuth2ConsentRequest requestedScope(List requestedScope) { - this.requestedScope = requestedScope; return this; } @@ -370,64 +330,53 @@ public OAuth2ConsentRequest addRequestedScopeItem(String requestedScopeItem) { return this; } - /** + /** * Get requestedScope * @return requestedScope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequestedScope() { return requestedScope; } - public void setRequestedScope(List requestedScope) { this.requestedScope = requestedScope; } public OAuth2ConsentRequest skip(Boolean skip) { - this.skip = skip; return this; } - /** + /** * Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call. * @return skip - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.") - public Boolean getSkip() { return skip; } - public void setSkip(Boolean skip) { this.skip = skip; } public OAuth2ConsentRequest subject(String subject) { - this.subject = subject; return this; } - /** + /** * Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. * @return subject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -578,30 +527,31 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("challenge"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2ConsentRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2ConsentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2ConsentRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2ConsentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentRequest is not found in the empty JSON string", OAuth2ConsentRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OAuth2ConsentRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("acr") != null && !jsonObj.get("acr").isJsonNull()) && !jsonObj.get("acr").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `acr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acr").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("amr") != null && !jsonObj.get("amr").isJsonArray()) { + if (jsonObj.get("amr") != null && !jsonObj.get("amr").isJsonNull() && !jsonObj.get("amr").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `amr` to be an array in the JSON string but got `%s`", jsonObj.get("amr").toString())); } if (!jsonObj.get("challenge").isJsonPrimitive()) { @@ -609,7 +559,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `client` if (jsonObj.get("client") != null && !jsonObj.get("client").isJsonNull()) { - OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + OAuth2Client.validateJsonElement(jsonObj.get("client")); } if ((jsonObj.get("login_challenge") != null && !jsonObj.get("login_challenge").isJsonNull()) && !jsonObj.get("login_challenge").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `login_challenge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_challenge").toString())); @@ -619,17 +569,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `oidc_context` if (jsonObj.get("oidc_context") != null && !jsonObj.get("oidc_context").isJsonNull()) { - OAuth2ConsentRequestOpenIDConnectContext.validateJsonObject(jsonObj.getAsJsonObject("oidc_context")); + OAuth2ConsentRequestOpenIDConnectContext.validateJsonElement(jsonObj.get("oidc_context")); } if ((jsonObj.get("request_url") != null && !jsonObj.get("request_url").isJsonNull()) && !jsonObj.get("request_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `request_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_url").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("requested_access_token_audience") != null && !jsonObj.get("requested_access_token_audience").isJsonArray()) { + if (jsonObj.get("requested_access_token_audience") != null && !jsonObj.get("requested_access_token_audience").isJsonNull() && !jsonObj.get("requested_access_token_audience").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `requested_access_token_audience` to be an array in the JSON string but got `%s`", jsonObj.get("requested_access_token_audience").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("requested_scope") != null && !jsonObj.get("requested_scope").isJsonArray()) { + if (jsonObj.get("requested_scope") != null && !jsonObj.get("requested_scope").isJsonNull() && !jsonObj.get("requested_scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `requested_scope` to be an array in the JSON string but got `%s`", jsonObj.get("requested_scope").toString())); } if ((jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonNull()) && !jsonObj.get("subject").isJsonPrimitive()) { @@ -653,7 +603,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2ConsentRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -665,7 +615,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -674,8 +629,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2ConsentRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2ConsentRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -703,22 +659,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2ConsentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2ConsentRequest - * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentRequest - */ + /** + * Create an instance of OAuth2ConsentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2ConsentRequest + * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentRequest + */ public static OAuth2ConsentRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2ConsentRequest.class); } - /** - * Convert an instance of OAuth2ConsentRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2ConsentRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java index a2980db6b96..c15aaa6a7a4 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,11 +53,11 @@ /** * OAuth2ConsentRequestOpenIDConnectContext */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2ConsentRequestOpenIDConnectContext { public static final String SERIALIZED_NAME_ACR_VALUES = "acr_values"; @SerializedName(SERIALIZED_NAME_ACR_VALUES) - private List acrValues = null; + private List acrValues = new ArrayList<>(); public static final String SERIALIZED_NAME_DISPLAY = "display"; @SerializedName(SERIALIZED_NAME_DISPLAY) @@ -64,7 +65,7 @@ public class OAuth2ConsentRequestOpenIDConnectContext { public static final String SERIALIZED_NAME_ID_TOKEN_HINT_CLAIMS = "id_token_hint_claims"; @SerializedName(SERIALIZED_NAME_ID_TOKEN_HINT_CLAIMS) - private Map idTokenHintClaims = null; + private Map idTokenHintClaims = new HashMap<>(); public static final String SERIALIZED_NAME_LOGIN_HINT = "login_hint"; @SerializedName(SERIALIZED_NAME_LOGIN_HINT) @@ -72,13 +73,12 @@ public class OAuth2ConsentRequestOpenIDConnectContext { public static final String SERIALIZED_NAME_UI_LOCALES = "ui_locales"; @SerializedName(SERIALIZED_NAME_UI_LOCALES) - private List uiLocales = null; + private List uiLocales = new ArrayList<>(); public OAuth2ConsentRequestOpenIDConnectContext() { } public OAuth2ConsentRequestOpenIDConnectContext acrValues(List acrValues) { - this.acrValues = acrValues; return this; } @@ -91,48 +91,40 @@ public OAuth2ConsentRequestOpenIDConnectContext addAcrValuesItem(String acrValue return this; } - /** + /** * ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. * @return acrValues - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.") - public List getAcrValues() { return acrValues; } - public void setAcrValues(List acrValues) { this.acrValues = acrValues; } public OAuth2ConsentRequestOpenIDConnectContext display(String display) { - this.display = display; return this; } - /** + /** * Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. * @return display - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.") - public String getDisplay() { return display; } - public void setDisplay(String display) { this.display = display; } public OAuth2ConsentRequestOpenIDConnectContext idTokenHintClaims(Map idTokenHintClaims) { - this.idTokenHintClaims = idTokenHintClaims; return this; } @@ -145,48 +137,40 @@ public OAuth2ConsentRequestOpenIDConnectContext putIdTokenHintClaimsItem(String return this; } - /** + /** * IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. * @return idTokenHintClaims - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.") - public Map getIdTokenHintClaims() { return idTokenHintClaims; } - public void setIdTokenHintClaims(Map idTokenHintClaims) { this.idTokenHintClaims = idTokenHintClaims; } public OAuth2ConsentRequestOpenIDConnectContext loginHint(String loginHint) { - this.loginHint = loginHint; return this; } - /** + /** * LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. * @return loginHint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.") - public String getLoginHint() { return loginHint; } - public void setLoginHint(String loginHint) { this.loginHint = loginHint; } public OAuth2ConsentRequestOpenIDConnectContext uiLocales(List uiLocales) { - this.uiLocales = uiLocales; return this; } @@ -199,18 +183,15 @@ public OAuth2ConsentRequestOpenIDConnectContext addUiLocalesItem(String uiLocale return this; } - /** + /** * UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. * @return uiLocales - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.") - public List getUiLocales() { return uiLocales; } - public void setUiLocales(List uiLocales) { this.uiLocales = uiLocales; } @@ -325,20 +306,21 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2ConsentRequestOpenIDConnectContext - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2ConsentRequestOpenIDConnectContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2ConsentRequestOpenIDConnectContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2ConsentRequestOpenIDConnectContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentRequestOpenIDConnectContext is not found in the empty JSON string", OAuth2ConsentRequestOpenIDConnectContext.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("acr_values") != null && !jsonObj.get("acr_values").isJsonArray()) { + if (jsonObj.get("acr_values") != null && !jsonObj.get("acr_values").isJsonNull() && !jsonObj.get("acr_values").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `acr_values` to be an array in the JSON string but got `%s`", jsonObj.get("acr_values").toString())); } if ((jsonObj.get("display") != null && !jsonObj.get("display").isJsonNull()) && !jsonObj.get("display").isJsonPrimitive()) { @@ -348,7 +330,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `login_hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_hint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("ui_locales") != null && !jsonObj.get("ui_locales").isJsonArray()) { + if (jsonObj.get("ui_locales") != null && !jsonObj.get("ui_locales").isJsonNull() && !jsonObj.get("ui_locales").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ui_locales` to be an array in the JSON string but got `%s`", jsonObj.get("ui_locales").toString())); } } @@ -369,7 +351,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2ConsentRequestOpenIDConnectContext value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -381,7 +363,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -390,8 +377,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2ConsentRequestOpenIDConnectContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2ConsentRequestOpenIDConnectContext instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -419,22 +407,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2ConsentRequestOpenIDConnectContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2ConsentRequestOpenIDConnectContext - * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentRequestOpenIDConnectContext - */ + /** + * Create an instance of OAuth2ConsentRequestOpenIDConnectContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2ConsentRequestOpenIDConnectContext + * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentRequestOpenIDConnectContext + */ public static OAuth2ConsentRequestOpenIDConnectContext fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2ConsentRequestOpenIDConnectContext.class); } - /** - * Convert an instance of OAuth2ConsentRequestOpenIDConnectContext to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2ConsentRequestOpenIDConnectContext to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java index d166657d3d8..8327bedd99f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,17 +14,15 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; @@ -41,13 +39,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -55,8 +56,7 @@ /** * A completed OAuth 2.0 Consent Session. */ -@ApiModel(description = "A completed OAuth 2.0 Consent Session.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2ConsentSession { public static final String SERIALIZED_NAME_CONSENT_REQUEST = "consent_request"; @SerializedName(SERIALIZED_NAME_CONSENT_REQUEST) @@ -72,11 +72,11 @@ public class OAuth2ConsentSession { public static final String SERIALIZED_NAME_GRANT_ACCESS_TOKEN_AUDIENCE = "grant_access_token_audience"; @SerializedName(SERIALIZED_NAME_GRANT_ACCESS_TOKEN_AUDIENCE) - private List grantAccessTokenAudience = null; + private List grantAccessTokenAudience = new ArrayList<>(); public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) - private List grantScope = null; + private List grantScope = new ArrayList<>(); public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; @SerializedName(SERIALIZED_NAME_HANDLED_AT) @@ -98,76 +98,63 @@ public OAuth2ConsentSession() { } public OAuth2ConsentSession consentRequest(OAuth2ConsentRequest consentRequest) { - this.consentRequest = consentRequest; return this; } - /** + /** * Get consentRequest * @return consentRequest - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2ConsentRequest getConsentRequest() { return consentRequest; } - public void setConsentRequest(OAuth2ConsentRequest consentRequest) { this.consentRequest = consentRequest; } public OAuth2ConsentSession context(Object context) { - this.context = context; return this; } - /** + /** * Get context * @return context - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getContext() { return context; } - public void setContext(Object context) { this.context = context; } public OAuth2ConsentSession expiresAt(OAuth2ConsentSessionExpiresAt expiresAt) { - this.expiresAt = expiresAt; return this; } - /** + /** * Get expiresAt * @return expiresAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2ConsentSessionExpiresAt getExpiresAt() { return expiresAt; } - public void setExpiresAt(OAuth2ConsentSessionExpiresAt expiresAt) { this.expiresAt = expiresAt; } public OAuth2ConsentSession grantAccessTokenAudience(List grantAccessTokenAudience) { - this.grantAccessTokenAudience = grantAccessTokenAudience; return this; } @@ -180,25 +167,21 @@ public OAuth2ConsentSession addGrantAccessTokenAudienceItem(String grantAccessTo return this; } - /** + /** * Get grantAccessTokenAudience * @return grantAccessTokenAudience - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGrantAccessTokenAudience() { return grantAccessTokenAudience; } - public void setGrantAccessTokenAudience(List grantAccessTokenAudience) { this.grantAccessTokenAudience = grantAccessTokenAudience; } public OAuth2ConsentSession grantScope(List grantScope) { - this.grantScope = grantScope; return this; } @@ -211,110 +194,91 @@ public OAuth2ConsentSession addGrantScopeItem(String grantScopeItem) { return this; } - /** + /** * Get grantScope * @return grantScope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGrantScope() { return grantScope; } - public void setGrantScope(List grantScope) { this.grantScope = grantScope; } public OAuth2ConsentSession handledAt(OffsetDateTime handledAt) { - this.handledAt = handledAt; return this; } - /** + /** * Get handledAt * @return handledAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getHandledAt() { return handledAt; } - public void setHandledAt(OffsetDateTime handledAt) { this.handledAt = handledAt; } public OAuth2ConsentSession remember(Boolean remember) { - this.remember = remember; return this; } - /** + /** * Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. * @return remember - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.") - public Boolean getRemember() { return remember; } - public void setRemember(Boolean remember) { this.remember = remember; } public OAuth2ConsentSession rememberFor(Long rememberFor) { - this.rememberFor = rememberFor; return this; } - /** + /** * Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. * @return rememberFor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.") - public Long getRememberFor() { return rememberFor; } - public void setRememberFor(Long rememberFor) { this.rememberFor = rememberFor; } public OAuth2ConsentSession session(AcceptOAuth2ConsentRequestSession session) { - this.session = session; return this; } - /** + /** * Get session * @return session - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public AcceptOAuth2ConsentRequestSession getSession() { return session; } - public void setSession(AcceptOAuth2ConsentRequestSession session) { this.session = session; } @@ -452,37 +416,38 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2ConsentSession - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2ConsentSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2ConsentSession + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2ConsentSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentSession is not found in the empty JSON string", OAuth2ConsentSession.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `consent_request` if (jsonObj.get("consent_request") != null && !jsonObj.get("consent_request").isJsonNull()) { - OAuth2ConsentRequest.validateJsonObject(jsonObj.getAsJsonObject("consent_request")); + OAuth2ConsentRequest.validateJsonElement(jsonObj.get("consent_request")); } // validate the optional field `expires_at` if (jsonObj.get("expires_at") != null && !jsonObj.get("expires_at").isJsonNull()) { - OAuth2ConsentSessionExpiresAt.validateJsonObject(jsonObj.getAsJsonObject("expires_at")); + OAuth2ConsentSessionExpiresAt.validateJsonElement(jsonObj.get("expires_at")); } // ensure the optional json data is an array if present - if (jsonObj.get("grant_access_token_audience") != null && !jsonObj.get("grant_access_token_audience").isJsonArray()) { + if (jsonObj.get("grant_access_token_audience") != null && !jsonObj.get("grant_access_token_audience").isJsonNull() && !jsonObj.get("grant_access_token_audience").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_access_token_audience` to be an array in the JSON string but got `%s`", jsonObj.get("grant_access_token_audience").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("grant_scope") != null && !jsonObj.get("grant_scope").isJsonArray()) { + if (jsonObj.get("grant_scope") != null && !jsonObj.get("grant_scope").isJsonNull() && !jsonObj.get("grant_scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_scope` to be an array in the JSON string but got `%s`", jsonObj.get("grant_scope").toString())); } // validate the optional field `session` if (jsonObj.get("session") != null && !jsonObj.get("session").isJsonNull()) { - AcceptOAuth2ConsentRequestSession.validateJsonObject(jsonObj.getAsJsonObject("session")); + AcceptOAuth2ConsentRequestSession.validateJsonElement(jsonObj.get("session")); } } @@ -502,7 +467,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2ConsentSession value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -514,7 +479,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -523,8 +493,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2ConsentSession read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2ConsentSession instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -552,22 +523,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2ConsentSession given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2ConsentSession - * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentSession - */ + /** + * Create an instance of OAuth2ConsentSession given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2ConsentSession + * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentSession + */ public static OAuth2ConsentSession fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2ConsentSession.class); } - /** - * Convert an instance of OAuth2ConsentSession to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2ConsentSession to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java index 3b22b87b2c2..51bb48af1ad 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -49,7 +50,7 @@ /** * OAuth2ConsentSessionExpiresAt */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2ConsentSessionExpiresAt { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) @@ -75,115 +76,95 @@ public OAuth2ConsentSessionExpiresAt() { } public OAuth2ConsentSessionExpiresAt accessToken(OffsetDateTime accessToken) { - this.accessToken = accessToken; return this; } - /** + /** * Get accessToken * @return accessToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getAccessToken() { return accessToken; } - public void setAccessToken(OffsetDateTime accessToken) { this.accessToken = accessToken; } public OAuth2ConsentSessionExpiresAt authorizeCode(OffsetDateTime authorizeCode) { - this.authorizeCode = authorizeCode; return this; } - /** + /** * Get authorizeCode * @return authorizeCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getAuthorizeCode() { return authorizeCode; } - public void setAuthorizeCode(OffsetDateTime authorizeCode) { this.authorizeCode = authorizeCode; } public OAuth2ConsentSessionExpiresAt idToken(OffsetDateTime idToken) { - this.idToken = idToken; return this; } - /** + /** * Get idToken * @return idToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getIdToken() { return idToken; } - public void setIdToken(OffsetDateTime idToken) { this.idToken = idToken; } public OAuth2ConsentSessionExpiresAt parContext(OffsetDateTime parContext) { - this.parContext = parContext; return this; } - /** + /** * Get parContext * @return parContext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getParContext() { return parContext; } - public void setParContext(OffsetDateTime parContext) { this.parContext = parContext; } public OAuth2ConsentSessionExpiresAt refreshToken(OffsetDateTime refreshToken) { - this.refreshToken = refreshToken; return this; } - /** + /** * Get refreshToken * @return refreshToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getRefreshToken() { return refreshToken; } - public void setRefreshToken(OffsetDateTime refreshToken) { this.refreshToken = refreshToken; } @@ -298,18 +279,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2ConsentSessionExpiresAt - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2ConsentSessionExpiresAt.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2ConsentSessionExpiresAt + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2ConsentSessionExpiresAt.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentSessionExpiresAt is not found in the empty JSON string", OAuth2ConsentSessionExpiresAt.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -328,7 +310,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2ConsentSessionExpiresAt value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -340,7 +322,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -349,8 +336,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2ConsentSessionExpiresAt read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2ConsentSessionExpiresAt instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -378,22 +366,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2ConsentSessionExpiresAt given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2ConsentSessionExpiresAt - * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentSessionExpiresAt - */ + /** + * Create an instance of OAuth2ConsentSessionExpiresAt given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2ConsentSessionExpiresAt + * @throws IOException if the JSON string is invalid with respect to OAuth2ConsentSessionExpiresAt + */ public static OAuth2ConsentSessionExpiresAt fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2ConsentSessionExpiresAt.class); } - /** - * Convert an instance of OAuth2ConsentSessionExpiresAt to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2ConsentSessionExpiresAt to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java index 79cd0c1d891..38438636fd4 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.OAuth2Client; import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,7 +53,7 @@ /** * OAuth2LoginRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2LoginRequest { public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; @SerializedName(SERIALIZED_NAME_CHALLENGE) @@ -72,11 +73,11 @@ public class OAuth2LoginRequest { public static final String SERIALIZED_NAME_REQUESTED_ACCESS_TOKEN_AUDIENCE = "requested_access_token_audience"; @SerializedName(SERIALIZED_NAME_REQUESTED_ACCESS_TOKEN_AUDIENCE) - private List requestedAccessTokenAudience = null; + private List requestedAccessTokenAudience = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUESTED_SCOPE = "requested_scope"; @SerializedName(SERIALIZED_NAME_REQUESTED_SCOPE) - private List requestedScope = null; + private List requestedScope = new ArrayList<>(); public static final String SERIALIZED_NAME_SESSION_ID = "session_id"; @SerializedName(SERIALIZED_NAME_SESSION_ID) @@ -94,99 +95,82 @@ public OAuth2LoginRequest() { } public OAuth2LoginRequest challenge(String challenge) { - this.challenge = challenge; return this; } - /** + /** * ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. * @return challenge - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "ID is the identifier (\"login challenge\") of the login request. It is used to identify the session.") - public String getChallenge() { return challenge; } - public void setChallenge(String challenge) { this.challenge = challenge; } public OAuth2LoginRequest client(OAuth2Client client) { - this.client = client; return this; } - /** + /** * Get client * @return client - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OAuth2Client getClient() { return client; } - public void setClient(OAuth2Client client) { this.client = client; } public OAuth2LoginRequest oidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { - this.oidcContext = oidcContext; return this; } - /** + /** * Get oidcContext * @return oidcContext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2ConsentRequestOpenIDConnectContext getOidcContext() { return oidcContext; } - public void setOidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; } public OAuth2LoginRequest requestUrl(String requestUrl) { - this.requestUrl = requestUrl; return this; } - /** + /** * RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. * @return requestUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.") - public String getRequestUrl() { return requestUrl; } - public void setRequestUrl(String requestUrl) { this.requestUrl = requestUrl; } public OAuth2LoginRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { - this.requestedAccessTokenAudience = requestedAccessTokenAudience; return this; } @@ -199,25 +183,21 @@ public OAuth2LoginRequest addRequestedAccessTokenAudienceItem(String requestedAc return this; } - /** + /** * Get requestedAccessTokenAudience * @return requestedAccessTokenAudience - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequestedAccessTokenAudience() { return requestedAccessTokenAudience; } - public void setRequestedAccessTokenAudience(List requestedAccessTokenAudience) { this.requestedAccessTokenAudience = requestedAccessTokenAudience; } public OAuth2LoginRequest requestedScope(List requestedScope) { - this.requestedScope = requestedScope; return this; } @@ -230,87 +210,72 @@ public OAuth2LoginRequest addRequestedScopeItem(String requestedScopeItem) { return this; } - /** + /** * Get requestedScope * @return requestedScope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequestedScope() { return requestedScope; } - public void setRequestedScope(List requestedScope) { this.requestedScope = requestedScope; } public OAuth2LoginRequest sessionId(String sessionId) { - this.sessionId = sessionId; return this; } - /** + /** * SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. * @return sessionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.") - public String getSessionId() { return sessionId; } - public void setSessionId(String sessionId) { this.sessionId = sessionId; } public OAuth2LoginRequest skip(Boolean skip) { - this.skip = skip; return this; } - /** + /** * Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. * @return skip - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.") - public Boolean getSkip() { return skip; } - public void setSkip(Boolean skip) { this.skip = skip; } public OAuth2LoginRequest subject(String subject) { - this.subject = subject; return this; } - /** + /** * Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. * @return subject - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -442,43 +407,44 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("subject"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2LoginRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2LoginRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2LoginRequest is not found in the empty JSON string", OAuth2LoginRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OAuth2LoginRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("challenge").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `challenge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("challenge").toString())); } // validate the required field `client` - OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + OAuth2Client.validateJsonElement(jsonObj.get("client")); // validate the optional field `oidc_context` if (jsonObj.get("oidc_context") != null && !jsonObj.get("oidc_context").isJsonNull()) { - OAuth2ConsentRequestOpenIDConnectContext.validateJsonObject(jsonObj.getAsJsonObject("oidc_context")); + OAuth2ConsentRequestOpenIDConnectContext.validateJsonElement(jsonObj.get("oidc_context")); } if (!jsonObj.get("request_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `request_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_url").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("requested_access_token_audience") != null && !jsonObj.get("requested_access_token_audience").isJsonArray()) { + if (jsonObj.get("requested_access_token_audience") != null && !jsonObj.get("requested_access_token_audience").isJsonNull() && !jsonObj.get("requested_access_token_audience").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `requested_access_token_audience` to be an array in the JSON string but got `%s`", jsonObj.get("requested_access_token_audience").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("requested_scope") != null && !jsonObj.get("requested_scope").isJsonArray()) { + if (jsonObj.get("requested_scope") != null && !jsonObj.get("requested_scope").isJsonNull() && !jsonObj.get("requested_scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `requested_scope` to be an array in the JSON string but got `%s`", jsonObj.get("requested_scope").toString())); } if ((jsonObj.get("session_id") != null && !jsonObj.get("session_id").isJsonNull()) && !jsonObj.get("session_id").isJsonPrimitive()) { @@ -505,7 +471,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2LoginRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -517,7 +483,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -526,8 +497,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2LoginRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2LoginRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -555,22 +527,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2LoginRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2LoginRequest - * @throws IOException if the JSON string is invalid with respect to OAuth2LoginRequest - */ + /** + * Create an instance of OAuth2LoginRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2LoginRequest + * @throws IOException if the JSON string is invalid with respect to OAuth2LoginRequest + */ public static OAuth2LoginRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2LoginRequest.class); } - /** - * Convert an instance of OAuth2LoginRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2LoginRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java index 1ce1dd464cf..c5dd845ba84 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import sh.ory.hydra.model.OAuth2Client; import com.google.gson.Gson; @@ -35,13 +33,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -49,7 +50,7 @@ /** * OAuth2LogoutRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2LogoutRequest { public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; @SerializedName(SERIALIZED_NAME_CHALLENGE) @@ -79,138 +80,114 @@ public OAuth2LogoutRequest() { } public OAuth2LogoutRequest challenge(String challenge) { - this.challenge = challenge; return this; } - /** + /** * Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. * @return challenge - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.") - public String getChallenge() { return challenge; } - public void setChallenge(String challenge) { this.challenge = challenge; } public OAuth2LogoutRequest client(OAuth2Client client) { - this.client = client; return this; } - /** + /** * Get client * @return client - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OAuth2Client getClient() { return client; } - public void setClient(OAuth2Client client) { this.client = client; } public OAuth2LogoutRequest requestUrl(String requestUrl) { - this.requestUrl = requestUrl; return this; } - /** + /** * RequestURL is the original Logout URL requested. * @return requestUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "RequestURL is the original Logout URL requested.") - public String getRequestUrl() { return requestUrl; } - public void setRequestUrl(String requestUrl) { this.requestUrl = requestUrl; } public OAuth2LogoutRequest rpInitiated(Boolean rpInitiated) { - this.rpInitiated = rpInitiated; return this; } - /** + /** * RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. * @return rpInitiated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.") - public Boolean getRpInitiated() { return rpInitiated; } - public void setRpInitiated(Boolean rpInitiated) { this.rpInitiated = rpInitiated; } public OAuth2LogoutRequest sid(String sid) { - this.sid = sid; return this; } - /** + /** * SessionID is the login session ID that was requested to log out. * @return sid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "SessionID is the login session ID that was requested to log out.") - public String getSid() { return sid; } - public void setSid(String sid) { this.sid = sid; } public OAuth2LogoutRequest subject(String subject) { - this.subject = subject; return this; } - /** + /** * Subject is the user for whom the logout was request. * @return subject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Subject is the user for whom the logout was request.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -328,24 +305,25 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2LogoutRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2LogoutRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2LogoutRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2LogoutRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2LogoutRequest is not found in the empty JSON string", OAuth2LogoutRequest.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("challenge") != null && !jsonObj.get("challenge").isJsonNull()) && !jsonObj.get("challenge").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `challenge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("challenge").toString())); } // validate the optional field `client` if (jsonObj.get("client") != null && !jsonObj.get("client").isJsonNull()) { - OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + OAuth2Client.validateJsonElement(jsonObj.get("client")); } if ((jsonObj.get("request_url") != null && !jsonObj.get("request_url").isJsonNull()) && !jsonObj.get("request_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `request_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request_url").toString())); @@ -374,7 +352,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2LogoutRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -386,7 +364,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -395,8 +378,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2LogoutRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2LogoutRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -424,22 +408,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2LogoutRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2LogoutRequest - * @throws IOException if the JSON string is invalid with respect to OAuth2LogoutRequest - */ + /** + * Create an instance of OAuth2LogoutRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2LogoutRequest + * @throws IOException if the JSON string is invalid with respect to OAuth2LogoutRequest + */ public static OAuth2LogoutRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2LogoutRequest.class); } - /** - * Convert an instance of OAuth2LogoutRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2LogoutRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java index f1ac4e35369..de20bb9aba5 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * Contains a redirect URL used to complete a login, consent, or logout request. */ -@ApiModel(description = "Contains a redirect URL used to complete a login, consent, or logout request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2RedirectTo { public static final String SERIALIZED_NAME_REDIRECT_TO = "redirect_to"; @SerializedName(SERIALIZED_NAME_REDIRECT_TO) @@ -59,23 +59,19 @@ public OAuth2RedirectTo() { } public OAuth2RedirectTo redirectTo(String redirectTo) { - this.redirectTo = redirectTo; return this; } - /** + /** * RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. * @return redirectTo - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.") - public String getRedirectTo() { return redirectTo; } - public void setRedirectTo(String redirectTo) { this.redirectTo = redirectTo; } @@ -179,25 +175,26 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("redirect_to"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2RedirectTo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2RedirectTo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2RedirectTo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2RedirectTo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2RedirectTo is not found in the empty JSON string", OAuth2RedirectTo.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OAuth2RedirectTo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("redirect_to").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirect_to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_to").toString())); } @@ -219,7 +216,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2RedirectTo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -231,7 +228,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -240,8 +242,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2RedirectTo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2RedirectTo instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -269,22 +272,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2RedirectTo given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2RedirectTo - * @throws IOException if the JSON string is invalid with respect to OAuth2RedirectTo - */ + /** + * Create an instance of OAuth2RedirectTo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2RedirectTo + * @throws IOException if the JSON string is invalid with respect to OAuth2RedirectTo + */ public static OAuth2RedirectTo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2RedirectTo.class); } - /** - * Convert an instance of OAuth2RedirectTo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2RedirectTo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java index 26dd6e364f8..0b2b219f2b3 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * OAuth2 Token Exchange Result */ -@ApiModel(description = "OAuth2 Token Exchange Result") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OAuth2TokenExchange { public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) @@ -79,138 +79,114 @@ public OAuth2TokenExchange() { } public OAuth2TokenExchange accessToken(String accessToken) { - this.accessToken = accessToken; return this; } - /** + /** * The access token issued by the authorization server. * @return accessToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The access token issued by the authorization server.") - public String getAccessToken() { return accessToken; } - public void setAccessToken(String accessToken) { this.accessToken = accessToken; } public OAuth2TokenExchange expiresIn(Long expiresIn) { - this.expiresIn = expiresIn; return this; } - /** + /** * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated. * @return expiresIn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.") - public Long getExpiresIn() { return expiresIn; } - public void setExpiresIn(Long expiresIn) { this.expiresIn = expiresIn; } public OAuth2TokenExchange idToken(String idToken) { - this.idToken = idToken; return this; } - /** + /** * To retrieve a refresh token request the id_token scope. * @return idToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "To retrieve a refresh token request the id_token scope.") - public String getIdToken() { return idToken; } - public void setIdToken(String idToken) { this.idToken = idToken; } public OAuth2TokenExchange refreshToken(String refreshToken) { - this.refreshToken = refreshToken; return this; } - /** + /** * The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. * @return refreshToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.") - public String getRefreshToken() { return refreshToken; } - public void setRefreshToken(String refreshToken) { this.refreshToken = refreshToken; } public OAuth2TokenExchange scope(String scope) { - this.scope = scope; return this; } - /** + /** * The scope of the access token * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The scope of the access token") - public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } public OAuth2TokenExchange tokenType(String tokenType) { - this.tokenType = tokenType; return this; } - /** + /** * The type of the token issued * @return tokenType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The type of the token issued") - public String getTokenType() { return tokenType; } - public void setTokenType(String tokenType) { this.tokenType = tokenType; } @@ -328,18 +304,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OAuth2TokenExchange - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OAuth2TokenExchange.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OAuth2TokenExchange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OAuth2TokenExchange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2TokenExchange is not found in the empty JSON string", OAuth2TokenExchange.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) && !jsonObj.get("access_token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token").toString())); } @@ -373,7 +350,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OAuth2TokenExchange value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -385,7 +362,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -394,8 +376,9 @@ else if (entry.getValue() instanceof Character) @Override public OAuth2TokenExchange read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OAuth2TokenExchange instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -423,22 +406,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OAuth2TokenExchange given an JSON string - * - * @param jsonString JSON string - * @return An instance of OAuth2TokenExchange - * @throws IOException if the JSON string is invalid with respect to OAuth2TokenExchange - */ + /** + * Create an instance of OAuth2TokenExchange given an JSON string + * + * @param jsonString JSON string + * @return An instance of OAuth2TokenExchange + * @throws IOException if the JSON string is invalid with respect to OAuth2TokenExchange + */ public static OAuth2TokenExchange fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OAuth2TokenExchange.class); } - /** - * Convert an instance of OAuth2TokenExchange to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OAuth2TokenExchange to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java index 65f2b4b9342..6c7202c3279 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,16 +14,14 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.CredentialSupportedDraft00; @@ -37,13 +35,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -51,8 +52,7 @@ /** * Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. */ -@ApiModel(description = "Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OidcConfiguration { public static final String SERIALIZED_NAME_AUTHORIZATION_ENDPOINT = "authorization_endpoint"; @SerializedName(SERIALIZED_NAME_AUTHORIZATION_ENDPOINT) @@ -72,11 +72,11 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_CLAIMS_SUPPORTED = "claims_supported"; @SerializedName(SERIALIZED_NAME_CLAIMS_SUPPORTED) - private List claimsSupported = null; + private List claimsSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_CODE_CHALLENGE_METHODS_SUPPORTED = "code_challenge_methods_supported"; @SerializedName(SERIALIZED_NAME_CODE_CHALLENGE_METHODS_SUPPORTED) - private List codeChallengeMethodsSupported = null; + private List codeChallengeMethodsSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_CREDENTIALS_ENDPOINT_DRAFT00 = "credentials_endpoint_draft_00"; @SerializedName(SERIALIZED_NAME_CREDENTIALS_ENDPOINT_DRAFT00) @@ -84,7 +84,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_CREDENTIALS_SUPPORTED_DRAFT00 = "credentials_supported_draft_00"; @SerializedName(SERIALIZED_NAME_CREDENTIALS_SUPPORTED_DRAFT00) - private List credentialsSupportedDraft00 = null; + private List credentialsSupportedDraft00 = new ArrayList<>(); public static final String SERIALIZED_NAME_END_SESSION_ENDPOINT = "end_session_endpoint"; @SerializedName(SERIALIZED_NAME_END_SESSION_ENDPOINT) @@ -100,7 +100,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_GRANT_TYPES_SUPPORTED = "grant_types_supported"; @SerializedName(SERIALIZED_NAME_GRANT_TYPES_SUPPORTED) - private List grantTypesSupported = null; + private List grantTypesSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_ID_TOKEN_SIGNED_RESPONSE_ALG = "id_token_signed_response_alg"; @SerializedName(SERIALIZED_NAME_ID_TOKEN_SIGNED_RESPONSE_ALG) @@ -124,7 +124,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_REQUEST_OBJECT_SIGNING_ALG_VALUES_SUPPORTED = "request_object_signing_alg_values_supported"; @SerializedName(SERIALIZED_NAME_REQUEST_OBJECT_SIGNING_ALG_VALUES_SUPPORTED) - private List requestObjectSigningAlgValuesSupported = null; + private List requestObjectSigningAlgValuesSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED = "request_parameter_supported"; @SerializedName(SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED) @@ -140,7 +140,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED = "response_modes_supported"; @SerializedName(SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED) - private List responseModesSupported = null; + private List responseModesSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED = "response_types_supported"; @SerializedName(SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED) @@ -152,7 +152,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_SCOPES_SUPPORTED = "scopes_supported"; @SerializedName(SERIALIZED_NAME_SCOPES_SUPPORTED) - private List scopesSupported = null; + private List scopesSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED = "subject_types_supported"; @SerializedName(SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED) @@ -164,7 +164,7 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED = "token_endpoint_auth_methods_supported"; @SerializedName(SERIALIZED_NAME_TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED) - private List tokenEndpointAuthMethodsSupported = null; + private List tokenEndpointAuthMethodsSupported = new ArrayList<>(); public static final String SERIALIZED_NAME_USERINFO_ENDPOINT = "userinfo_endpoint"; @SerializedName(SERIALIZED_NAME_USERINFO_ENDPOINT) @@ -176,105 +176,88 @@ public class OidcConfiguration { public static final String SERIALIZED_NAME_USERINFO_SIGNING_ALG_VALUES_SUPPORTED = "userinfo_signing_alg_values_supported"; @SerializedName(SERIALIZED_NAME_USERINFO_SIGNING_ALG_VALUES_SUPPORTED) - private List userinfoSigningAlgValuesSupported = null; + private List userinfoSigningAlgValuesSupported = new ArrayList<>(); public OidcConfiguration() { } public OidcConfiguration authorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; return this; } - /** + /** * OAuth 2.0 Authorization Endpoint URL * @return authorizationEndpoint - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/public/oauth2/auth", required = true, value = "OAuth 2.0 Authorization Endpoint URL") - public String getAuthorizationEndpoint() { return authorizationEndpoint; } - public void setAuthorizationEndpoint(String authorizationEndpoint) { this.authorizationEndpoint = authorizationEndpoint; } public OidcConfiguration backchannelLogoutSessionSupported(Boolean backchannelLogoutSessionSupported) { - this.backchannelLogoutSessionSupported = backchannelLogoutSessionSupported; return this; } - /** + /** * OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP * @return backchannelLogoutSessionSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP") - public Boolean getBackchannelLogoutSessionSupported() { return backchannelLogoutSessionSupported; } - public void setBackchannelLogoutSessionSupported(Boolean backchannelLogoutSessionSupported) { this.backchannelLogoutSessionSupported = backchannelLogoutSessionSupported; } public OidcConfiguration backchannelLogoutSupported(Boolean backchannelLogoutSupported) { - this.backchannelLogoutSupported = backchannelLogoutSupported; return this; } - /** + /** * OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. * @return backchannelLogoutSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.") - public Boolean getBackchannelLogoutSupported() { return backchannelLogoutSupported; } - public void setBackchannelLogoutSupported(Boolean backchannelLogoutSupported) { this.backchannelLogoutSupported = backchannelLogoutSupported; } public OidcConfiguration claimsParameterSupported(Boolean claimsParameterSupported) { - this.claimsParameterSupported = claimsParameterSupported; return this; } - /** + /** * OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. * @return claimsParameterSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.") - public Boolean getClaimsParameterSupported() { return claimsParameterSupported; } - public void setClaimsParameterSupported(Boolean claimsParameterSupported) { this.claimsParameterSupported = claimsParameterSupported; } public OidcConfiguration claimsSupported(List claimsSupported) { - this.claimsSupported = claimsSupported; return this; } @@ -287,25 +270,21 @@ public OidcConfiguration addClaimsSupportedItem(String claimsSupportedItem) { return this; } - /** + /** * OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. * @return claimsSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.") - public List getClaimsSupported() { return claimsSupported; } - public void setClaimsSupported(List claimsSupported) { this.claimsSupported = claimsSupported; } public OidcConfiguration codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { - this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; return this; } @@ -318,48 +297,40 @@ public OidcConfiguration addCodeChallengeMethodsSupportedItem(String codeChallen return this; } - /** + /** * OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. * @return codeChallengeMethodsSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.") - public List getCodeChallengeMethodsSupported() { return codeChallengeMethodsSupported; } - public void setCodeChallengeMethodsSupported(List codeChallengeMethodsSupported) { this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; } public OidcConfiguration credentialsEndpointDraft00(String credentialsEndpointDraft00) { - this.credentialsEndpointDraft00 = credentialsEndpointDraft00; return this; } - /** + /** * OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint. * @return credentialsEndpointDraft00 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.") - public String getCredentialsEndpointDraft00() { return credentialsEndpointDraft00; } - public void setCredentialsEndpointDraft00(String credentialsEndpointDraft00) { this.credentialsEndpointDraft00 = credentialsEndpointDraft00; } public OidcConfiguration credentialsSupportedDraft00(List credentialsSupportedDraft00) { - this.credentialsSupportedDraft00 = credentialsSupportedDraft00; return this; } @@ -372,94 +343,78 @@ public OidcConfiguration addCredentialsSupportedDraft00Item(CredentialSupportedD return this; } - /** + /** * OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. * @return credentialsSupportedDraft00 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.") - public List getCredentialsSupportedDraft00() { return credentialsSupportedDraft00; } - public void setCredentialsSupportedDraft00(List credentialsSupportedDraft00) { this.credentialsSupportedDraft00 = credentialsSupportedDraft00; } public OidcConfiguration endSessionEndpoint(String endSessionEndpoint) { - this.endSessionEndpoint = endSessionEndpoint; return this; } - /** + /** * OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. * @return endSessionEndpoint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.") - public String getEndSessionEndpoint() { return endSessionEndpoint; } - public void setEndSessionEndpoint(String endSessionEndpoint) { this.endSessionEndpoint = endSessionEndpoint; } public OidcConfiguration frontchannelLogoutSessionSupported(Boolean frontchannelLogoutSessionSupported) { - this.frontchannelLogoutSessionSupported = frontchannelLogoutSessionSupported; return this; } - /** + /** * OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. * @return frontchannelLogoutSessionSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.") - public Boolean getFrontchannelLogoutSessionSupported() { return frontchannelLogoutSessionSupported; } - public void setFrontchannelLogoutSessionSupported(Boolean frontchannelLogoutSessionSupported) { this.frontchannelLogoutSessionSupported = frontchannelLogoutSessionSupported; } public OidcConfiguration frontchannelLogoutSupported(Boolean frontchannelLogoutSupported) { - this.frontchannelLogoutSupported = frontchannelLogoutSupported; return this; } - /** + /** * OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. * @return frontchannelLogoutSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.") - public Boolean getFrontchannelLogoutSupported() { return frontchannelLogoutSupported; } - public void setFrontchannelLogoutSupported(Boolean frontchannelLogoutSupported) { this.frontchannelLogoutSupported = frontchannelLogoutSupported; } public OidcConfiguration grantTypesSupported(List grantTypesSupported) { - this.grantTypesSupported = grantTypesSupported; return this; } @@ -472,150 +427,132 @@ public OidcConfiguration addGrantTypesSupportedItem(String grantTypesSupportedIt return this; } - /** + /** * OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. * @return grantTypesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.") - public List getGrantTypesSupported() { return grantTypesSupported; } - public void setGrantTypesSupported(List grantTypesSupported) { this.grantTypesSupported = grantTypesSupported; } public OidcConfiguration idTokenSignedResponseAlg(List idTokenSignedResponseAlg) { - this.idTokenSignedResponseAlg = idTokenSignedResponseAlg; return this; } public OidcConfiguration addIdTokenSignedResponseAlgItem(String idTokenSignedResponseAlgItem) { + if (this.idTokenSignedResponseAlg == null) { + this.idTokenSignedResponseAlg = new ArrayList<>(); + } this.idTokenSignedResponseAlg.add(idTokenSignedResponseAlgItem); return this; } - /** + /** * OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. * @return idTokenSignedResponseAlg - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens.") - public List getIdTokenSignedResponseAlg() { return idTokenSignedResponseAlg; } - public void setIdTokenSignedResponseAlg(List idTokenSignedResponseAlg) { this.idTokenSignedResponseAlg = idTokenSignedResponseAlg; } public OidcConfiguration idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { - this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; return this; } public OidcConfiguration addIdTokenSigningAlgValuesSupportedItem(String idTokenSigningAlgValuesSupportedItem) { + if (this.idTokenSigningAlgValuesSupported == null) { + this.idTokenSigningAlgValuesSupported = new ArrayList<>(); + } this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupportedItem); return this; } - /** + /** * OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. * @return idTokenSigningAlgValuesSupported - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.") - public List getIdTokenSigningAlgValuesSupported() { return idTokenSigningAlgValuesSupported; } - public void setIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; } public OidcConfiguration issuer(String issuer) { - this.issuer = issuer; return this; } - /** + /** * OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. * @return issuer - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/public/", required = true, value = "OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.") - public String getIssuer() { return issuer; } - public void setIssuer(String issuer) { this.issuer = issuer; } public OidcConfiguration jwksUri(String jwksUri) { - this.jwksUri = jwksUri; return this; } - /** + /** * OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. * @return jwksUri - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://{slug}.projects.oryapis.com/.well-known/jwks.json", required = true, value = "OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.") - public String getJwksUri() { return jwksUri; } - public void setJwksUri(String jwksUri) { this.jwksUri = jwksUri; } public OidcConfiguration registrationEndpoint(String registrationEndpoint) { - this.registrationEndpoint = registrationEndpoint; return this; } - /** + /** * OpenID Connect Dynamic Client Registration Endpoint URL * @return registrationEndpoint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/admin/client", value = "OpenID Connect Dynamic Client Registration Endpoint URL") - public String getRegistrationEndpoint() { return registrationEndpoint; } - public void setRegistrationEndpoint(String registrationEndpoint) { this.registrationEndpoint = registrationEndpoint; } public OidcConfiguration requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { - this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; return this; } @@ -628,94 +565,78 @@ public OidcConfiguration addRequestObjectSigningAlgValuesSupportedItem(String re return this; } - /** + /** * OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). * @return requestObjectSigningAlgValuesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).") - public List getRequestObjectSigningAlgValuesSupported() { return requestObjectSigningAlgValuesSupported; } - public void setRequestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; } public OidcConfiguration requestParameterSupported(Boolean requestParameterSupported) { - this.requestParameterSupported = requestParameterSupported; return this; } - /** + /** * OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. * @return requestParameterSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.") - public Boolean getRequestParameterSupported() { return requestParameterSupported; } - public void setRequestParameterSupported(Boolean requestParameterSupported) { this.requestParameterSupported = requestParameterSupported; } public OidcConfiguration requestUriParameterSupported(Boolean requestUriParameterSupported) { - this.requestUriParameterSupported = requestUriParameterSupported; return this; } - /** + /** * OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. * @return requestUriParameterSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.") - public Boolean getRequestUriParameterSupported() { return requestUriParameterSupported; } - public void setRequestUriParameterSupported(Boolean requestUriParameterSupported) { this.requestUriParameterSupported = requestUriParameterSupported; } public OidcConfiguration requireRequestUriRegistration(Boolean requireRequestUriRegistration) { - this.requireRequestUriRegistration = requireRequestUriRegistration; return this; } - /** + /** * OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. * @return requireRequestUriRegistration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.") - public Boolean getRequireRequestUriRegistration() { return requireRequestUriRegistration; } - public void setRequireRequestUriRegistration(Boolean requireRequestUriRegistration) { this.requireRequestUriRegistration = requireRequestUriRegistration; } public OidcConfiguration responseModesSupported(List responseModesSupported) { - this.responseModesSupported = responseModesSupported; return this; } @@ -728,76 +649,67 @@ public OidcConfiguration addResponseModesSupportedItem(String responseModesSuppo return this; } - /** + /** * OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. * @return responseModesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.") - public List getResponseModesSupported() { return responseModesSupported; } - public void setResponseModesSupported(List responseModesSupported) { this.responseModesSupported = responseModesSupported; } public OidcConfiguration responseTypesSupported(List responseTypesSupported) { - this.responseTypesSupported = responseTypesSupported; return this; } public OidcConfiguration addResponseTypesSupportedItem(String responseTypesSupportedItem) { + if (this.responseTypesSupported == null) { + this.responseTypesSupported = new ArrayList<>(); + } this.responseTypesSupported.add(responseTypesSupportedItem); return this; } - /** + /** * OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. * @return responseTypesSupported - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.") - public List getResponseTypesSupported() { return responseTypesSupported; } - public void setResponseTypesSupported(List responseTypesSupported) { this.responseTypesSupported = responseTypesSupported; } public OidcConfiguration revocationEndpoint(String revocationEndpoint) { - this.revocationEndpoint = revocationEndpoint; return this; } - /** + /** * OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. * @return revocationEndpoint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.") - public String getRevocationEndpoint() { return revocationEndpoint; } - public void setRevocationEndpoint(String revocationEndpoint) { this.revocationEndpoint = revocationEndpoint; } public OidcConfiguration scopesSupported(List scopesSupported) { - this.scopesSupported = scopesSupported; return this; } @@ -810,76 +722,67 @@ public OidcConfiguration addScopesSupportedItem(String scopesSupportedItem) { return this; } - /** + /** * OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used * @return scopesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used") - public List getScopesSupported() { return scopesSupported; } - public void setScopesSupported(List scopesSupported) { this.scopesSupported = scopesSupported; } public OidcConfiguration subjectTypesSupported(List subjectTypesSupported) { - this.subjectTypesSupported = subjectTypesSupported; return this; } public OidcConfiguration addSubjectTypesSupportedItem(String subjectTypesSupportedItem) { + if (this.subjectTypesSupported == null) { + this.subjectTypesSupported = new ArrayList<>(); + } this.subjectTypesSupported.add(subjectTypesSupportedItem); return this; } - /** + /** * OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. * @return subjectTypesSupported - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.") - public List getSubjectTypesSupported() { return subjectTypesSupported; } - public void setSubjectTypesSupported(List subjectTypesSupported) { this.subjectTypesSupported = subjectTypesSupported; } public OidcConfiguration tokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; return this; } - /** + /** * OAuth 2.0 Token Endpoint URL * @return tokenEndpoint - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/public/oauth2/token", required = true, value = "OAuth 2.0 Token Endpoint URL") - public String getTokenEndpoint() { return tokenEndpoint; } - public void setTokenEndpoint(String tokenEndpoint) { this.tokenEndpoint = tokenEndpoint; } public OidcConfiguration tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { - this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; return this; } @@ -892,76 +795,67 @@ public OidcConfiguration addTokenEndpointAuthMethodsSupportedItem(String tokenEn return this; } - /** + /** * OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 * @return tokenEndpointAuthMethodsSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0") - public List getTokenEndpointAuthMethodsSupported() { return tokenEndpointAuthMethodsSupported; } - public void setTokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; } public OidcConfiguration userinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; return this; } - /** + /** * OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. * @return userinfoEndpoint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.") - public String getUserinfoEndpoint() { return userinfoEndpoint; } - public void setUserinfoEndpoint(String userinfoEndpoint) { this.userinfoEndpoint = userinfoEndpoint; } public OidcConfiguration userinfoSignedResponseAlg(List userinfoSignedResponseAlg) { - this.userinfoSignedResponseAlg = userinfoSignedResponseAlg; return this; } public OidcConfiguration addUserinfoSignedResponseAlgItem(String userinfoSignedResponseAlgItem) { + if (this.userinfoSignedResponseAlg == null) { + this.userinfoSignedResponseAlg = new ArrayList<>(); + } this.userinfoSignedResponseAlg.add(userinfoSignedResponseAlgItem); return this; } - /** + /** * OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. * @return userinfoSignedResponseAlg - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses.") - public List getUserinfoSignedResponseAlg() { return userinfoSignedResponseAlg; } - public void setUserinfoSignedResponseAlg(List userinfoSignedResponseAlg) { this.userinfoSignedResponseAlg = userinfoSignedResponseAlg; } public OidcConfiguration userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { - this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; return this; } @@ -974,18 +868,15 @@ public OidcConfiguration addUserinfoSigningAlgValuesSupportedItem(String userinf return this; } - /** + /** * OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. * @return userinfoSigningAlgValuesSupported - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].") - public List getUserinfoSigningAlgValuesSupported() { return userinfoSigningAlgValuesSupported; } - public void setUserinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; } @@ -1187,34 +1078,35 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("userinfo_signed_response_alg"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OidcConfiguration - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OidcConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OidcConfiguration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OidcConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OidcConfiguration is not found in the empty JSON string", OidcConfiguration.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OidcConfiguration.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorization_endpoint").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `authorization_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_endpoint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("claims_supported") != null && !jsonObj.get("claims_supported").isJsonArray()) { + if (jsonObj.get("claims_supported") != null && !jsonObj.get("claims_supported").isJsonNull() && !jsonObj.get("claims_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `claims_supported` to be an array in the JSON string but got `%s`", jsonObj.get("claims_supported").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("code_challenge_methods_supported") != null && !jsonObj.get("code_challenge_methods_supported").isJsonArray()) { + if (jsonObj.get("code_challenge_methods_supported") != null && !jsonObj.get("code_challenge_methods_supported").isJsonNull() && !jsonObj.get("code_challenge_methods_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `code_challenge_methods_supported` to be an array in the JSON string but got `%s`", jsonObj.get("code_challenge_methods_supported").toString())); } if ((jsonObj.get("credentials_endpoint_draft_00") != null && !jsonObj.get("credentials_endpoint_draft_00").isJsonNull()) && !jsonObj.get("credentials_endpoint_draft_00").isJsonPrimitive()) { @@ -1230,7 +1122,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `credentials_supported_draft_00` (array) for (int i = 0; i < jsonArraycredentialsSupportedDraft00.size(); i++) { - CredentialSupportedDraft00.validateJsonObject(jsonArraycredentialsSupportedDraft00.get(i).getAsJsonObject()); + CredentialSupportedDraft00.validateJsonElement(jsonArraycredentialsSupportedDraft00.get(i)); }; } } @@ -1238,7 +1130,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `end_session_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("end_session_endpoint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("grant_types_supported") != null && !jsonObj.get("grant_types_supported").isJsonArray()) { + if (jsonObj.get("grant_types_supported") != null && !jsonObj.get("grant_types_supported").isJsonNull() && !jsonObj.get("grant_types_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grant_types_supported` to be an array in the JSON string but got `%s`", jsonObj.get("grant_types_supported").toString())); } // ensure the required json array is present @@ -1263,11 +1155,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `registration_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registration_endpoint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("request_object_signing_alg_values_supported") != null && !jsonObj.get("request_object_signing_alg_values_supported").isJsonArray()) { + if (jsonObj.get("request_object_signing_alg_values_supported") != null && !jsonObj.get("request_object_signing_alg_values_supported").isJsonNull() && !jsonObj.get("request_object_signing_alg_values_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `request_object_signing_alg_values_supported` to be an array in the JSON string but got `%s`", jsonObj.get("request_object_signing_alg_values_supported").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("response_modes_supported") != null && !jsonObj.get("response_modes_supported").isJsonArray()) { + if (jsonObj.get("response_modes_supported") != null && !jsonObj.get("response_modes_supported").isJsonNull() && !jsonObj.get("response_modes_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `response_modes_supported` to be an array in the JSON string but got `%s`", jsonObj.get("response_modes_supported").toString())); } // ensure the required json array is present @@ -1280,7 +1172,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `revocation_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revocation_endpoint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("scopes_supported") != null && !jsonObj.get("scopes_supported").isJsonArray()) { + if (jsonObj.get("scopes_supported") != null && !jsonObj.get("scopes_supported").isJsonNull() && !jsonObj.get("scopes_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `scopes_supported` to be an array in the JSON string but got `%s`", jsonObj.get("scopes_supported").toString())); } // ensure the required json array is present @@ -1293,7 +1185,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `token_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_endpoint").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("token_endpoint_auth_methods_supported") != null && !jsonObj.get("token_endpoint_auth_methods_supported").isJsonArray()) { + if (jsonObj.get("token_endpoint_auth_methods_supported") != null && !jsonObj.get("token_endpoint_auth_methods_supported").isJsonNull() && !jsonObj.get("token_endpoint_auth_methods_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `token_endpoint_auth_methods_supported` to be an array in the JSON string but got `%s`", jsonObj.get("token_endpoint_auth_methods_supported").toString())); } if ((jsonObj.get("userinfo_endpoint") != null && !jsonObj.get("userinfo_endpoint").isJsonNull()) && !jsonObj.get("userinfo_endpoint").isJsonPrimitive()) { @@ -1306,7 +1198,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `userinfo_signed_response_alg` to be an array in the JSON string but got `%s`", jsonObj.get("userinfo_signed_response_alg").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("userinfo_signing_alg_values_supported") != null && !jsonObj.get("userinfo_signing_alg_values_supported").isJsonArray()) { + if (jsonObj.get("userinfo_signing_alg_values_supported") != null && !jsonObj.get("userinfo_signing_alg_values_supported").isJsonNull() && !jsonObj.get("userinfo_signing_alg_values_supported").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `userinfo_signing_alg_values_supported` to be an array in the JSON string but got `%s`", jsonObj.get("userinfo_signing_alg_values_supported").toString())); } } @@ -1327,7 +1219,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OidcConfiguration value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -1339,7 +1231,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -1348,8 +1245,9 @@ else if (entry.getValue() instanceof Character) @Override public OidcConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OidcConfiguration instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -1377,22 +1275,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OidcConfiguration given an JSON string - * - * @param jsonString JSON string - * @return An instance of OidcConfiguration - * @throws IOException if the JSON string is invalid with respect to OidcConfiguration - */ + /** + * Create an instance of OidcConfiguration given an JSON string + * + * @param jsonString JSON string + * @return An instance of OidcConfiguration + * @throws IOException if the JSON string is invalid with respect to OidcConfiguration + */ public static OidcConfiguration fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OidcConfiguration.class); } - /** - * Convert an instance of OidcConfiguration to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OidcConfiguration to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java index c2fd41e2e06..d5eeaf0a43c 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * OpenID Connect Userinfo */ -@ApiModel(description = "OpenID Connect Userinfo") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OidcUserInfo { public static final String SERIALIZED_NAME_BIRTHDATE = "birthdate"; @SerializedName(SERIALIZED_NAME_BIRTHDATE) @@ -131,437 +131,361 @@ public OidcUserInfo() { } public OidcUserInfo birthdate(String birthdate) { - this.birthdate = birthdate; return this; } - /** + /** * End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. * @return birthdate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.") - public String getBirthdate() { return birthdate; } - public void setBirthdate(String birthdate) { this.birthdate = birthdate; } public OidcUserInfo email(String email) { - this.email = email; return this; } - /** + /** * End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. * @return email - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.") - public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public OidcUserInfo emailVerified(Boolean emailVerified) { - this.emailVerified = emailVerified; return this; } - /** + /** * True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. * @return emailVerified - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.") - public Boolean getEmailVerified() { return emailVerified; } - public void setEmailVerified(Boolean emailVerified) { this.emailVerified = emailVerified; } public OidcUserInfo familyName(String familyName) { - this.familyName = familyName; return this; } - /** + /** * Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. * @return familyName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.") - public String getFamilyName() { return familyName; } - public void setFamilyName(String familyName) { this.familyName = familyName; } public OidcUserInfo gender(String gender) { - this.gender = gender; return this; } - /** + /** * End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. * @return gender - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.") - public String getGender() { return gender; } - public void setGender(String gender) { this.gender = gender; } public OidcUserInfo givenName(String givenName) { - this.givenName = givenName; return this; } - /** + /** * Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. * @return givenName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.") - public String getGivenName() { return givenName; } - public void setGivenName(String givenName) { this.givenName = givenName; } public OidcUserInfo locale(String locale) { - this.locale = locale; return this; } - /** + /** * End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. * @return locale - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.") - public String getLocale() { return locale; } - public void setLocale(String locale) { this.locale = locale; } public OidcUserInfo middleName(String middleName) { - this.middleName = middleName; return this; } - /** + /** * Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. * @return middleName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.") - public String getMiddleName() { return middleName; } - public void setMiddleName(String middleName) { this.middleName = middleName; } public OidcUserInfo name(String name) { - this.name = name; return this; } - /** + /** * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.") - public String getName() { return name; } - public void setName(String name) { this.name = name; } public OidcUserInfo nickname(String nickname) { - this.nickname = nickname; return this; } - /** + /** * Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. * @return nickname - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.") - public String getNickname() { return nickname; } - public void setNickname(String nickname) { this.nickname = nickname; } public OidcUserInfo phoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; return this; } - /** + /** * End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. * @return phoneNumber - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.") - public String getPhoneNumber() { return phoneNumber; } - public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public OidcUserInfo phoneNumberVerified(Boolean phoneNumberVerified) { - this.phoneNumberVerified = phoneNumberVerified; return this; } - /** + /** * True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. * @return phoneNumberVerified - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.") - public Boolean getPhoneNumberVerified() { return phoneNumberVerified; } - public void setPhoneNumberVerified(Boolean phoneNumberVerified) { this.phoneNumberVerified = phoneNumberVerified; } public OidcUserInfo picture(String picture) { - this.picture = picture; return this; } - /** + /** * URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. * @return picture - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.") - public String getPicture() { return picture; } - public void setPicture(String picture) { this.picture = picture; } public OidcUserInfo preferredUsername(String preferredUsername) { - this.preferredUsername = preferredUsername; return this; } - /** + /** * Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. * @return preferredUsername - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.") - public String getPreferredUsername() { return preferredUsername; } - public void setPreferredUsername(String preferredUsername) { this.preferredUsername = preferredUsername; } public OidcUserInfo profile(String profile) { - this.profile = profile; return this; } - /** + /** * URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. * @return profile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.") - public String getProfile() { return profile; } - public void setProfile(String profile) { this.profile = profile; } public OidcUserInfo sub(String sub) { - this.sub = sub; return this; } - /** + /** * Subject - Identifier for the End-User at the IssuerURL. * @return sub - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Subject - Identifier for the End-User at the IssuerURL.") - public String getSub() { return sub; } - public void setSub(String sub) { this.sub = sub; } public OidcUserInfo updatedAt(Long updatedAt) { - this.updatedAt = updatedAt; return this; } - /** + /** * Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.") - public Long getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(Long updatedAt) { this.updatedAt = updatedAt; } public OidcUserInfo website(String website) { - this.website = website; return this; } - /** + /** * URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. * @return website - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.") - public String getWebsite() { return website; } - public void setWebsite(String website) { this.website = website; } public OidcUserInfo zoneinfo(String zoneinfo) { - this.zoneinfo = zoneinfo; return this; } - /** + /** * String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. * @return zoneinfo - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.") - public String getZoneinfo() { return zoneinfo; } - public void setZoneinfo(String zoneinfo) { this.zoneinfo = zoneinfo; } @@ -718,18 +642,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OidcUserInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OidcUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OidcUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OidcUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OidcUserInfo is not found in the empty JSON string", OidcUserInfo.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("birthdate") != null && !jsonObj.get("birthdate").isJsonNull()) && !jsonObj.get("birthdate").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `birthdate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("birthdate").toString())); } @@ -796,7 +721,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, OidcUserInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -808,7 +733,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -817,8 +747,9 @@ else if (entry.getValue() instanceof Character) @Override public OidcUserInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance OidcUserInfo instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -846,22 +777,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of OidcUserInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of OidcUserInfo - * @throws IOException if the JSON string is invalid with respect to OidcUserInfo - */ + /** + * Create an instance of OidcUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OidcUserInfo + * @throws IOException if the JSON string is invalid with respect to OidcUserInfo + */ public static OidcUserInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OidcUserInfo.class); } - /** - * Convert an instance of OidcUserInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OidcUserInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java index ddcb720b1ab..79947ecbb48 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * Pagination */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Pagination { public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; @SerializedName(SERIALIZED_NAME_PAGE_SIZE) @@ -62,48 +63,40 @@ public Pagination() { } public Pagination pageSize(Long pageSize) { - this.pageSize = pageSize; return this; } - /** + /** * Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * minimum: 1 * maximum: 1000 * @return pageSize - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public Long getPageSize() { return pageSize; } - public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public Pagination pageToken(String pageToken) { - this.pageToken = pageToken; return this; } - /** + /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @return pageToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public String getPageToken() { return pageToken; } - public void setPageToken(String pageToken) { this.pageToken = pageToken; } @@ -209,18 +202,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Pagination - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Pagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Pagination + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Pagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Pagination is not found in the empty JSON string", Pagination.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("page_token") != null && !jsonObj.get("page_token").isJsonNull()) && !jsonObj.get("page_token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `page_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_token").toString())); } @@ -242,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Pagination value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -254,7 +248,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -263,8 +262,9 @@ else if (entry.getValue() instanceof Character) @Override public Pagination read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance Pagination instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -292,22 +292,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of Pagination given an JSON string - * - * @param jsonString JSON string - * @return An instance of Pagination - * @throws IOException if the JSON string is invalid with respect to Pagination - */ + /** + * Create an instance of Pagination given an JSON string + * + * @param jsonString JSON string + * @return An instance of Pagination + * @throws IOException if the JSON string is invalid with respect to Pagination + */ public static Pagination fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Pagination.class); } - /** - * Convert an instance of Pagination to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Pagination to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java index 8dd2f269f9e..d74afbf1c3f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * PaginationHeaders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PaginationHeaders { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) @@ -62,46 +63,38 @@ public PaginationHeaders() { } public PaginationHeaders link(String link) { - this.link = link; return this; } - /** + /** * The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header * @return link - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header") - public String getLink() { return link; } - public void setLink(String link) { this.link = link; } public PaginationHeaders xTotalCount(String xTotalCount) { - this.xTotalCount = xTotalCount; return this; } - /** + /** * The total number of clients. in: header * @return xTotalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The total number of clients. in: header") - public String getxTotalCount() { return xTotalCount; } - public void setxTotalCount(String xTotalCount) { this.xTotalCount = xTotalCount; } @@ -207,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PaginationHeaders - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PaginationHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PaginationHeaders + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginationHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in PaginationHeaders is not found in the empty JSON string", PaginationHeaders.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); } @@ -243,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, PaginationHeaders value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -255,7 +249,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -264,8 +263,9 @@ else if (entry.getValue() instanceof Character) @Override public PaginationHeaders read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance PaginationHeaders instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -293,22 +293,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of PaginationHeaders given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginationHeaders - * @throws IOException if the JSON string is invalid with respect to PaginationHeaders - */ + /** + * Create an instance of PaginationHeaders given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginationHeaders + * @throws IOException if the JSON string is invalid with respect to PaginationHeaders + */ public static PaginationHeaders fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PaginationHeaders.class); } - /** - * Convert an instance of PaginationHeaders to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PaginationHeaders to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RFC6749ErrorJson.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RFC6749ErrorJson.java index 20470c88e3f..cf25b0b3981 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RFC6749ErrorJson.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RFC6749ErrorJson.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * RFC6749ErrorJson */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class RFC6749ErrorJson { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -74,115 +75,95 @@ public RFC6749ErrorJson() { } public RFC6749ErrorJson error(String error) { - this.error = error; return this; } - /** + /** * Get error * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getError() { return error; } - public void setError(String error) { this.error = error; } public RFC6749ErrorJson errorDebug(String errorDebug) { - this.errorDebug = errorDebug; return this; } - /** + /** * Get errorDebug * @return errorDebug - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorDebug() { return errorDebug; } - public void setErrorDebug(String errorDebug) { this.errorDebug = errorDebug; } public RFC6749ErrorJson errorDescription(String errorDescription) { - this.errorDescription = errorDescription; return this; } - /** + /** * Get errorDescription * @return errorDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorDescription() { return errorDescription; } - public void setErrorDescription(String errorDescription) { this.errorDescription = errorDescription; } public RFC6749ErrorJson errorHint(String errorHint) { - this.errorHint = errorHint; return this; } - /** + /** * Get errorHint * @return errorHint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorHint() { return errorHint; } - public void setErrorHint(String errorHint) { this.errorHint = errorHint; } public RFC6749ErrorJson statusCode(Long statusCode) { - this.statusCode = statusCode; return this; } - /** + /** * Get statusCode * @return statusCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getStatusCode() { return statusCode; } - public void setStatusCode(Long statusCode) { this.statusCode = statusCode; } @@ -297,18 +278,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RFC6749ErrorJson - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RFC6749ErrorJson.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RFC6749ErrorJson + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RFC6749ErrorJson.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RFC6749ErrorJson is not found in the empty JSON string", RFC6749ErrorJson.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -339,7 +321,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, RFC6749ErrorJson value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -351,7 +333,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -360,8 +347,9 @@ else if (entry.getValue() instanceof Character) @Override public RFC6749ErrorJson read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance RFC6749ErrorJson instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -389,22 +377,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of RFC6749ErrorJson given an JSON string - * - * @param jsonString JSON string - * @return An instance of RFC6749ErrorJson - * @throws IOException if the JSON string is invalid with respect to RFC6749ErrorJson - */ + /** + * Create an instance of RFC6749ErrorJson given an JSON string + * + * @param jsonString JSON string + * @return An instance of RFC6749ErrorJson + * @throws IOException if the JSON string is invalid with respect to RFC6749ErrorJson + */ public static RFC6749ErrorJson fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RFC6749ErrorJson.class); } - /** - * Convert an instance of RFC6749ErrorJson to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RFC6749ErrorJson to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java index 7dc7cfa23ae..6a1c7c8cf82 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * RejectOAuth2Request */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class RejectOAuth2Request { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -74,115 +75,95 @@ public RejectOAuth2Request() { } public RejectOAuth2Request error(String error) { - this.error = error; return this; } - /** + /** * The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.") - public String getError() { return error; } - public void setError(String error) { this.error = error; } public RejectOAuth2Request errorDebug(String errorDebug) { - this.errorDebug = errorDebug; return this; } - /** + /** * Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. * @return errorDebug - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.") - public String getErrorDebug() { return errorDebug; } - public void setErrorDebug(String errorDebug) { this.errorDebug = errorDebug; } public RejectOAuth2Request errorDescription(String errorDescription) { - this.errorDescription = errorDescription; return this; } - /** + /** * Description of the error in a human readable format. * @return errorDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Description of the error in a human readable format.") - public String getErrorDescription() { return errorDescription; } - public void setErrorDescription(String errorDescription) { this.errorDescription = errorDescription; } public RejectOAuth2Request errorHint(String errorHint) { - this.errorHint = errorHint; return this; } - /** + /** * Hint to help resolve the error. * @return errorHint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Hint to help resolve the error.") - public String getErrorHint() { return errorHint; } - public void setErrorHint(String errorHint) { this.errorHint = errorHint; } public RejectOAuth2Request statusCode(Long statusCode) { - this.statusCode = statusCode; return this; } - /** + /** * Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 * @return statusCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400") - public Long getStatusCode() { return statusCode; } - public void setStatusCode(Long statusCode) { this.statusCode = statusCode; } @@ -297,18 +278,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RejectOAuth2Request - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RejectOAuth2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RejectOAuth2Request + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RejectOAuth2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RejectOAuth2Request is not found in the empty JSON string", RejectOAuth2Request.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -339,7 +321,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, RejectOAuth2Request value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -351,7 +333,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -360,8 +347,9 @@ else if (entry.getValue() instanceof Character) @Override public RejectOAuth2Request read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance RejectOAuth2Request instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -389,22 +377,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of RejectOAuth2Request given an JSON string - * - * @param jsonString JSON string - * @return An instance of RejectOAuth2Request - * @throws IOException if the JSON string is invalid with respect to RejectOAuth2Request - */ + /** + * Create an instance of RejectOAuth2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of RejectOAuth2Request + * @throws IOException if the JSON string is invalid with respect to RejectOAuth2Request + */ public static RejectOAuth2Request fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RejectOAuth2Request.class); } - /** - * Convert an instance of RejectOAuth2Request to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RejectOAuth2Request to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java index 4d0b86fe4fa..59e31978655 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * TokenPagination */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TokenPagination { public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; @SerializedName(SERIALIZED_NAME_PAGE_SIZE) @@ -62,48 +63,40 @@ public TokenPagination() { } public TokenPagination pageSize(Long pageSize) { - this.pageSize = pageSize; return this; } - /** + /** * Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * minimum: 1 * maximum: 1000 * @return pageSize - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public Long getPageSize() { return pageSize; } - public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public TokenPagination pageToken(String pageToken) { - this.pageToken = pageToken; return this; } - /** + /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @return pageToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public String getPageToken() { return pageToken; } - public void setPageToken(String pageToken) { this.pageToken = pageToken; } @@ -209,18 +202,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenPagination - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TokenPagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenPagination + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenPagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPagination is not found in the empty JSON string", TokenPagination.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("page_token") != null && !jsonObj.get("page_token").isJsonNull()) && !jsonObj.get("page_token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `page_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_token").toString())); } @@ -242,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TokenPagination value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -254,7 +248,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -263,8 +262,9 @@ else if (entry.getValue() instanceof Character) @Override public TokenPagination read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TokenPagination instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -292,22 +292,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TokenPagination given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenPagination - * @throws IOException if the JSON string is invalid with respect to TokenPagination - */ + /** + * Create an instance of TokenPagination given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenPagination + * @throws IOException if the JSON string is invalid with respect to TokenPagination + */ public static TokenPagination fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenPagination.class); } - /** - * Convert an instance of TokenPagination to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenPagination to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java index 4c0b63ff219..afa40ef2c9b 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * TokenPaginationHeaders */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TokenPaginationHeaders { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) @@ -62,46 +63,38 @@ public TokenPaginationHeaders() { } public TokenPaginationHeaders link(String link) { - this.link = link; return this; } - /** + /** * The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header * @return link - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header") - public String getLink() { return link; } - public void setLink(String link) { this.link = link; } public TokenPaginationHeaders xTotalCount(String xTotalCount) { - this.xTotalCount = xTotalCount; return this; } - /** + /** * The total number of clients. in: header * @return xTotalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The total number of clients. in: header") - public String getxTotalCount() { return xTotalCount; } - public void setxTotalCount(String xTotalCount) { this.xTotalCount = xTotalCount; } @@ -207,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenPaginationHeaders - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TokenPaginationHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenPaginationHeaders + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenPaginationHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationHeaders is not found in the empty JSON string", TokenPaginationHeaders.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); } @@ -243,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TokenPaginationHeaders value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -255,7 +249,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -264,8 +263,9 @@ else if (entry.getValue() instanceof Character) @Override public TokenPaginationHeaders read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TokenPaginationHeaders instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -293,22 +293,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TokenPaginationHeaders given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenPaginationHeaders - * @throws IOException if the JSON string is invalid with respect to TokenPaginationHeaders - */ + /** + * Create an instance of TokenPaginationHeaders given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenPaginationHeaders + * @throws IOException if the JSON string is invalid with respect to TokenPaginationHeaders + */ public static TokenPaginationHeaders fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenPaginationHeaders.class); } - /** - * Convert an instance of TokenPaginationHeaders to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenPaginationHeaders to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java index 4360b9e25f8..27a2758724f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). */ -@ApiModel(description = "The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TokenPaginationRequestParameters { public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; @SerializedName(SERIALIZED_NAME_PAGE_SIZE) @@ -63,48 +63,40 @@ public TokenPaginationRequestParameters() { } public TokenPaginationRequestParameters pageSize(Long pageSize) { - this.pageSize = pageSize; return this; } - /** + /** * Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * minimum: 1 * maximum: 500 * @return pageSize - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public Long getPageSize() { return pageSize; } - public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public TokenPaginationRequestParameters pageToken(String pageToken) { - this.pageToken = pageToken; return this; } - /** + /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @return pageToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") - public String getPageToken() { return pageToken; } - public void setPageToken(String pageToken) { this.pageToken = pageToken; } @@ -210,18 +202,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenPaginationRequestParameters - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TokenPaginationRequestParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenPaginationRequestParameters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenPaginationRequestParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationRequestParameters is not found in the empty JSON string", TokenPaginationRequestParameters.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("page_token") != null && !jsonObj.get("page_token").isJsonNull()) && !jsonObj.get("page_token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `page_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("page_token").toString())); } @@ -243,7 +236,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TokenPaginationRequestParameters value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -255,7 +248,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -264,8 +262,9 @@ else if (entry.getValue() instanceof Character) @Override public TokenPaginationRequestParameters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TokenPaginationRequestParameters instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -293,22 +292,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TokenPaginationRequestParameters given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenPaginationRequestParameters - * @throws IOException if the JSON string is invalid with respect to TokenPaginationRequestParameters - */ + /** + * Create an instance of TokenPaginationRequestParameters given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenPaginationRequestParameters + * @throws IOException if the JSON string is invalid with respect to TokenPaginationRequestParameters + */ public static TokenPaginationRequestParameters fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenPaginationRequestParameters.class); } - /** - * Convert an instance of TokenPaginationRequestParameters to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenPaginationRequestParameters to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java index 4b88eec0aeb..f2b543024d9 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). */ -@ApiModel(description = "The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TokenPaginationResponseHeaders { public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) @@ -63,46 +63,38 @@ public TokenPaginationResponseHeaders() { } public TokenPaginationResponseHeaders link(String link) { - this.link = link; return this; } - /** + /** * The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\" * @return link - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: ; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\"") - public String getLink() { return link; } - public void setLink(String link) { this.link = link; } public TokenPaginationResponseHeaders xTotalCount(Long xTotalCount) { - this.xTotalCount = xTotalCount; return this; } - /** + /** * The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. * @return xTotalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.") - public Long getxTotalCount() { return xTotalCount; } - public void setxTotalCount(Long xTotalCount) { this.xTotalCount = xTotalCount; } @@ -208,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenPaginationResponseHeaders - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TokenPaginationResponseHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenPaginationResponseHeaders + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenPaginationResponseHeaders.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationResponseHeaders is not found in the empty JSON string", TokenPaginationResponseHeaders.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); } @@ -241,7 +234,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TokenPaginationResponseHeaders value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -253,7 +246,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -262,8 +260,9 @@ else if (entry.getValue() instanceof Character) @Override public TokenPaginationResponseHeaders read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TokenPaginationResponseHeaders instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -291,22 +290,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TokenPaginationResponseHeaders given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenPaginationResponseHeaders - * @throws IOException if the JSON string is invalid with respect to TokenPaginationResponseHeaders - */ + /** + * Create an instance of TokenPaginationResponseHeaders given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenPaginationResponseHeaders + * @throws IOException if the JSON string is invalid with respect to TokenPaginationResponseHeaders + */ public static TokenPaginationResponseHeaders fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenPaginationResponseHeaders.class); } - /** - * Convert an instance of TokenPaginationResponseHeaders to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenPaginationResponseHeaders to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java index 883b4871c6f..4f3509f7b15 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,17 +14,15 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.JsonWebKey; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,8 +53,7 @@ /** * Trust OAuth2 JWT Bearer Grant Type Issuer Request Body */ -@ApiModel(description = "Trust OAuth2 JWT Bearer Grant Type Issuer Request Body") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TrustOAuth2JwtGrantIssuer { public static final String SERIALIZED_NAME_ALLOW_ANY_SUBJECT = "allow_any_subject"; @SerializedName(SERIALIZED_NAME_ALLOW_ANY_SUBJECT) @@ -83,143 +83,122 @@ public TrustOAuth2JwtGrantIssuer() { } public TrustOAuth2JwtGrantIssuer allowAnySubject(Boolean allowAnySubject) { - this.allowAnySubject = allowAnySubject; return this; } - /** + /** * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. * @return allowAnySubject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.") - public Boolean getAllowAnySubject() { return allowAnySubject; } - public void setAllowAnySubject(Boolean allowAnySubject) { this.allowAnySubject = allowAnySubject; } public TrustOAuth2JwtGrantIssuer expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = expiresAt; return this; } - /** + /** * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". * @return expiresAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".") - public OffsetDateTime getExpiresAt() { return expiresAt; } - public void setExpiresAt(OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } public TrustOAuth2JwtGrantIssuer issuer(String issuer) { - this.issuer = issuer; return this; } - /** + /** * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). * @return issuer - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://jwt-idp.example.com", required = true, value = "The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).") - public String getIssuer() { return issuer; } - public void setIssuer(String issuer) { this.issuer = issuer; } public TrustOAuth2JwtGrantIssuer jwk(JsonWebKey jwk) { - this.jwk = jwk; return this; } - /** + /** * Get jwk * @return jwk - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public JsonWebKey getJwk() { return jwk; } - public void setJwk(JsonWebKey jwk) { this.jwk = jwk; } public TrustOAuth2JwtGrantIssuer scope(List scope) { - this.scope = scope; return this; } public TrustOAuth2JwtGrantIssuer addScopeItem(String scopeItem) { + if (this.scope == null) { + this.scope = new ArrayList<>(); + } this.scope.add(scopeItem); return this; } - /** + /** * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) * @return scope - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[\"openid\",\"offline\"]", required = true, value = "The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])") - public List getScope() { return scope; } - public void setScope(List scope) { this.scope = scope; } public TrustOAuth2JwtGrantIssuer subject(String subject) { - this.subject = subject; return this; } - /** + /** * The \"subject\" identifies the principal that is the subject of the JWT. * @return subject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "mike@example.com", value = "The \"subject\" identifies the principal that is the subject of the JWT.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -341,30 +320,31 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("scope"); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TrustOAuth2JwtGrantIssuer - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TrustOAuth2JwtGrantIssuer.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TrustOAuth2JwtGrantIssuer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TrustOAuth2JwtGrantIssuer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TrustOAuth2JwtGrantIssuer is not found in the empty JSON string", TrustOAuth2JwtGrantIssuer.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TrustOAuth2JwtGrantIssuer.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("issuer").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuer").toString())); } // validate the required field `jwk` - JsonWebKey.validateJsonObject(jsonObj.getAsJsonObject("jwk")); + JsonWebKey.validateJsonElement(jsonObj.get("jwk")); // ensure the required json array is present if (jsonObj.get("scope") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -392,7 +372,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TrustOAuth2JwtGrantIssuer value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -404,7 +384,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -413,8 +398,9 @@ else if (entry.getValue() instanceof Character) @Override public TrustOAuth2JwtGrantIssuer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TrustOAuth2JwtGrantIssuer instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -442,22 +428,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TrustOAuth2JwtGrantIssuer given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustOAuth2JwtGrantIssuer - * @throws IOException if the JSON string is invalid with respect to TrustOAuth2JwtGrantIssuer - */ + /** + * Create an instance of TrustOAuth2JwtGrantIssuer given an JSON string + * + * @param jsonString JSON string + * @return An instance of TrustOAuth2JwtGrantIssuer + * @throws IOException if the JSON string is invalid with respect to TrustOAuth2JwtGrantIssuer + */ public static TrustOAuth2JwtGrantIssuer fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TrustOAuth2JwtGrantIssuer.class); } - /** - * Convert an instance of TrustOAuth2JwtGrantIssuer to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TrustOAuth2JwtGrantIssuer to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java index e933ce30663..5cb13eb7815 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,17 +14,15 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.TrustedOAuth2JwtGrantJsonWebKey; @@ -38,13 +36,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -52,8 +53,7 @@ /** * OAuth2 JWT Bearer Grant Type Issuer Trust Relationship */ -@ApiModel(description = "OAuth2 JWT Bearer Grant Type Issuer Trust Relationship") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TrustedOAuth2JwtGrantIssuer { public static final String SERIALIZED_NAME_ALLOW_ANY_SUBJECT = "allow_any_subject"; @SerializedName(SERIALIZED_NAME_ALLOW_ANY_SUBJECT) @@ -81,7 +81,7 @@ public class TrustedOAuth2JwtGrantIssuer { public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = null; + private List scope = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBJECT = "subject"; @SerializedName(SERIALIZED_NAME_SUBJECT) @@ -91,145 +91,120 @@ public TrustedOAuth2JwtGrantIssuer() { } public TrustedOAuth2JwtGrantIssuer allowAnySubject(Boolean allowAnySubject) { - this.allowAnySubject = allowAnySubject; return this; } - /** + /** * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. * @return allowAnySubject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.") - public Boolean getAllowAnySubject() { return allowAnySubject; } - public void setAllowAnySubject(Boolean allowAnySubject) { this.allowAnySubject = allowAnySubject; } public TrustedOAuth2JwtGrantIssuer createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; return this; } - /** + /** * The \"created_at\" indicates, when grant was created. * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The \"created_at\" indicates, when grant was created.") - public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } public TrustedOAuth2JwtGrantIssuer expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = expiresAt; return this; } - /** + /** * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". * @return expiresAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".") - public OffsetDateTime getExpiresAt() { return expiresAt; } - public void setExpiresAt(OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } public TrustedOAuth2JwtGrantIssuer id(String id) { - this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "9edc811f-4e28-453c-9b46-4de65f00217f", value = "") - public String getId() { return id; } - public void setId(String id) { this.id = id; } public TrustedOAuth2JwtGrantIssuer issuer(String issuer) { - this.issuer = issuer; return this; } - /** + /** * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). * @return issuer - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://jwt-idp.example.com", value = "The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).") - public String getIssuer() { return issuer; } - public void setIssuer(String issuer) { this.issuer = issuer; } public TrustedOAuth2JwtGrantIssuer publicKey(TrustedOAuth2JwtGrantJsonWebKey publicKey) { - this.publicKey = publicKey; return this; } - /** + /** * Get publicKey * @return publicKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TrustedOAuth2JwtGrantJsonWebKey getPublicKey() { return publicKey; } - public void setPublicKey(TrustedOAuth2JwtGrantJsonWebKey publicKey) { this.publicKey = publicKey; } public TrustedOAuth2JwtGrantIssuer scope(List scope) { - this.scope = scope; return this; } @@ -242,41 +217,34 @@ public TrustedOAuth2JwtGrantIssuer addScopeItem(String scopeItem) { return this; } - /** + /** * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) * @return scope - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "[\"openid\",\"offline\"]", value = "The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])") - public List getScope() { return scope; } - public void setScope(List scope) { this.scope = scope; } public TrustedOAuth2JwtGrantIssuer subject(String subject) { - this.subject = subject; return this; } - /** + /** * The \"subject\" identifies the principal that is the subject of the JWT. * @return subject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "mike@example.com", value = "The \"subject\" identifies the principal that is the subject of the JWT.") - public String getSubject() { return subject; } - public void setSubject(String subject) { this.subject = subject; } @@ -400,18 +368,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TrustedOAuth2JwtGrantIssuer - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TrustedOAuth2JwtGrantIssuer.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TrustedOAuth2JwtGrantIssuer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TrustedOAuth2JwtGrantIssuer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TrustedOAuth2JwtGrantIssuer is not found in the empty JSON string", TrustedOAuth2JwtGrantIssuer.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -420,10 +389,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `public_key` if (jsonObj.get("public_key") != null && !jsonObj.get("public_key").isJsonNull()) { - TrustedOAuth2JwtGrantJsonWebKey.validateJsonObject(jsonObj.getAsJsonObject("public_key")); + TrustedOAuth2JwtGrantJsonWebKey.validateJsonElement(jsonObj.get("public_key")); } // ensure the optional json data is an array if present - if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonArray()) { + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull() && !jsonObj.get("scope").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `scope` to be an array in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if ((jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonNull()) && !jsonObj.get("subject").isJsonPrimitive()) { @@ -447,7 +416,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TrustedOAuth2JwtGrantIssuer value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -459,7 +428,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -468,8 +442,9 @@ else if (entry.getValue() instanceof Character) @Override public TrustedOAuth2JwtGrantIssuer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TrustedOAuth2JwtGrantIssuer instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -497,22 +472,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TrustedOAuth2JwtGrantIssuer given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustedOAuth2JwtGrantIssuer - * @throws IOException if the JSON string is invalid with respect to TrustedOAuth2JwtGrantIssuer - */ + /** + * Create an instance of TrustedOAuth2JwtGrantIssuer given an JSON string + * + * @param jsonString JSON string + * @return An instance of TrustedOAuth2JwtGrantIssuer + * @throws IOException if the JSON string is invalid with respect to TrustedOAuth2JwtGrantIssuer + */ public static TrustedOAuth2JwtGrantIssuer fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TrustedOAuth2JwtGrantIssuer.class); } - /** - * Convert an instance of TrustedOAuth2JwtGrantIssuer to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TrustedOAuth2JwtGrantIssuer to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java index f9f285368d7..09cfc32c382 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,8 +49,7 @@ /** * OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key */ -@ApiModel(description = "OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TrustedOAuth2JwtGrantJsonWebKey { public static final String SERIALIZED_NAME_KID = "kid"; @SerializedName(SERIALIZED_NAME_KID) @@ -63,46 +63,38 @@ public TrustedOAuth2JwtGrantJsonWebKey() { } public TrustedOAuth2JwtGrantJsonWebKey kid(String kid) { - this.kid = kid; return this; } - /** + /** * The \"key_id\" is key unique identifier (same as kid header in jws/jwt). * @return kid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "123e4567-e89b-12d3-a456-426655440000", value = "The \"key_id\" is key unique identifier (same as kid header in jws/jwt).") - public String getKid() { return kid; } - public void setKid(String kid) { this.kid = kid; } public TrustedOAuth2JwtGrantJsonWebKey set(String set) { - this.set = set; return this; } - /** + /** * The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. * @return set - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://jwt-idp.example.com", value = "The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.") - public String getSet() { return set; } - public void setSet(String set) { this.set = set; } @@ -208,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TrustedOAuth2JwtGrantJsonWebKey - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TrustedOAuth2JwtGrantJsonWebKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TrustedOAuth2JwtGrantJsonWebKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TrustedOAuth2JwtGrantJsonWebKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in TrustedOAuth2JwtGrantJsonWebKey is not found in the empty JSON string", TrustedOAuth2JwtGrantJsonWebKey.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("kid") != null && !jsonObj.get("kid").isJsonNull()) && !jsonObj.get("kid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kid").toString())); } @@ -244,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, TrustedOAuth2JwtGrantJsonWebKey value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -256,7 +249,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -265,8 +263,9 @@ else if (entry.getValue() instanceof Character) @Override public TrustedOAuth2JwtGrantJsonWebKey read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance TrustedOAuth2JwtGrantJsonWebKey instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -294,22 +293,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of TrustedOAuth2JwtGrantJsonWebKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of TrustedOAuth2JwtGrantJsonWebKey - * @throws IOException if the JSON string is invalid with respect to TrustedOAuth2JwtGrantJsonWebKey - */ + /** + * Create an instance of TrustedOAuth2JwtGrantJsonWebKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of TrustedOAuth2JwtGrantJsonWebKey + * @throws IOException if the JSON string is invalid with respect to TrustedOAuth2JwtGrantJsonWebKey + */ public static TrustedOAuth2JwtGrantJsonWebKey fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TrustedOAuth2JwtGrantJsonWebKey.class); } - /** - * Convert an instance of TrustedOAuth2JwtGrantJsonWebKey to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TrustedOAuth2JwtGrantJsonWebKey to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponse.java index ff9f4317c30..7c837949000 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponse.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponse.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * VerifiableCredentialPrimingResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class VerifiableCredentialPrimingResponse { public static final String SERIALIZED_NAME_C_NONCE = "c_nonce"; @SerializedName(SERIALIZED_NAME_C_NONCE) @@ -86,184 +87,152 @@ public VerifiableCredentialPrimingResponse() { } public VerifiableCredentialPrimingResponse cNonce(String cNonce) { - this.cNonce = cNonce; return this; } - /** + /** * Get cNonce * @return cNonce - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getcNonce() { return cNonce; } - public void setcNonce(String cNonce) { this.cNonce = cNonce; } public VerifiableCredentialPrimingResponse cNonceExpiresIn(Long cNonceExpiresIn) { - this.cNonceExpiresIn = cNonceExpiresIn; return this; } - /** + /** * Get cNonceExpiresIn * @return cNonceExpiresIn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getcNonceExpiresIn() { return cNonceExpiresIn; } - public void setcNonceExpiresIn(Long cNonceExpiresIn) { this.cNonceExpiresIn = cNonceExpiresIn; } public VerifiableCredentialPrimingResponse error(String error) { - this.error = error; return this; } - /** + /** * Get error * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getError() { return error; } - public void setError(String error) { this.error = error; } public VerifiableCredentialPrimingResponse errorDebug(String errorDebug) { - this.errorDebug = errorDebug; return this; } - /** + /** * Get errorDebug * @return errorDebug - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorDebug() { return errorDebug; } - public void setErrorDebug(String errorDebug) { this.errorDebug = errorDebug; } public VerifiableCredentialPrimingResponse errorDescription(String errorDescription) { - this.errorDescription = errorDescription; return this; } - /** + /** * Get errorDescription * @return errorDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorDescription() { return errorDescription; } - public void setErrorDescription(String errorDescription) { this.errorDescription = errorDescription; } public VerifiableCredentialPrimingResponse errorHint(String errorHint) { - this.errorHint = errorHint; return this; } - /** + /** * Get errorHint * @return errorHint - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getErrorHint() { return errorHint; } - public void setErrorHint(String errorHint) { this.errorHint = errorHint; } public VerifiableCredentialPrimingResponse format(String format) { - this.format = format; return this; } - /** + /** * Get format * @return format - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } public VerifiableCredentialPrimingResponse statusCode(Long statusCode) { - this.statusCode = statusCode; return this; } - /** + /** * Get statusCode * @return statusCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getStatusCode() { return statusCode; } - public void setStatusCode(Long statusCode) { this.statusCode = statusCode; } @@ -387,18 +356,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifiableCredentialPrimingResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifiableCredentialPrimingResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifiableCredentialPrimingResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifiableCredentialPrimingResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifiableCredentialPrimingResponse is not found in the empty JSON string", VerifiableCredentialPrimingResponse.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("c_nonce") != null && !jsonObj.get("c_nonce").isJsonNull()) && !jsonObj.get("c_nonce").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `c_nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("c_nonce").toString())); } @@ -435,7 +405,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VerifiableCredentialPrimingResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -447,7 +417,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -456,8 +431,9 @@ else if (entry.getValue() instanceof Character) @Override public VerifiableCredentialPrimingResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance VerifiableCredentialPrimingResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -485,22 +461,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of VerifiableCredentialPrimingResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifiableCredentialPrimingResponse - * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialPrimingResponse - */ + /** + * Create an instance of VerifiableCredentialPrimingResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of VerifiableCredentialPrimingResponse + * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialPrimingResponse + */ public static VerifiableCredentialPrimingResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, VerifiableCredentialPrimingResponse.class); } - /** - * Convert an instance of VerifiableCredentialPrimingResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of VerifiableCredentialPrimingResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialProof.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialProof.java index b2a728312e0..c97de03b520 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialProof.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialProof.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * VerifiableCredentialProof */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class VerifiableCredentialProof { public static final String SERIALIZED_NAME_JWT = "jwt"; @SerializedName(SERIALIZED_NAME_JWT) @@ -62,46 +63,38 @@ public VerifiableCredentialProof() { } public VerifiableCredentialProof jwt(String jwt) { - this.jwt = jwt; return this; } - /** + /** * Get jwt * @return jwt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getJwt() { return jwt; } - public void setJwt(String jwt) { this.jwt = jwt; } public VerifiableCredentialProof proofType(String proofType) { - this.proofType = proofType; return this; } - /** + /** * Get proofType * @return proofType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProofType() { return proofType; } - public void setProofType(String proofType) { this.proofType = proofType; } @@ -207,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifiableCredentialProof - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifiableCredentialProof.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifiableCredentialProof + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifiableCredentialProof.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifiableCredentialProof is not found in the empty JSON string", VerifiableCredentialProof.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("jwt") != null && !jsonObj.get("jwt").isJsonNull()) && !jsonObj.get("jwt").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `jwt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwt").toString())); } @@ -243,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VerifiableCredentialProof value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -255,7 +249,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -264,8 +263,9 @@ else if (entry.getValue() instanceof Character) @Override public VerifiableCredentialProof read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance VerifiableCredentialProof instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -293,22 +293,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of VerifiableCredentialProof given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifiableCredentialProof - * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialProof - */ + /** + * Create an instance of VerifiableCredentialProof given an JSON string + * + * @param jsonString JSON string + * @return An instance of VerifiableCredentialProof + * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialProof + */ public static VerifiableCredentialProof fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, VerifiableCredentialProof.class); } - /** - * Convert an instance of VerifiableCredentialProof to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of VerifiableCredentialProof to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialResponse.java index 867fdb934e8..3c2d8f49bcd 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialResponse.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VerifiableCredentialResponse.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * VerifiableCredentialResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class VerifiableCredentialResponse { public static final String SERIALIZED_NAME_CREDENTIAL_DRAFT00 = "credential_draft_00"; @SerializedName(SERIALIZED_NAME_CREDENTIAL_DRAFT00) @@ -62,46 +63,38 @@ public VerifiableCredentialResponse() { } public VerifiableCredentialResponse credentialDraft00(String credentialDraft00) { - this.credentialDraft00 = credentialDraft00; return this; } - /** + /** * Get credentialDraft00 * @return credentialDraft00 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getCredentialDraft00() { return credentialDraft00; } - public void setCredentialDraft00(String credentialDraft00) { this.credentialDraft00 = credentialDraft00; } public VerifiableCredentialResponse format(String format) { - this.format = format; return this; } - /** + /** * Get format * @return format - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } @@ -207,18 +200,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifiableCredentialResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifiableCredentialResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifiableCredentialResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifiableCredentialResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifiableCredentialResponse is not found in the empty JSON string", VerifiableCredentialResponse.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("credential_draft_00") != null && !jsonObj.get("credential_draft_00").isJsonNull()) && !jsonObj.get("credential_draft_00").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `credential_draft_00` to be a primitive type in the JSON string but got `%s`", jsonObj.get("credential_draft_00").toString())); } @@ -243,7 +237,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, VerifiableCredentialResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -255,7 +249,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -264,8 +263,9 @@ else if (entry.getValue() instanceof Character) @Override public VerifiableCredentialResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance VerifiableCredentialResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -293,22 +293,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of VerifiableCredentialResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifiableCredentialResponse - * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialResponse - */ + /** + * Create an instance of VerifiableCredentialResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of VerifiableCredentialResponse + * @throws IOException if the JSON string is invalid with respect to VerifiableCredentialResponse + */ public static VerifiableCredentialResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, VerifiableCredentialResponse.class); } - /** - * Convert an instance of VerifiableCredentialResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of VerifiableCredentialResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Version.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Version.java index 9387243eb10..dceb360f61b 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Version.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Version.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,15 +14,13 @@ package sh.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,16 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import sh.ory.hydra.JSON; @@ -48,7 +49,7 @@ /** * Version */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-12T11:42:01.945599172Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-08T13:20:22.059623837Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Version { public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) @@ -58,23 +59,19 @@ public Version() { } public Version version(String version) { - this.version = version; return this; } - /** + /** * Version is the service's version. * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Version is the service's version.") - public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -177,18 +174,19 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Version - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Version.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Version + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Version.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Version is not found in the empty JSON string", Version.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } @@ -210,7 +208,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { public void write(JsonWriter out, Version value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) @@ -222,7 +220,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } @@ -231,8 +234,9 @@ else if (entry.getValue() instanceof Character) @Override public Version read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance Version instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { @@ -260,22 +264,22 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } } - /** - * Create an instance of Version given an JSON string - * - * @param jsonString JSON string - * @return An instance of Version - * @throws IOException if the JSON string is invalid with respect to Version - */ + /** + * Create an instance of Version given an JSON string + * + * @param jsonString JSON string + * @return An instance of Version + * @throws IOException if the JSON string is invalid with respect to Version + */ public static Version fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Version.class); } - /** - * Convert an instance of Version to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Version to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java index f24cb165039..6c922ade583 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/MetadataApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/MetadataApiTest.java index 195601d331a..8cd43f46769 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/MetadataApiTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/MetadataApiTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java index 2d389a504ec..6e7877bfceb 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java index 9227d079f06..54594c14283 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java index 16ef74f4866..6bfc18af970 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java index 6fc2767573a..412c54838e7 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,14 +18,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for AcceptOAuth2ConsentRequestSession */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java index d1580296a0a..3e07ea6a0fd 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,18 +18,16 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for AcceptOAuth2ConsentRequest */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java index f824a163820..5046fab4958 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,16 +18,14 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for AcceptOAuth2LoginRequest */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java index 3db4a2fbae7..be8cb7a35ec 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for CreateJsonWebKeySet */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBodyTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBodyTest.java index 4b2eb0c86c7..f295fbd7d76 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBodyTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateVerifiableCredentialRequestBodyTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,16 +18,14 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.VerifiableCredentialProof; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for CreateVerifiableCredentialRequestBody */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CredentialSupportedDraft00Test.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CredentialSupportedDraft00Test.java index 9ba18802cb0..46f82bb8d0f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CredentialSupportedDraft00Test.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CredentialSupportedDraft00Test.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,15 +18,13 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for CredentialSupportedDraft00 */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java index f59eab82e41..5a9c7c8ced9 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for ErrorOAuth2 */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/GenericErrorTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GenericErrorTest.java index 2b873dd7b13..c0405141514 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/GenericErrorTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GenericErrorTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,14 +18,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for GenericError */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java index 15d726e6afa..aa1eadb406d 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for GetVersion200Response */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java index 3c2cfdc7da7..96b294f613a 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,15 +18,13 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for HealthNotReadyStatus */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthStatusTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthStatusTest.java index 5c45a8bb634..5de8230dd1e 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthStatusTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthStatusTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for HealthStatus */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java index 11e00e62f16..bdfb46eba93 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for IntrospectedOAuth2Token */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java index a4ab4d21416..a9044ff795c 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for IsReady200Response */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java index f5c0f64264f..938e52ea643 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,15 +18,13 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for IsReady503Response */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java index 80abbc2930a..e422f830d78 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,14 +18,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for JsonPatch */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java index f18e312734e..8a2b3911cfc 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,16 +18,14 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.JsonWebKey; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for JsonWebKeySet */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java index 8e2fb9277bf..f26a8fc7192 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,15 +18,13 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for JsonWebKey */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTest.java index 98471491405..50168ee4562 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2Client */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java index b6b78860596..e2cb0d84409 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2ClientTokenLifespans */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java index 6c9b302c5eb..37f8f2235b9 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2ConsentRequestOpenIDConnectContext */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java index 5d67062dc29..034115c478d 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,10 +18,9 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.OAuth2Client; @@ -29,7 +28,6 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2ConsentRequest */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java index f819e55690b..8f71854ad06 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,14 +18,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2ConsentSessionExpiresAt */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java index 266dbc35194..baf25d73d6d 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,11 +18,10 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; @@ -31,7 +30,6 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2ConsentSession */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java index 3489fdded13..8ebceca37ac 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.OAuth2Client; import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2LoginRequest */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java index d99d50c289e..c9a2c6a728f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,14 +18,12 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import sh.ory.hydra.model.OAuth2Client; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2LogoutRequest */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java index 47dc59e8dec..bc18186e46d 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2RedirectTo */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java index 466bd0ae770..23188c25c1c 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OAuth2TokenExchange */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java index 5168b02e26b..eaa9414ed73 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,16 +18,14 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.CredentialSupportedDraft00; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OidcConfiguration */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java index 0c57e00846d..cf9dae78b0f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for OidcUserInfo */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java index 077fb6b4ab1..43a19b8b73f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for PaginationHeaders */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java index 83ce6a839ff..b87538b4644 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Pagination */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RFC6749ErrorJsonTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RFC6749ErrorJsonTest.java index 5e12cd1c30d..059d2871ed7 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RFC6749ErrorJsonTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RFC6749ErrorJsonTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for RFC6749ErrorJson */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java index 1722e2b9afd..860a80ff305 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for RejectOAuth2Request */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java index 2148b901e19..6aa265e6915 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TokenPaginationHeaders */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java index 2ea0969ad5b..ed756a270a8 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TokenPaginationRequestParameters */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java index 04fb9a10bee..7031a7438eb 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TokenPaginationResponseHeaders */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java index 442e7c6920f..cf68e8711f2 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TokenPagination */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java index 0ea8ad2892f..f0de16a7b83 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.JsonWebKey; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TrustOAuth2JwtGrantIssuer */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java index 36d62a42d35..334576e0a51 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,17 +18,15 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import sh.ory.hydra.model.TrustedOAuth2JwtGrantJsonWebKey; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TrustedOAuth2JwtGrantIssuer */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java index 1a6b82c5076..941cf97462f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for TrustedOAuth2JwtGrantJsonWebKey */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponseTest.java index 0224cca1d81..3c05dd3a12f 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialPrimingResponseTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for VerifiableCredentialPrimingResponse */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialProofTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialProofTest.java index bdef3453056..793dcdd66aa 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialProofTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialProofTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for VerifiableCredentialProof */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialResponseTest.java index c2fc4b2be51..3c683031336 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VerifiableCredentialResponseTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for VerifiableCredentialResponse */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VersionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VersionTest.java index d84f3655730..9585c5024c1 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VersionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VersionTest.java @@ -2,7 +2,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,13 +18,11 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for Version */ diff --git a/clients/hydra/php/.gitignore b/clients/hydra/php/.gitignore index 92f7fdeff58..9f1681c2be8 100644 --- a/clients/hydra/php/.gitignore +++ b/clients/hydra/php/.gitignore @@ -9,6 +9,7 @@ composer.phar # php-cs-fixer cache .php_cs.cache +.php-cs-fixer.cache # PHPUnit cache .phpunit.result.cache diff --git a/clients/hydra/php/.openapi-generator/FILES b/clients/hydra/php/.openapi-generator/FILES index 117666d3122..5ff9d5a5e2e 100644 --- a/clients/hydra/php/.openapi-generator/FILES +++ b/clients/hydra/php/.openapi-generator/FILES @@ -1,6 +1,6 @@ .gitignore .openapi-generator-ignore -.php_cs +.php-cs-fixer.dist.php .travis.yml README.md composer.json @@ -17,12 +17,12 @@ docs/Model/CreateVerifiableCredentialRequestBody.md docs/Model/CredentialSupportedDraft00.md docs/Model/ErrorOAuth2.md docs/Model/GenericError.md +docs/Model/GetVersion200Response.md docs/Model/HealthNotReadyStatus.md docs/Model/HealthStatus.md -docs/Model/InlineResponse200.md -docs/Model/InlineResponse2001.md -docs/Model/InlineResponse503.md docs/Model/IntrospectedOAuth2Token.md +docs/Model/IsReady200Response.md +docs/Model/IsReady503Response.md docs/Model/JsonPatch.md docs/Model/JsonWebKey.md docs/Model/JsonWebKeySet.md @@ -70,12 +70,12 @@ lib/Model/CreateVerifiableCredentialRequestBody.php lib/Model/CredentialSupportedDraft00.php lib/Model/ErrorOAuth2.php lib/Model/GenericError.php +lib/Model/GetVersion200Response.php lib/Model/HealthNotReadyStatus.php lib/Model/HealthStatus.php -lib/Model/InlineResponse200.php -lib/Model/InlineResponse2001.php -lib/Model/InlineResponse503.php lib/Model/IntrospectedOAuth2Token.php +lib/Model/IsReady200Response.php +lib/Model/IsReady503Response.php lib/Model/JsonPatch.php lib/Model/JsonWebKey.php lib/Model/JsonWebKeySet.php @@ -122,12 +122,12 @@ test/Model/CreateVerifiableCredentialRequestBodyTest.php test/Model/CredentialSupportedDraft00Test.php test/Model/ErrorOAuth2Test.php test/Model/GenericErrorTest.php +test/Model/GetVersion200ResponseTest.php test/Model/HealthNotReadyStatusTest.php test/Model/HealthStatusTest.php -test/Model/InlineResponse2001Test.php -test/Model/InlineResponse200Test.php -test/Model/InlineResponse503Test.php test/Model/IntrospectedOAuth2TokenTest.php +test/Model/IsReady200ResponseTest.php +test/Model/IsReady503ResponseTest.php test/Model/JsonPatchTest.php test/Model/JsonWebKeySetTest.php test/Model/JsonWebKeyTest.php diff --git a/clients/hydra/php/.openapi-generator/VERSION b/clients/hydra/php/.openapi-generator/VERSION index 1e20ec35c64..1985849fb58 100644 --- a/clients/hydra/php/.openapi-generator/VERSION +++ b/clients/hydra/php/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/php/.php-cs-fixer.dist.php b/clients/hydra/php/.php-cs-fixer.dist.php new file mode 100644 index 00000000000..af9cf39fddb --- /dev/null +++ b/clients/hydra/php/.php-cs-fixer.dist.php @@ -0,0 +1,29 @@ +in(__DIR__) + ->exclude('vendor') + ->exclude('test') + ->exclude('tests') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@PSR12' => true, + 'phpdoc_order' => true, + 'array_syntax' => [ 'syntax' => 'short' ], + 'strict_comparison' => true, + 'strict_param' => true, + 'no_trailing_whitespace' => false, + 'no_trailing_whitespace_in_comment' => false, + 'braces' => false, + 'single_blank_line_at_eof' => false, + 'blank_line_after_namespace' => false, + 'no_leading_import_slash' => false, + ]) + ->setFinder($finder) +; diff --git a/clients/hydra/php/.php_cs b/clients/hydra/php/.php_cs deleted file mode 100644 index 4fbe53ec5ff..00000000000 --- a/clients/hydra/php/.php_cs +++ /dev/null @@ -1,23 +0,0 @@ -setUsingCache(true) - ->setRules([ - '@PSR2' => true, - 'ordered_imports' => true, - 'phpdoc_order' => true, - 'array_syntax' => [ 'syntax' => 'short' ], - 'strict_comparison' => true, - 'strict_param' => true, - 'no_trailing_whitespace' => false, - 'no_trailing_whitespace_in_comment' => false, - 'braces' => false, - 'single_blank_line_at_eof' => false, - 'blank_line_after_namespace' => false, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude('test') - ->exclude('tests') - ->in(__DIR__) - ); diff --git a/clients/hydra/php/README.md b/clients/hydra/php/README.md index 9735eb9087c..51d249cdbc7 100644 --- a/clients/hydra/php/README.md +++ b/clients/hydra/php/README.md @@ -8,8 +8,8 @@ Documentation for all of Ory Hydra's APIs. ### Requirements -PHP 7.3 and later. -Should also work with PHP 8.0 but has not been tested. +PHP 7.4 and later. +Should also work with PHP 8.0. ### Composer @@ -132,12 +132,12 @@ Class | Method | HTTP request | Description - [CredentialSupportedDraft00](docs/Model/CredentialSupportedDraft00.md) - [ErrorOAuth2](docs/Model/ErrorOAuth2.md) - [GenericError](docs/Model/GenericError.md) +- [GetVersion200Response](docs/Model/GetVersion200Response.md) - [HealthNotReadyStatus](docs/Model/HealthNotReadyStatus.md) - [HealthStatus](docs/Model/HealthStatus.md) -- [InlineResponse200](docs/Model/InlineResponse200.md) -- [InlineResponse2001](docs/Model/InlineResponse2001.md) -- [InlineResponse503](docs/Model/InlineResponse503.md) - [IntrospectedOAuth2Token](docs/Model/IntrospectedOAuth2Token.md) +- [IsReady200Response](docs/Model/IsReady200Response.md) +- [IsReady503Response](docs/Model/IsReady503Response.md) - [JsonPatch](docs/Model/JsonPatch.md) - [JsonWebKey](docs/Model/JsonWebKey.md) - [JsonWebKeySet](docs/Model/JsonWebKeySet.md) @@ -171,16 +171,15 @@ Class | Method | HTTP request | Description ## Authorization +Authentication schemes defined for the API: ### basic - **Type**: HTTP basic authentication - ### bearer - **Type**: Bearer authentication - ### oauth2 - **Type**: `OAuth` @@ -208,5 +207,6 @@ hi@ory.sh This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `v2.2.0` +- API version: `v2.2.1` + - Generator version: `7.7.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/clients/hydra/php/composer.json b/clients/hydra/php/composer.json index 1308b77a15c..5a2c055829d 100644 --- a/clients/hydra/php/composer.json +++ b/clients/hydra/php/composer.json @@ -14,12 +14,12 @@ "license": "Apache-2.0", "authors": [ { - "name": "Ory GmbH", + "name": "Ory Corp", "homepage": "https://www.ory.sh" } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", @@ -28,7 +28,7 @@ }, "require-dev": { "phpunit/phpunit": "^8.0 || ^9.0", - "friendsofphp/php-cs-fixer": "^2.12" + "friendsofphp/php-cs-fixer": "^3.5" }, "autoload": { "psr-4": { diff --git a/clients/hydra/php/composer.lock b/clients/hydra/php/composer.lock index 9dabcc0f7b7..a113f5cb8a5 100644 --- a/clients/hydra/php/composer.lock +++ b/clients/hydra/php/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e38c912340fd9f06ae760be7e76dd4d7", + "content-hash": "44bda5650dcaca01adaad0d332e8d645", "packages": [ { "name": "guzzlehttp/guzzle", @@ -112,6 +112,24 @@ "rest", "web service" ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], "time": "2023-12-03T20:35:24+00:00" }, { @@ -177,6 +195,24 @@ "keywords": [ "promise" ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], "time": "2023-12-03T20:19:20+00:00" }, { @@ -275,6 +311,24 @@ "uri", "url" ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], "time": "2023-12-03T20:05:35+00:00" }, { @@ -324,24 +378,27 @@ "psr", "psr-18" ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -365,7 +422,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -376,7 +433,10 @@ "request", "response" ], - "time": "2023-04-10T20:10:41+00:00" + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -426,6 +486,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, "time": "2023-04-04T09:54:51+00:00" }, { @@ -466,29 +529,33 @@ } ], "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, "time": "2019-03-08T08:55:37+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -516,36 +583,117 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2022-01-02T09:53:40+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" } ], "packages-dev": [ + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -571,7 +719,25 @@ "regex", "regular expression" ], - "time": "2022-01-21T20:24:37+00:00" + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", @@ -633,31 +799,50 @@ "validation", "versioning" ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -680,43 +865,58 @@ "Xdebug", "performance" ], - "time": "2022-02-24T20:20:32+00:00" + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" }, { - "name": "doctrine/annotations", - "version": "1.14.3", + "name": "doctrine/instantiator", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" + "php": "^8.1" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -725,109 +925,61 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "annotations", - "docblock", - "parser" + "constructor", + "instantiate" ], - "time": "2023-02-01T09:20:38+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "time": "2024-01-30T19:34:25+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.5.0", + "name": "evenement/evenement", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=7.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpunit/phpunit": "^9 || ^6" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "Evenement\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -836,48 +988,53 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Événement is a very simple event dispatching library for PHP", "keywords": [ - "constructor", - "instantiate" + "event-dispatcher", + "event-emitter" ], - "time": "2022-12-30T00:15:36+00:00" + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" }, { - "name": "doctrine/lexer", - "version": "2.1.1", + "name": "fidry/cpu-core-counter", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6" + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", - "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.21" + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "Fidry\\CpuCoreCounter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -886,109 +1043,95 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "Tiny utility to get the number of CPU cores.", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } ], - "time": "2024-02-05T11:35:39+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", + "version": "v3.59.3", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29", + "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", + "clue/ndjson-react": "^1.0", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", + "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "fidry/cpu-core-counter": "^1.0", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "facile-it/paraunit": "^1.3 || ^2.3", + "infection/infection": "^0.29.5", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", + "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" + "exclude-from-classmap": [ + "src/Fixer/Internal/*" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1006,20 +1149,36 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2021-11-15T17:17:55+00:00" + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2024-06-16T14:17:03+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1027,11 +1186,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1055,29 +1215,41 @@ "object", "object graph" ], - "time": "2023-03-08T13:26:56+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -1085,7 +1257,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1107,24 +1279,29 @@ "parser", "php" ], - "time": "2023-12-10T21:03:43+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + }, + "time": "2024-07-01T20:03:41+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -1163,7 +1340,17 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2021-07-20T11:28:43+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1210,72 +1397,24 @@ } ], "description": "Library for handling version information and constraints", - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "abandoned": true, - "time": "2020-10-14T08:39:05+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { @@ -1329,7 +1468,18 @@ "testing", "xunit" ], - "time": "2023-12-22T06:47:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1379,6 +1529,16 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2021-12-02T12:48:52+00:00" }, { @@ -1432,6 +1592,16 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-09-28T05:58:55+00:00" }, { @@ -1481,7 +1651,17 @@ "keywords": [ "template" ], - "time": "2020-10-26T05:33:50+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", @@ -1530,20 +1710,30 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { @@ -1614,72 +1804,50 @@ "testing", "xunit" ], - "time": "2024-01-19T07:03:14+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1704,7 +1872,11 @@ "container-interop", "psr" ], - "time": "2021-03-05T17:36:06+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -1750,34 +1922,38 @@ "psr", "psr-14" ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, "time": "2019-01-08T18:20:26+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1797,20 +1973,553 @@ "psr", "psr-3" ], - "time": "2021-05-03T11:20:27+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, + { + "name": "react/dns", + "version": "v1.13.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.13.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-13T14:18:03+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" + }, + { + "name": "react/promise", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-05-24T10:39:05+00:00" + }, + { + "name": "react/socket", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.11", + "react/event-loop": "^1.2", + "react/promise": "^3 || ^2.6 || ^1.2.1", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Socket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.15.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-12-15T11:02:10+00:00" + }, + { + "name": "react/stream", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -1843,7 +2552,17 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", - "time": "2020-09-28T06:08:49+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -1889,6 +2608,16 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-10-26T13:08:54+00:00" }, { @@ -1934,6 +2663,16 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-09-28T05:30:19+00:00" }, { @@ -1998,6 +2737,16 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2022-09-14T12:41:17+00:00" }, { @@ -2045,20 +2794,30 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -2101,7 +2860,17 @@ "unidiff", "unified diff" ], - "time": "2023-05-07T05:35:17+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -2154,20 +2923,30 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -2221,20 +3000,30 @@ "export", "exporter" ], - "time": "2022-09-14T06:03:37+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -2275,7 +3064,17 @@ "keywords": [ "global state" ], - "time": "2023-08-02T09:26:13+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -2322,6 +3121,16 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2023-12-22T06:20:34+00:00" }, { @@ -2367,8 +3176,18 @@ "email": "sebastian@phpunit.de" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-10-26T13:12:34+00:00" }, { @@ -2414,6 +3233,16 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-10-26T13:14:26+00:00" }, { @@ -2467,20 +3296,30 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -2492,7 +3331,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2512,7 +3351,16 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-09-28T06:45:17+00:00" + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -2558,6 +3406,16 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2023-02-03T06:13:03+00:00" }, { @@ -2601,56 +3459,60 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-09-28T06:39:44+00:00" }, { "name": "symfony/console", - "version": "v5.4.35", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931" + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931", - "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931", + "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2683,48 +3545,60 @@ "console", "terminal" ], - "time": "2024-01-23T14:28:09+00:00" + "support": { + "source": "https://github.com/symfony/console/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T10:03:55+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.35", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7a69a85c7ea5bdd1e875806a99c51a87d3a74b38" + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7a69a85c7ea5bdd1e875806a99c51a87d3a74b38", - "reference": "7a69a85c7ea5bdd1e875806a99c51a87d3a74b38", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2751,33 +3625,47 @@ ], "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -2813,27 +3701,46 @@ "interoperability", "standards" ], - "time": "2022-01-02T09:53:40+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.35", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" + "reference": "92a91985250c251de9b947a14bb2c9390b1a562c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c", + "reference": "92a91985250c251de9b947a14bb2c9390b1a562c", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2860,26 +3767,44 @@ ], "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T10:03:55+00:00" }, { "name": "symfony/finder", - "version": "v5.4.35", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435" + "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/abe6d6f77d9465fed3cd2d029b29d03b56b56435", - "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435", + "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2906,27 +3831,42 @@ ], "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/finder/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.21", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2958,20 +3898,37 @@ "configuration", "options" ], - "time": "2023-02-14T08:03:56+00:00" + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -3020,20 +3977,37 @@ "polyfill", "portable" ], - "time": "2024-01-29T20:11:03+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -3081,20 +4055,37 @@ "portable", "shim" ], - "time": "2024-01-29T20:11:03+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -3145,20 +4136,37 @@ "portable", "shim" ], - "time": "2024-01-29T20:11:03+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -3208,71 +4216,37 @@ "portable", "shim" ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.29.0", + "name": "symfony/polyfill-php80", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -3290,14 +4264,21 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -3307,7 +4288,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3315,20 +4296,37 @@ "portable", "shim" ], - "time": "2024-01-29T20:11:03+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.29.0", + "name": "symfony/polyfill-php81", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", "shasum": "" }, "require": { @@ -3346,7 +4344,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "classmap": [ "Resources/stubs" @@ -3366,7 +4364,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3374,88 +4372,41 @@ "portable", "shim" ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" + "url": "https://symfony.com/sponsor", + "type": "custom" }, { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/process", - "version": "v5.4.35", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cbc28e34015ad50166fc2f9c8962d28d0fe861eb" + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cbc28e34015ad50166fc2f9c8962d28d0fe861eb", - "reference": "cbc28e34015ad50166fc2f9c8962d28d0fe861eb", + "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -3482,37 +4433,51 @@ ], "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/process/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3522,7 +4487,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3548,25 +4516,42 @@ "interoperability", "standards" ], - "time": "2022-05-30T19:17:29+00:00" + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.35", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "887762aa99ff16f65dc8b48aafead415f942d407" + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/887762aa99ff16f65dc8b48aafead415f942d407", - "reference": "887762aa99ff16f65dc8b48aafead415f942d407", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -3593,38 +4578,56 @@ ], "description": "Provides a way to profile code", "homepage": "https://symfony.com", - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/string", - "version": "v5.4.35", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2" + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2", - "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2", + "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3662,20 +4665,37 @@ "utf-8", "utf8" ], - "time": "2024-01-23T13:51:25+00:00" + "support": { + "source": "https://github.com/symfony/string/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T09:27:18+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -3702,7 +4722,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2023-11-20T00:12:19+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -3711,10 +4741,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/clients/hydra/php/docs/Api/JwkApi.md b/clients/hydra/php/docs/Api/JwkApi.md index 5e6808db7f9..d4e6a5e40dc 100644 --- a/clients/hydra/php/docs/Api/JwkApi.md +++ b/clients/hydra/php/docs/Api/JwkApi.md @@ -1,16 +1,16 @@ # Ory\Hydra\Client\JwkApi -All URIs are relative to http://localhost. +All URIs are relative to http://localhost, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createJsonWebKeySet()**](JwkApi.md#createJsonWebKeySet) | **POST** /admin/keys/{set} | Create JSON Web Key -[**deleteJsonWebKey()**](JwkApi.md#deleteJsonWebKey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key -[**deleteJsonWebKeySet()**](JwkApi.md#deleteJsonWebKeySet) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set -[**getJsonWebKey()**](JwkApi.md#getJsonWebKey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key -[**getJsonWebKeySet()**](JwkApi.md#getJsonWebKeySet) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set -[**setJsonWebKey()**](JwkApi.md#setJsonWebKey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key -[**setJsonWebKeySet()**](JwkApi.md#setJsonWebKeySet) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createJsonWebKeySet()**](JwkApi.md#createJsonWebKeySet) | **POST** /admin/keys/{set} | Create JSON Web Key | +| [**deleteJsonWebKey()**](JwkApi.md#deleteJsonWebKey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key | +| [**deleteJsonWebKeySet()**](JwkApi.md#deleteJsonWebKeySet) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set | +| [**getJsonWebKey()**](JwkApi.md#getJsonWebKey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key | +| [**getJsonWebKeySet()**](JwkApi.md#getJsonWebKeySet) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set | +| [**setJsonWebKey()**](JwkApi.md#setJsonWebKey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key | +| [**setJsonWebKeySet()**](JwkApi.md#setJsonWebKeySet) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set | ## `createJsonWebKeySet()` @@ -49,10 +49,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **createJsonWebKeySet** | [**\Ory\Hydra\Client\Model\CreateJsonWebKeySet**](../Model/CreateJsonWebKeySet.md)| | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| The JSON Web Key Set ID | | +| **createJsonWebKeySet** | [**\Ory\Hydra\Client\Model\CreateJsonWebKeySet**](../Model/CreateJsonWebKeySet.md)| | | ### Return type @@ -106,10 +106,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set | - **kid** | **string**| The JSON Web Key ID (kid) | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| The JSON Web Key Set | | +| **kid** | **string**| The JSON Web Key ID (kid) | | ### Return type @@ -162,9 +162,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| The JSON Web Key Set | | ### Return type @@ -219,10 +219,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| JSON Web Key Set ID | - **kid** | **string**| JSON Web Key ID | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| JSON Web Key Set ID | | +| **kid** | **string**| JSON Web Key ID | | ### Return type @@ -276,9 +276,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| JSON Web Key Set ID | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| JSON Web Key Set ID | | ### Return type @@ -334,11 +334,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **kid** | **string**| JSON Web Key ID | - **jsonWebKey** | [**\Ory\Hydra\Client\Model\JsonWebKey**](../Model/JsonWebKey.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| The JSON Web Key Set ID | | +| **kid** | **string**| JSON Web Key ID | | +| **jsonWebKey** | [**\Ory\Hydra\Client\Model\JsonWebKey**](../Model/JsonWebKey.md)| | [optional] | ### Return type @@ -393,10 +393,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The JSON Web Key Set ID | - **jsonWebKeySet** | [**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **set** | **string**| The JSON Web Key Set ID | | +| **jsonWebKeySet** | [**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md)| | [optional] | ### Return type diff --git a/clients/hydra/php/docs/Api/MetadataApi.md b/clients/hydra/php/docs/Api/MetadataApi.md index 13547453a7a..f823b20bc52 100644 --- a/clients/hydra/php/docs/Api/MetadataApi.md +++ b/clients/hydra/php/docs/Api/MetadataApi.md @@ -1,18 +1,18 @@ # Ory\Hydra\Client\MetadataApi -All URIs are relative to http://localhost. +All URIs are relative to http://localhost, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getVersion()**](MetadataApi.md#getVersion) | **GET** /version | Return Running Software Version. -[**isAlive()**](MetadataApi.md#isAlive) | **GET** /health/alive | Check HTTP Server Status -[**isReady()**](MetadataApi.md#isReady) | **GET** /health/ready | Check HTTP Server and Database Status +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getVersion()**](MetadataApi.md#getVersion) | **GET** /version | Return Running Software Version. | +| [**isAlive()**](MetadataApi.md#isAlive) | **GET** /health/alive | Check HTTP Server Status | +| [**isReady()**](MetadataApi.md#isReady) | **GET** /health/ready | Check HTTP Server and Database Status | ## `getVersion()` ```php -getVersion(): \Ory\Hydra\Client\Model\InlineResponse2001 +getVersion(): \Ory\Hydra\Client\Model\GetVersion200Response ``` Return Running Software Version. @@ -47,7 +47,7 @@ This endpoint does not need any parameter. ### Return type -[**\Ory\Hydra\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) +[**\Ory\Hydra\Client\Model\GetVersion200Response**](../Model/GetVersion200Response.md) ### Authorization @@ -118,7 +118,7 @@ No authorization required ## `isReady()` ```php -isReady(): \Ory\Hydra\Client\Model\InlineResponse200 +isReady(): \Ory\Hydra\Client\Model\IsReady200Response ``` Check HTTP Server and Database Status @@ -153,7 +153,7 @@ This endpoint does not need any parameter. ### Return type -[**\Ory\Hydra\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) +[**\Ory\Hydra\Client\Model\IsReady200Response**](../Model/IsReady200Response.md) ### Authorization diff --git a/clients/hydra/php/docs/Api/OAuth2Api.md b/clients/hydra/php/docs/Api/OAuth2Api.md index 317963fdcef..cbcd9d72faa 100644 --- a/clients/hydra/php/docs/Api/OAuth2Api.md +++ b/clients/hydra/php/docs/Api/OAuth2Api.md @@ -1,37 +1,37 @@ # Ory\Hydra\Client\OAuth2Api -All URIs are relative to http://localhost. - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**acceptOAuth2ConsentRequest()**](OAuth2Api.md#acceptOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request -[**acceptOAuth2LoginRequest()**](OAuth2Api.md#acceptOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request -[**acceptOAuth2LogoutRequest()**](OAuth2Api.md#acceptOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request -[**createOAuth2Client()**](OAuth2Api.md#createOAuth2Client) | **POST** /admin/clients | Create OAuth 2.0 Client -[**deleteOAuth2Client()**](OAuth2Api.md#deleteOAuth2Client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client -[**deleteOAuth2Token()**](OAuth2Api.md#deleteOAuth2Token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client -[**deleteTrustedOAuth2JwtGrantIssuer()**](OAuth2Api.md#deleteTrustedOAuth2JwtGrantIssuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer -[**getOAuth2Client()**](OAuth2Api.md#getOAuth2Client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client -[**getOAuth2ConsentRequest()**](OAuth2Api.md#getOAuth2ConsentRequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request -[**getOAuth2LoginRequest()**](OAuth2Api.md#getOAuth2LoginRequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request -[**getOAuth2LogoutRequest()**](OAuth2Api.md#getOAuth2LogoutRequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request -[**getTrustedOAuth2JwtGrantIssuer()**](OAuth2Api.md#getTrustedOAuth2JwtGrantIssuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer -[**introspectOAuth2Token()**](OAuth2Api.md#introspectOAuth2Token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens -[**listOAuth2Clients()**](OAuth2Api.md#listOAuth2Clients) | **GET** /admin/clients | List OAuth 2.0 Clients -[**listOAuth2ConsentSessions()**](OAuth2Api.md#listOAuth2ConsentSessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject -[**listTrustedOAuth2JwtGrantIssuers()**](OAuth2Api.md#listTrustedOAuth2JwtGrantIssuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**oAuth2Authorize()**](OAuth2Api.md#oAuth2Authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint -[**oauth2TokenExchange()**](OAuth2Api.md#oauth2TokenExchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**patchOAuth2Client()**](OAuth2Api.md#patchOAuth2Client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client -[**rejectOAuth2ConsentRequest()**](OAuth2Api.md#rejectOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request -[**rejectOAuth2LoginRequest()**](OAuth2Api.md#rejectOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request -[**rejectOAuth2LogoutRequest()**](OAuth2Api.md#rejectOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request -[**revokeOAuth2ConsentSessions()**](OAuth2Api.md#revokeOAuth2ConsentSessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject -[**revokeOAuth2LoginSessions()**](OAuth2Api.md#revokeOAuth2LoginSessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID -[**revokeOAuth2Token()**](OAuth2Api.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token -[**setOAuth2Client()**](OAuth2Api.md#setOAuth2Client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client -[**setOAuth2ClientLifespans()**](OAuth2Api.md#setOAuth2ClientLifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans -[**trustOAuth2JwtGrantIssuer()**](OAuth2Api.md#trustOAuth2JwtGrantIssuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**acceptOAuth2ConsentRequest()**](OAuth2Api.md#acceptOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request | +| [**acceptOAuth2LoginRequest()**](OAuth2Api.md#acceptOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request | +| [**acceptOAuth2LogoutRequest()**](OAuth2Api.md#acceptOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request | +| [**createOAuth2Client()**](OAuth2Api.md#createOAuth2Client) | **POST** /admin/clients | Create OAuth 2.0 Client | +| [**deleteOAuth2Client()**](OAuth2Api.md#deleteOAuth2Client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client | +| [**deleteOAuth2Token()**](OAuth2Api.md#deleteOAuth2Token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client | +| [**deleteTrustedOAuth2JwtGrantIssuer()**](OAuth2Api.md#deleteTrustedOAuth2JwtGrantIssuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**getOAuth2Client()**](OAuth2Api.md#getOAuth2Client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client | +| [**getOAuth2ConsentRequest()**](OAuth2Api.md#getOAuth2ConsentRequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request | +| [**getOAuth2LoginRequest()**](OAuth2Api.md#getOAuth2LoginRequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request | +| [**getOAuth2LogoutRequest()**](OAuth2Api.md#getOAuth2LogoutRequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request | +| [**getTrustedOAuth2JwtGrantIssuer()**](OAuth2Api.md#getTrustedOAuth2JwtGrantIssuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**introspectOAuth2Token()**](OAuth2Api.md#introspectOAuth2Token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens | +| [**listOAuth2Clients()**](OAuth2Api.md#listOAuth2Clients) | **GET** /admin/clients | List OAuth 2.0 Clients | +| [**listOAuth2ConsentSessions()**](OAuth2Api.md#listOAuth2ConsentSessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | +| [**listTrustedOAuth2JwtGrantIssuers()**](OAuth2Api.md#listTrustedOAuth2JwtGrantIssuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | +| [**oAuth2Authorize()**](OAuth2Api.md#oAuth2Authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint | +| [**oauth2TokenExchange()**](OAuth2Api.md#oauth2TokenExchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint | +| [**patchOAuth2Client()**](OAuth2Api.md#patchOAuth2Client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client | +| [**rejectOAuth2ConsentRequest()**](OAuth2Api.md#rejectOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request | +| [**rejectOAuth2LoginRequest()**](OAuth2Api.md#rejectOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request | +| [**rejectOAuth2LogoutRequest()**](OAuth2Api.md#rejectOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request | +| [**revokeOAuth2ConsentSessions()**](OAuth2Api.md#revokeOAuth2ConsentSessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject | +| [**revokeOAuth2LoginSessions()**](OAuth2Api.md#revokeOAuth2LoginSessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID | +| [**revokeOAuth2Token()**](OAuth2Api.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token | +| [**setOAuth2Client()**](OAuth2Api.md#setOAuth2Client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client | +| [**setOAuth2ClientLifespans()**](OAuth2Api.md#setOAuth2ClientLifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans | +| [**trustOAuth2JwtGrantIssuer()**](OAuth2Api.md#trustOAuth2JwtGrantIssuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer | ## `acceptOAuth2ConsentRequest()` @@ -70,10 +70,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | - **acceptOAuth2ConsentRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest**](../Model/AcceptOAuth2ConsentRequest.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | | +| **acceptOAuth2ConsentRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest**](../Model/AcceptOAuth2ConsentRequest.md)| | [optional] | ### Return type @@ -128,10 +128,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | - **acceptOAuth2LoginRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest**](../Model/AcceptOAuth2LoginRequest.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | | +| **acceptOAuth2LoginRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest**](../Model/AcceptOAuth2LoginRequest.md)| | [optional] | ### Return type @@ -185,9 +185,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| OAuth 2.0 Logout Request Challenge | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **logoutChallenge** | **string**| OAuth 2.0 Logout Request Challenge | | ### Return type @@ -241,9 +241,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | | ### Return type @@ -296,9 +296,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the OAuth 2.0 Client. | | ### Return type @@ -351,9 +351,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **string**| OAuth 2.0 Client ID | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **clientId** | **string**| OAuth 2.0 Client ID | | ### Return type @@ -406,9 +406,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the desired grant | | ### Return type @@ -462,9 +462,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the OAuth 2.0 Client. | | ### Return type @@ -518,9 +518,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | | ### Return type @@ -574,9 +574,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | | ### Return type @@ -630,9 +630,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **logoutChallenge** | **string**| | | ### Return type @@ -686,9 +686,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the desired grant | | ### Return type @@ -743,10 +743,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | - **scope** | **string**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **token** | **string**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | | +| **scope** | **string**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] | ### Return type @@ -803,12 +803,12 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pageSize** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] - **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] - **clientName** | **string**| The name of the clients to filter by. | [optional] - **owner** | **string**| The owner of the clients to filter by. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pageSize** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] | +| **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] | +| **clientName** | **string**| The name of the clients to filter by. | [optional] | +| **owner** | **string**| The owner of the clients to filter by. | [optional] | ### Return type @@ -865,12 +865,12 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| The subject to list the consent sessions for. | - **pageSize** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] - **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] - **loginSessionId** | **string**| The login session id to list the consent sessions for. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **subject** | **string**| The subject to list the consent sessions for. | | +| **pageSize** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] | +| **pageToken** | **string**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] | +| **loginSessionId** | **string**| The login session id to list the consent sessions for. | [optional] | ### Return type @@ -926,11 +926,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **maxItems** | **int**| | [optional] - **defaultItems** | **int**| | [optional] - **issuer** | **string**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **maxItems** | **int**| | [optional] | +| **defaultItems** | **int**| | [optional] | +| **issuer** | **string**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] | ### Return type @@ -1050,13 +1050,13 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string**| | - **clientId** | **string**| | [optional] - **code** | **string**| | [optional] - **redirectUri** | **string**| | [optional] - **refreshToken** | **string**| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **grantType** | **string**| | | +| **clientId** | **string**| | [optional] | +| **code** | **string**| | [optional] | +| **redirectUri** | **string**| | [optional] | +| **refreshToken** | **string**| | [optional] | ### Return type @@ -1111,10 +1111,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - **jsonPatch** | [**\Ory\Hydra\Client\Model\JsonPatch[]**](../Model/JsonPatch.md)| OAuth 2.0 Client JSON Patch Body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the OAuth 2.0 Client. | | +| **jsonPatch** | [**\Ory\Hydra\Client\Model\JsonPatch[]**](../Model/JsonPatch.md)| OAuth 2.0 Client JSON Patch Body | | ### Return type @@ -1169,10 +1169,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | - **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | | +| **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] | ### Return type @@ -1227,10 +1227,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | - **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | | +| **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] | ### Return type @@ -1283,9 +1283,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **logoutChallenge** | **string**| | | ### Return type @@ -1340,11 +1340,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | - **client** | **string**| OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] - **all** | **bool**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **subject** | **string**| OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | | +| **client** | **string**| OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] | +| **all** | **bool**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] | ### Return type @@ -1398,10 +1398,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] - **sid** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **subject** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] | +| **sid** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] | ### Return type @@ -1465,11 +1465,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| | - **clientId** | **string**| | [optional] - **clientSecret** | **string**| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **token** | **string**| | | +| **clientId** | **string**| | [optional] | +| **clientSecret** | **string**| | [optional] | ### Return type @@ -1524,10 +1524,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| OAuth 2.0 Client ID | | +| **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | | ### Return type @@ -1582,10 +1582,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **oAuth2ClientTokenLifespans** | [**\Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans**](../Model/OAuth2ClientTokenLifespans.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| OAuth 2.0 Client ID | | +| **oAuth2ClientTokenLifespans** | [**\Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans**](../Model/OAuth2ClientTokenLifespans.md)| | [optional] | ### Return type @@ -1639,9 +1639,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **trustOAuth2JwtGrantIssuer** | [**\Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer**](../Model/TrustOAuth2JwtGrantIssuer.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **trustOAuth2JwtGrantIssuer** | [**\Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer**](../Model/TrustOAuth2JwtGrantIssuer.md)| | [optional] | ### Return type diff --git a/clients/hydra/php/docs/Api/OidcApi.md b/clients/hydra/php/docs/Api/OidcApi.md index 94f3405260b..73cd336b363 100644 --- a/clients/hydra/php/docs/Api/OidcApi.md +++ b/clients/hydra/php/docs/Api/OidcApi.md @@ -1,17 +1,17 @@ # Ory\Hydra\Client\OidcApi -All URIs are relative to http://localhost. +All URIs are relative to http://localhost, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createOidcDynamicClient()**](OidcApi.md#createOidcDynamicClient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration -[**createVerifiableCredential()**](OidcApi.md#createVerifiableCredential) | **POST** /credentials | Issues a Verifiable Credential -[**deleteOidcDynamicClient()**](OidcApi.md#deleteOidcDynamicClient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol -[**discoverOidcConfiguration()**](OidcApi.md#discoverOidcConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**getOidcDynamicClient()**](OidcApi.md#getOidcDynamicClient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration -[**getOidcUserInfo()**](OidcApi.md#getOidcUserInfo) | **GET** /userinfo | OpenID Connect Userinfo -[**revokeOidcSession()**](OidcApi.md#revokeOidcSession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout -[**setOidcDynamicClient()**](OidcApi.md#setOidcDynamicClient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createOidcDynamicClient()**](OidcApi.md#createOidcDynamicClient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration | +| [**createVerifiableCredential()**](OidcApi.md#createVerifiableCredential) | **POST** /credentials | Issues a Verifiable Credential | +| [**deleteOidcDynamicClient()**](OidcApi.md#deleteOidcDynamicClient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol | +| [**discoverOidcConfiguration()**](OidcApi.md#discoverOidcConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery | +| [**getOidcDynamicClient()**](OidcApi.md#getOidcDynamicClient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration | +| [**getOidcUserInfo()**](OidcApi.md#getOidcUserInfo) | **GET** /userinfo | OpenID Connect Userinfo | +| [**revokeOidcSession()**](OidcApi.md#revokeOidcSession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout | +| [**setOidcDynamicClient()**](OidcApi.md#setOidcDynamicClient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration | ## `createOidcDynamicClient()` @@ -49,9 +49,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| Dynamic Client Registration Request Body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| Dynamic Client Registration Request Body | | ### Return type @@ -105,9 +105,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createVerifiableCredentialRequestBody** | [**\Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody**](../Model/CreateVerifiableCredentialRequestBody.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **createVerifiableCredentialRequestBody** | [**\Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody**](../Model/CreateVerifiableCredentialRequestBody.md)| | [optional] | ### Return type @@ -164,9 +164,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the OAuth 2.0 Client. | | ### Return type @@ -277,9 +277,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The id of the OAuth 2.0 Client. | | ### Return type @@ -447,10 +447,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| OAuth 2.0 Client ID | - **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| OAuth 2.0 Client ID | | +| **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | | ### Return type diff --git a/clients/hydra/php/docs/Api/WellknownApi.md b/clients/hydra/php/docs/Api/WellknownApi.md index 349831271d5..3d8f75c1711 100644 --- a/clients/hydra/php/docs/Api/WellknownApi.md +++ b/clients/hydra/php/docs/Api/WellknownApi.md @@ -1,10 +1,10 @@ # Ory\Hydra\Client\WellknownApi -All URIs are relative to http://localhost. +All URIs are relative to http://localhost, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**discoverJsonWebKeys()**](WellknownApi.md#discoverJsonWebKeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**discoverJsonWebKeys()**](WellknownApi.md#discoverJsonWebKeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys | ## `discoverJsonWebKeys()` diff --git a/clients/hydra/php/docs/Model/InlineResponse2001.md b/clients/hydra/php/docs/Model/GetVersion200Response.md similarity index 92% rename from clients/hydra/php/docs/Model/InlineResponse2001.md rename to clients/hydra/php/docs/Model/GetVersion200Response.md index 922a5d23f33..d9f9359ad00 100644 --- a/clients/hydra/php/docs/Model/InlineResponse2001.md +++ b/clients/hydra/php/docs/Model/GetVersion200Response.md @@ -1,4 +1,4 @@ -# # InlineResponse2001 +# # GetVersion200Response ## Properties diff --git a/clients/hydra/php/docs/Model/InlineResponse200.md b/clients/hydra/php/docs/Model/IsReady200Response.md similarity index 93% rename from clients/hydra/php/docs/Model/InlineResponse200.md rename to clients/hydra/php/docs/Model/IsReady200Response.md index 0aefdd463ac..960c6d7cb58 100644 --- a/clients/hydra/php/docs/Model/InlineResponse200.md +++ b/clients/hydra/php/docs/Model/IsReady200Response.md @@ -1,4 +1,4 @@ -# # InlineResponse200 +# # IsReady200Response ## Properties diff --git a/clients/hydra/php/docs/Model/InlineResponse503.md b/clients/hydra/php/docs/Model/IsReady503Response.md similarity index 94% rename from clients/hydra/php/docs/Model/InlineResponse503.md rename to clients/hydra/php/docs/Model/IsReady503Response.md index e1ebd482199..6d4d92ffe43 100644 --- a/clients/hydra/php/docs/Model/InlineResponse503.md +++ b/clients/hydra/php/docs/Model/IsReady503Response.md @@ -1,4 +1,4 @@ -# # InlineResponse503 +# # IsReady503Response ## Properties diff --git a/clients/hydra/php/lib/Api/JwkApi.php b/clients/hydra/php/lib/Api/JwkApi.php index bf1ec006d25..b27e6bf55ba 100644 --- a/clients/hydra/php/lib/Api/JwkApi.php +++ b/clients/hydra/php/lib/Api/JwkApi.php @@ -1,7 +1,7 @@ [ + 'application/json', + ], + 'deleteJsonWebKey' => [ + 'application/json', + ], + 'deleteJsonWebKeySet' => [ + 'application/json', + ], + 'getJsonWebKey' => [ + 'application/json', + ], + 'getJsonWebKeySet' => [ + 'application/json', + ], + 'setJsonWebKey' => [ + 'application/json', + ], + 'setJsonWebKeySet' => [ + 'application/json', + ], + ]; + /** * @param ClientInterface $client * @param Configuration $config @@ -123,14 +148,15 @@ public function getConfig() * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet createJsonWebKeySet (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function createJsonWebKeySet($set, $createJsonWebKeySet) + public function createJsonWebKeySet($set, $createJsonWebKeySet, string $contentType = self::contentTypes['createJsonWebKeySet'][0]) { - list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet); + list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet, $contentType); return $response; } @@ -141,14 +167,15 @@ public function createJsonWebKeySet($set, $createJsonWebKeySet) * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet) + public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet, string $contentType = self::contentTypes['createJsonWebKeySet'][0]) { - $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet); + $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet, $contentType); try { $options = $this->createHttpClientOption(); @@ -191,6 +218,21 @@ public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -203,6 +245,21 @@ public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -217,6 +274,21 @@ public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -255,13 +327,14 @@ public function createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet) * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createJsonWebKeySetAsync($set, $createJsonWebKeySet) + public function createJsonWebKeySetAsync($set, $createJsonWebKeySet, string $contentType = self::contentTypes['createJsonWebKeySet'][0]) { - return $this->createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet) + return $this->createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet, $contentType) ->then( function ($response) { return $response[0]; @@ -276,14 +349,15 @@ function ($response) { * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet) + public function createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet, string $contentType = self::contentTypes['createJsonWebKeySet'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; - $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet); + $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -293,6 +367,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -323,18 +400,21 @@ function ($exception) { * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) + public function createJsonWebKeySetRequest($set, $createJsonWebKeySet, string $contentType = self::contentTypes['createJsonWebKeySet'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $set when calling createJsonWebKeySet' ); } + // verify the required parameter 'createJsonWebKeySet' is set if ($createJsonWebKeySet === null || (is_array($createJsonWebKeySet) && count($createJsonWebKeySet) === 0)) { throw new \InvalidArgumentException( @@ -342,6 +422,7 @@ public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) ); } + $resourcePath = '/admin/keys/{set}'; $formParams = []; $queryParams = []; @@ -361,21 +442,17 @@ public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($createJsonWebKeySet)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($createJsonWebKeySet)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($createJsonWebKeySet)); } else { $httpBody = $createJsonWebKeySet; } @@ -394,12 +471,12 @@ public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -415,10 +492,11 @@ public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -431,14 +509,15 @@ public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) * * @param string $set The JSON Web Key Set (required) * @param string $kid The JSON Web Key ID (kid) (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteJsonWebKey($set, $kid) + public function deleteJsonWebKey($set, $kid, string $contentType = self::contentTypes['deleteJsonWebKey'][0]) { - $this->deleteJsonWebKeyWithHttpInfo($set, $kid); + $this->deleteJsonWebKeyWithHttpInfo($set, $kid, $contentType); } /** @@ -448,14 +527,15 @@ public function deleteJsonWebKey($set, $kid) * * @param string $set The JSON Web Key Set (required) * @param string $kid The JSON Web Key ID (kid) (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteJsonWebKeyWithHttpInfo($set, $kid) + public function deleteJsonWebKeyWithHttpInfo($set, $kid, string $contentType = self::contentTypes['deleteJsonWebKey'][0]) { - $request = $this->deleteJsonWebKeyRequest($set, $kid); + $request = $this->deleteJsonWebKeyRequest($set, $kid, $contentType); try { $options = $this->createHttpClientOption(); @@ -516,13 +596,14 @@ public function deleteJsonWebKeyWithHttpInfo($set, $kid) * * @param string $set The JSON Web Key Set (required) * @param string $kid The JSON Web Key ID (kid) (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeyAsync($set, $kid) + public function deleteJsonWebKeyAsync($set, $kid, string $contentType = self::contentTypes['deleteJsonWebKey'][0]) { - return $this->deleteJsonWebKeyAsyncWithHttpInfo($set, $kid) + return $this->deleteJsonWebKeyAsyncWithHttpInfo($set, $kid, $contentType) ->then( function ($response) { return $response[0]; @@ -537,14 +618,15 @@ function ($response) { * * @param string $set The JSON Web Key Set (required) * @param string $kid The JSON Web Key ID (kid) (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeyAsyncWithHttpInfo($set, $kid) + public function deleteJsonWebKeyAsyncWithHttpInfo($set, $kid, string $contentType = self::contentTypes['deleteJsonWebKey'][0]) { $returnType = ''; - $request = $this->deleteJsonWebKeyRequest($set, $kid); + $request = $this->deleteJsonWebKeyRequest($set, $kid, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -574,18 +656,21 @@ function ($exception) { * * @param string $set The JSON Web Key Set (required) * @param string $kid The JSON Web Key ID (kid) (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteJsonWebKeyRequest($set, $kid) + public function deleteJsonWebKeyRequest($set, $kid, string $contentType = self::contentTypes['deleteJsonWebKey'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $set when calling deleteJsonWebKey' ); } + // verify the required parameter 'kid' is set if ($kid === null || (is_array($kid) && count($kid) === 0)) { throw new \InvalidArgumentException( @@ -593,6 +678,7 @@ public function deleteJsonWebKeyRequest($set, $kid) ); } + $resourcePath = '/admin/keys/{set}/{kid}'; $formParams = []; $queryParams = []; @@ -620,16 +706,11 @@ public function deleteJsonWebKeyRequest($set, $kid) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -647,12 +728,12 @@ public function deleteJsonWebKeyRequest($set, $kid) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -668,10 +749,11 @@ public function deleteJsonWebKeyRequest($set, $kid) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -683,14 +765,15 @@ public function deleteJsonWebKeyRequest($set, $kid) * Delete JSON Web Key Set * * @param string $set The JSON Web Key Set (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteJsonWebKeySet($set) + public function deleteJsonWebKeySet($set, string $contentType = self::contentTypes['deleteJsonWebKeySet'][0]) { - $this->deleteJsonWebKeySetWithHttpInfo($set); + $this->deleteJsonWebKeySetWithHttpInfo($set, $contentType); } /** @@ -699,14 +782,15 @@ public function deleteJsonWebKeySet($set) * Delete JSON Web Key Set * * @param string $set The JSON Web Key Set (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteJsonWebKeySetWithHttpInfo($set) + public function deleteJsonWebKeySetWithHttpInfo($set, string $contentType = self::contentTypes['deleteJsonWebKeySet'][0]) { - $request = $this->deleteJsonWebKeySetRequest($set); + $request = $this->deleteJsonWebKeySetRequest($set, $contentType); try { $options = $this->createHttpClientOption(); @@ -766,13 +850,14 @@ public function deleteJsonWebKeySetWithHttpInfo($set) * Delete JSON Web Key Set * * @param string $set The JSON Web Key Set (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeySetAsync($set) + public function deleteJsonWebKeySetAsync($set, string $contentType = self::contentTypes['deleteJsonWebKeySet'][0]) { - return $this->deleteJsonWebKeySetAsyncWithHttpInfo($set) + return $this->deleteJsonWebKeySetAsyncWithHttpInfo($set, $contentType) ->then( function ($response) { return $response[0]; @@ -786,14 +871,15 @@ function ($response) { * Delete JSON Web Key Set * * @param string $set The JSON Web Key Set (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeySetAsyncWithHttpInfo($set) + public function deleteJsonWebKeySetAsyncWithHttpInfo($set, string $contentType = self::contentTypes['deleteJsonWebKeySet'][0]) { $returnType = ''; - $request = $this->deleteJsonWebKeySetRequest($set); + $request = $this->deleteJsonWebKeySetRequest($set, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -822,12 +908,14 @@ function ($exception) { * Create request for operation 'deleteJsonWebKeySet' * * @param string $set The JSON Web Key Set (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteJsonWebKeySetRequest($set) + public function deleteJsonWebKeySetRequest($set, string $contentType = self::contentTypes['deleteJsonWebKeySet'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( @@ -835,6 +923,7 @@ public function deleteJsonWebKeySetRequest($set) ); } + $resourcePath = '/admin/keys/{set}'; $formParams = []; $queryParams = []; @@ -854,16 +943,11 @@ public function deleteJsonWebKeySetRequest($set) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -881,12 +965,12 @@ public function deleteJsonWebKeySetRequest($set) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -902,10 +986,11 @@ public function deleteJsonWebKeySetRequest($set) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -918,14 +1003,15 @@ public function deleteJsonWebKeySetRequest($set) * * @param string $set JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getJsonWebKey($set, $kid) + public function getJsonWebKey($set, $kid, string $contentType = self::contentTypes['getJsonWebKey'][0]) { - list($response) = $this->getJsonWebKeyWithHttpInfo($set, $kid); + list($response) = $this->getJsonWebKeyWithHttpInfo($set, $kid, $contentType); return $response; } @@ -936,14 +1022,15 @@ public function getJsonWebKey($set, $kid) * * @param string $set JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getJsonWebKeyWithHttpInfo($set, $kid) + public function getJsonWebKeyWithHttpInfo($set, $kid, string $contentType = self::contentTypes['getJsonWebKey'][0]) { - $request = $this->getJsonWebKeyRequest($set, $kid); + $request = $this->getJsonWebKeyRequest($set, $kid, $contentType); try { $options = $this->createHttpClientOption(); @@ -986,6 +1073,21 @@ public function getJsonWebKeyWithHttpInfo($set, $kid) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -998,6 +1100,21 @@ public function getJsonWebKeyWithHttpInfo($set, $kid) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1012,6 +1129,21 @@ public function getJsonWebKeyWithHttpInfo($set, $kid) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1050,13 +1182,14 @@ public function getJsonWebKeyWithHttpInfo($set, $kid) * * @param string $set JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeyAsync($set, $kid) + public function getJsonWebKeyAsync($set, $kid, string $contentType = self::contentTypes['getJsonWebKey'][0]) { - return $this->getJsonWebKeyAsyncWithHttpInfo($set, $kid) + return $this->getJsonWebKeyAsyncWithHttpInfo($set, $kid, $contentType) ->then( function ($response) { return $response[0]; @@ -1071,14 +1204,15 @@ function ($response) { * * @param string $set JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeyAsyncWithHttpInfo($set, $kid) + public function getJsonWebKeyAsyncWithHttpInfo($set, $kid, string $contentType = self::contentTypes['getJsonWebKey'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; - $request = $this->getJsonWebKeyRequest($set, $kid); + $request = $this->getJsonWebKeyRequest($set, $kid, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1088,6 +1222,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1118,18 +1255,21 @@ function ($exception) { * * @param string $set JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getJsonWebKeyRequest($set, $kid) + public function getJsonWebKeyRequest($set, $kid, string $contentType = self::contentTypes['getJsonWebKey'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $set when calling getJsonWebKey' ); } + // verify the required parameter 'kid' is set if ($kid === null || (is_array($kid) && count($kid) === 0)) { throw new \InvalidArgumentException( @@ -1137,6 +1277,7 @@ public function getJsonWebKeyRequest($set, $kid) ); } + $resourcePath = '/admin/keys/{set}/{kid}'; $formParams = []; $queryParams = []; @@ -1164,16 +1305,11 @@ public function getJsonWebKeyRequest($set, $kid) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1191,12 +1327,12 @@ public function getJsonWebKeyRequest($set, $kid) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1212,10 +1348,11 @@ public function getJsonWebKeyRequest($set, $kid) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1227,14 +1364,15 @@ public function getJsonWebKeyRequest($set, $kid) * Retrieve a JSON Web Key Set * * @param string $set JSON Web Key Set ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getJsonWebKeySet($set) + public function getJsonWebKeySet($set, string $contentType = self::contentTypes['getJsonWebKeySet'][0]) { - list($response) = $this->getJsonWebKeySetWithHttpInfo($set); + list($response) = $this->getJsonWebKeySetWithHttpInfo($set, $contentType); return $response; } @@ -1244,14 +1382,15 @@ public function getJsonWebKeySet($set) * Retrieve a JSON Web Key Set * * @param string $set JSON Web Key Set ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getJsonWebKeySetWithHttpInfo($set) + public function getJsonWebKeySetWithHttpInfo($set, string $contentType = self::contentTypes['getJsonWebKeySet'][0]) { - $request = $this->getJsonWebKeySetRequest($set); + $request = $this->getJsonWebKeySetRequest($set, $contentType); try { $options = $this->createHttpClientOption(); @@ -1294,6 +1433,21 @@ public function getJsonWebKeySetWithHttpInfo($set) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1306,6 +1460,21 @@ public function getJsonWebKeySetWithHttpInfo($set) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1320,6 +1489,21 @@ public function getJsonWebKeySetWithHttpInfo($set) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1357,13 +1541,14 @@ public function getJsonWebKeySetWithHttpInfo($set) * Retrieve a JSON Web Key Set * * @param string $set JSON Web Key Set ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeySetAsync($set) + public function getJsonWebKeySetAsync($set, string $contentType = self::contentTypes['getJsonWebKeySet'][0]) { - return $this->getJsonWebKeySetAsyncWithHttpInfo($set) + return $this->getJsonWebKeySetAsyncWithHttpInfo($set, $contentType) ->then( function ($response) { return $response[0]; @@ -1377,14 +1562,15 @@ function ($response) { * Retrieve a JSON Web Key Set * * @param string $set JSON Web Key Set ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeySetAsyncWithHttpInfo($set) + public function getJsonWebKeySetAsyncWithHttpInfo($set, string $contentType = self::contentTypes['getJsonWebKeySet'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; - $request = $this->getJsonWebKeySetRequest($set); + $request = $this->getJsonWebKeySetRequest($set, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1394,6 +1580,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1423,12 +1612,14 @@ function ($exception) { * Create request for operation 'getJsonWebKeySet' * * @param string $set JSON Web Key Set ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getJsonWebKeySetRequest($set) + public function getJsonWebKeySetRequest($set, string $contentType = self::contentTypes['getJsonWebKeySet'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( @@ -1436,6 +1627,7 @@ public function getJsonWebKeySetRequest($set) ); } + $resourcePath = '/admin/keys/{set}'; $formParams = []; $queryParams = []; @@ -1455,16 +1647,11 @@ public function getJsonWebKeySetRequest($set) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1482,12 +1669,12 @@ public function getJsonWebKeySetRequest($set) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1503,10 +1690,11 @@ public function getJsonWebKeySetRequest($set) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1520,14 +1708,15 @@ public function getJsonWebKeySetRequest($set) * @param string $set The JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKey $jsonWebKey jsonWebKey (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKey|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function setJsonWebKey($set, $kid, $jsonWebKey = null) + public function setJsonWebKey($set, $kid, $jsonWebKey = null, string $contentType = self::contentTypes['setJsonWebKey'][0]) { - list($response) = $this->setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey); + list($response) = $this->setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey, $contentType); return $response; } @@ -1539,14 +1728,15 @@ public function setJsonWebKey($set, $kid, $jsonWebKey = null) * @param string $set The JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKey $jsonWebKey (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKey'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKey|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null) + public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null, string $contentType = self::contentTypes['setJsonWebKey'][0]) { - $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey); + $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey, $contentType); try { $options = $this->createHttpClientOption(); @@ -1589,6 +1779,21 @@ public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKey' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1601,6 +1806,21 @@ public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1615,6 +1835,21 @@ public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1654,13 +1889,14 @@ public function setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey = null) * @param string $set The JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKey $jsonWebKey (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setJsonWebKeyAsync($set, $kid, $jsonWebKey = null) + public function setJsonWebKeyAsync($set, $kid, $jsonWebKey = null, string $contentType = self::contentTypes['setJsonWebKey'][0]) { - return $this->setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey) + return $this->setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey, $contentType) ->then( function ($response) { return $response[0]; @@ -1676,14 +1912,15 @@ function ($response) { * @param string $set The JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKey $jsonWebKey (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey = null) + public function setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey = null, string $contentType = self::contentTypes['setJsonWebKey'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKey'; - $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey); + $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1693,6 +1930,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1724,18 +1964,21 @@ function ($exception) { * @param string $set The JSON Web Key Set ID (required) * @param string $kid JSON Web Key ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKey $jsonWebKey (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKey'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) + public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null, string $contentType = self::contentTypes['setJsonWebKey'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $set when calling setJsonWebKey' ); } + // verify the required parameter 'kid' is set if ($kid === null || (is_array($kid) && count($kid) === 0)) { throw new \InvalidArgumentException( @@ -1743,6 +1986,8 @@ public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) ); } + + $resourcePath = '/admin/keys/{set}/{kid}'; $formParams = []; $queryParams = []; @@ -1770,21 +2015,17 @@ public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($jsonWebKey)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonWebKey)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($jsonWebKey)); } else { $httpBody = $jsonWebKey; } @@ -1803,12 +2044,12 @@ public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1824,10 +2065,11 @@ public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1840,14 +2082,15 @@ public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet jsonWebKeySet (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function setJsonWebKeySet($set, $jsonWebKeySet = null) + public function setJsonWebKeySet($set, $jsonWebKeySet = null, string $contentType = self::contentTypes['setJsonWebKeySet'][0]) { - list($response) = $this->setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet); + list($response) = $this->setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet, $contentType); return $response; } @@ -1858,14 +2101,15 @@ public function setJsonWebKeySet($set, $jsonWebKeySet = null) * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKeySet'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null) + public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null, string $contentType = self::contentTypes['setJsonWebKeySet'][0]) { - $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet); + $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet, $contentType); try { $options = $this->createHttpClientOption(); @@ -1908,6 +2152,21 @@ public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1920,6 +2179,21 @@ public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1934,6 +2208,21 @@ public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1972,13 +2261,14 @@ public function setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet = null) * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setJsonWebKeySetAsync($set, $jsonWebKeySet = null) + public function setJsonWebKeySetAsync($set, $jsonWebKeySet = null, string $contentType = self::contentTypes['setJsonWebKeySet'][0]) { - return $this->setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet) + return $this->setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet, $contentType) ->then( function ($response) { return $response[0]; @@ -1993,14 +2283,15 @@ function ($response) { * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet = null) + public function setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet = null, string $contentType = self::contentTypes['setJsonWebKeySet'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; - $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet); + $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2010,6 +2301,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2040,12 +2334,14 @@ function ($exception) { * * @param string $set The JSON Web Key Set ID (required) * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setJsonWebKeySet'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) + public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null, string $contentType = self::contentTypes['setJsonWebKeySet'][0]) { + // verify the required parameter 'set' is set if ($set === null || (is_array($set) && count($set) === 0)) { throw new \InvalidArgumentException( @@ -2053,6 +2349,8 @@ public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) ); } + + $resourcePath = '/admin/keys/{set}'; $formParams = []; $queryParams = []; @@ -2072,21 +2370,17 @@ public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($jsonWebKeySet)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonWebKeySet)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($jsonWebKeySet)); } else { $httpBody = $jsonWebKeySet; } @@ -2105,12 +2399,12 @@ public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2126,10 +2420,11 @@ public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/clients/hydra/php/lib/Api/MetadataApi.php b/clients/hydra/php/lib/Api/MetadataApi.php index f7889c91393..25ab9ee4545 100644 --- a/clients/hydra/php/lib/Api/MetadataApi.php +++ b/clients/hydra/php/lib/Api/MetadataApi.php @@ -1,7 +1,7 @@ [ + 'application/json', + ], + 'isAlive' => [ + 'application/json', + ], + 'isReady' => [ + 'application/json', + ], + ]; + /** * @param ClientInterface $client * @param Configuration $config @@ -121,14 +134,15 @@ public function getConfig() * * Return Running Software Version. * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getVersion'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\InlineResponse2001 + * @return \Ory\Hydra\Client\Model\GetVersion200Response */ - public function getVersion() + public function getVersion(string $contentType = self::contentTypes['getVersion'][0]) { - list($response) = $this->getVersionWithHttpInfo(); + list($response) = $this->getVersionWithHttpInfo($contentType); return $response; } @@ -137,14 +151,15 @@ public function getVersion() * * Return Running Software Version. * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getVersion'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\GetVersion200Response, HTTP status code, HTTP response headers (array of strings) */ - public function getVersionWithHttpInfo() + public function getVersionWithHttpInfo(string $contentType = self::contentTypes['getVersion'][0]) { - $request = $this->getVersionRequest(); + $request = $this->getVersionRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -183,24 +198,54 @@ public function getVersionWithHttpInfo() switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\InlineResponse2001' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\GetVersion200Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GetVersion200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse2001', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GetVersion200Response', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\InlineResponse2001'; + $returnType = '\Ory\Hydra\Client\Model\GetVersion200Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -214,7 +259,7 @@ public function getVersionWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\InlineResponse2001', + '\Ory\Hydra\Client\Model\GetVersion200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -229,13 +274,14 @@ public function getVersionWithHttpInfo() * * Return Running Software Version. * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVersionAsync() + public function getVersionAsync(string $contentType = self::contentTypes['getVersion'][0]) { - return $this->getVersionAsyncWithHttpInfo() + return $this->getVersionAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -248,14 +294,15 @@ function ($response) { * * Return Running Software Version. * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVersionAsyncWithHttpInfo() + public function getVersionAsyncWithHttpInfo(string $contentType = self::contentTypes['getVersion'][0]) { - $returnType = '\Ory\Hydra\Client\Model\InlineResponse2001'; - $request = $this->getVersionRequest(); + $returnType = '\Ory\Hydra\Client\Model\GetVersion200Response'; + $request = $this->getVersionRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -265,6 +312,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -293,13 +343,15 @@ function ($exception) { /** * Create request for operation 'getVersion' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getVersionRequest() + public function getVersionRequest(string $contentType = self::contentTypes['getVersion'][0]) { + $resourcePath = '/version'; $formParams = []; $queryParams = []; @@ -311,16 +363,11 @@ public function getVersionRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -338,12 +385,12 @@ public function getVersionRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -359,10 +406,11 @@ public function getVersionRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -373,14 +421,15 @@ public function getVersionRequest() * * Check HTTP Server Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isAlive'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\GenericError */ - public function isAlive() + public function isAlive(string $contentType = self::contentTypes['isAlive'][0]) { - list($response) = $this->isAliveWithHttpInfo(); + list($response) = $this->isAliveWithHttpInfo($contentType); return $response; } @@ -389,14 +438,15 @@ public function isAlive() * * Check HTTP Server Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isAlive'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function isAliveWithHttpInfo() + public function isAliveWithHttpInfo(string $contentType = self::contentTypes['isAlive'][0]) { - $request = $this->isAliveRequest(); + $request = $this->isAliveRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -439,6 +489,21 @@ public function isAliveWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\HealthStatus' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -451,6 +516,21 @@ public function isAliveWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GenericError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -465,6 +545,21 @@ public function isAliveWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -501,13 +596,14 @@ public function isAliveWithHttpInfo() * * Check HTTP Server Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isAlive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isAliveAsync() + public function isAliveAsync(string $contentType = self::contentTypes['isAlive'][0]) { - return $this->isAliveAsyncWithHttpInfo() + return $this->isAliveAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -520,14 +616,15 @@ function ($response) { * * Check HTTP Server Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isAlive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isAliveAsyncWithHttpInfo() + public function isAliveAsyncWithHttpInfo(string $contentType = self::contentTypes['isAlive'][0]) { $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; - $request = $this->isAliveRequest(); + $request = $this->isAliveRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -537,6 +634,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -565,13 +665,15 @@ function ($exception) { /** * Create request for operation 'isAlive' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isAlive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function isAliveRequest() + public function isAliveRequest(string $contentType = self::contentTypes['isAlive'][0]) { + $resourcePath = '/health/alive'; $formParams = []; $queryParams = []; @@ -583,16 +685,11 @@ public function isAliveRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -610,12 +707,12 @@ public function isAliveRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -631,10 +728,11 @@ public function isAliveRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -645,14 +743,15 @@ public function isAliveRequest() * * Check HTTP Server and Database Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isReady'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\InlineResponse200|\Ory\Hydra\Client\Model\InlineResponse503 + * @return \Ory\Hydra\Client\Model\IsReady200Response|\Ory\Hydra\Client\Model\IsReady503Response */ - public function isReady() + public function isReady(string $contentType = self::contentTypes['isReady'][0]) { - list($response) = $this->isReadyWithHttpInfo(); + list($response) = $this->isReadyWithHttpInfo($contentType); return $response; } @@ -661,14 +760,15 @@ public function isReady() * * Check HTTP Server and Database Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isReady'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\InlineResponse200|\Ory\Hydra\Client\Model\InlineResponse503, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\IsReady200Response|\Ory\Hydra\Client\Model\IsReady503Response, HTTP status code, HTTP response headers (array of strings) */ - public function isReadyWithHttpInfo() + public function isReadyWithHttpInfo(string $contentType = self::contentTypes['isReady'][0]) { - $request = $this->isReadyRequest(); + $request = $this->isReadyRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -707,36 +807,81 @@ public function isReadyWithHttpInfo() switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\InlineResponse200' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\IsReady200Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\IsReady200Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse200', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\IsReady200Response', []), $response->getStatusCode(), $response->getHeaders() ]; case 503: - if ('\Ory\Hydra\Client\Model\InlineResponse503' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\IsReady503Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\IsReady503Response' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse503', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\IsReady503Response', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\InlineResponse200'; + $returnType = '\Ory\Hydra\Client\Model\IsReady200Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -750,7 +895,7 @@ public function isReadyWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\InlineResponse200', + '\Ory\Hydra\Client\Model\IsReady200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -758,7 +903,7 @@ public function isReadyWithHttpInfo() case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\InlineResponse503', + '\Ory\Hydra\Client\Model\IsReady503Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -773,13 +918,14 @@ public function isReadyWithHttpInfo() * * Check HTTP Server and Database Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isReady'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isReadyAsync() + public function isReadyAsync(string $contentType = self::contentTypes['isReady'][0]) { - return $this->isReadyAsyncWithHttpInfo() + return $this->isReadyAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -792,14 +938,15 @@ function ($response) { * * Check HTTP Server and Database Status * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isReady'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isReadyAsyncWithHttpInfo() + public function isReadyAsyncWithHttpInfo(string $contentType = self::contentTypes['isReady'][0]) { - $returnType = '\Ory\Hydra\Client\Model\InlineResponse200'; - $request = $this->isReadyRequest(); + $returnType = '\Ory\Hydra\Client\Model\IsReady200Response'; + $request = $this->isReadyRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -809,6 +956,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -837,13 +987,15 @@ function ($exception) { /** * Create request for operation 'isReady' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['isReady'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function isReadyRequest() + public function isReadyRequest(string $contentType = self::contentTypes['isReady'][0]) { + $resourcePath = '/health/ready'; $formParams = []; $queryParams = []; @@ -855,16 +1007,11 @@ public function isReadyRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -882,12 +1029,12 @@ public function isReadyRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -903,10 +1050,11 @@ public function isReadyRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/clients/hydra/php/lib/Api/OAuth2Api.php b/clients/hydra/php/lib/Api/OAuth2Api.php index 5704ef7e065..430e9c5e850 100644 --- a/clients/hydra/php/lib/Api/OAuth2Api.php +++ b/clients/hydra/php/lib/Api/OAuth2Api.php @@ -1,7 +1,7 @@ [ + 'application/json', + ], + 'acceptOAuth2LoginRequest' => [ + 'application/json', + ], + 'acceptOAuth2LogoutRequest' => [ + 'application/json', + ], + 'createOAuth2Client' => [ + 'application/json', + ], + 'deleteOAuth2Client' => [ + 'application/json', + ], + 'deleteOAuth2Token' => [ + 'application/json', + ], + 'deleteTrustedOAuth2JwtGrantIssuer' => [ + 'application/json', + ], + 'getOAuth2Client' => [ + 'application/json', + ], + 'getOAuth2ConsentRequest' => [ + 'application/json', + ], + 'getOAuth2LoginRequest' => [ + 'application/json', + ], + 'getOAuth2LogoutRequest' => [ + 'application/json', + ], + 'getTrustedOAuth2JwtGrantIssuer' => [ + 'application/json', + ], + 'introspectOAuth2Token' => [ + 'application/x-www-form-urlencoded', + ], + 'listOAuth2Clients' => [ + 'application/json', + ], + 'listOAuth2ConsentSessions' => [ + 'application/json', + ], + 'listTrustedOAuth2JwtGrantIssuers' => [ + 'application/json', + ], + 'oAuth2Authorize' => [ + 'application/json', + ], + 'oauth2TokenExchange' => [ + 'application/x-www-form-urlencoded', + ], + 'patchOAuth2Client' => [ + 'application/json', + ], + 'rejectOAuth2ConsentRequest' => [ + 'application/json', + ], + 'rejectOAuth2LoginRequest' => [ + 'application/json', + ], + 'rejectOAuth2LogoutRequest' => [ + 'application/json', + ], + 'revokeOAuth2ConsentSessions' => [ + 'application/json', + ], + 'revokeOAuth2LoginSessions' => [ + 'application/json', + ], + 'revokeOAuth2Token' => [ + 'application/x-www-form-urlencoded', + ], + 'setOAuth2Client' => [ + 'application/json', + ], + 'setOAuth2ClientLifespans' => [ + 'application/json', + ], + 'trustOAuth2JwtGrantIssuer' => [ + 'application/json', + ], + ]; + /** * @param ClientInterface $client * @param Configuration $config @@ -123,14 +211,15 @@ public function getConfig() * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest acceptOAuth2ConsentRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function acceptOAuth2ConsentRequest($consentChallenge, $acceptOAuth2ConsentRequest = null) + public function acceptOAuth2ConsentRequest($consentChallenge, $acceptOAuth2ConsentRequest = null, string $contentType = self::contentTypes['acceptOAuth2ConsentRequest'][0]) { - list($response) = $this->acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest); + list($response) = $this->acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest, $contentType); return $response; } @@ -141,14 +230,15 @@ public function acceptOAuth2ConsentRequest($consentChallenge, $acceptOAuth2Conse * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null) + public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null, string $contentType = self::contentTypes['acceptOAuth2ConsentRequest'][0]) { - $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest); + $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -191,6 +281,21 @@ public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $accep $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -203,6 +308,21 @@ public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $accep $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -217,6 +337,21 @@ public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $accep $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -255,13 +390,14 @@ public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $accep * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2ConsentRequestAsync($consentChallenge, $acceptOAuth2ConsentRequest = null) + public function acceptOAuth2ConsentRequestAsync($consentChallenge, $acceptOAuth2ConsentRequest = null, string $contentType = self::contentTypes['acceptOAuth2ConsentRequest'][0]) { - return $this->acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest) + return $this->acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -276,14 +412,15 @@ function ($response) { * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null) + public function acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null, string $contentType = self::contentTypes['acceptOAuth2ConsentRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; - $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest); + $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -293,6 +430,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -323,12 +463,14 @@ function ($exception) { * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest = null) + public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest = null, string $contentType = self::contentTypes['acceptOAuth2ConsentRequest'][0]) { + // verify the required parameter 'consentChallenge' is set if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( @@ -336,6 +478,8 @@ public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAut ); } + + $resourcePath = '/admin/oauth2/auth/requests/consent/accept'; $formParams = []; $queryParams = []; @@ -344,35 +488,29 @@ public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAut $multipart = false; // query params - if ($consentChallenge !== null) { - if('form' === 'form' && is_array($consentChallenge)) { - foreach($consentChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['consent_challenge'] = $consentChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $consentChallenge, + 'consent_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($acceptOAuth2ConsentRequest)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2ConsentRequest)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2ConsentRequest)); } else { $httpBody = $acceptOAuth2ConsentRequest; } @@ -391,12 +529,12 @@ public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAut // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -412,10 +550,11 @@ public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAut $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -428,14 +567,15 @@ public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAut * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest acceptOAuth2LoginRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequest = null) + public function acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequest = null, string $contentType = self::contentTypes['acceptOAuth2LoginRequest'][0]) { - list($response) = $this->acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest); + list($response) = $this->acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest, $contentType); return $response; } @@ -446,14 +586,15 @@ public function acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequ * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null) + public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null, string $contentType = self::contentTypes['acceptOAuth2LoginRequest'][0]) { - $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest); + $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -496,6 +637,21 @@ public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -508,6 +664,21 @@ public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -522,6 +693,21 @@ public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -560,13 +746,14 @@ public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAu * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2LoginRequestAsync($loginChallenge, $acceptOAuth2LoginRequest = null) + public function acceptOAuth2LoginRequestAsync($loginChallenge, $acceptOAuth2LoginRequest = null, string $contentType = self::contentTypes['acceptOAuth2LoginRequest'][0]) { - return $this->acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest) + return $this->acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -581,14 +768,15 @@ function ($response) { * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null) + public function acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null, string $contentType = self::contentTypes['acceptOAuth2LoginRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; - $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest); + $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -598,6 +786,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -628,12 +819,14 @@ function ($exception) { * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest = null) + public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest = null, string $contentType = self::contentTypes['acceptOAuth2LoginRequest'][0]) { + // verify the required parameter 'loginChallenge' is set if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( @@ -641,6 +834,8 @@ public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2Lo ); } + + $resourcePath = '/admin/oauth2/auth/requests/login/accept'; $formParams = []; $queryParams = []; @@ -649,35 +844,29 @@ public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2Lo $multipart = false; // query params - if ($loginChallenge !== null) { - if('form' === 'form' && is_array($loginChallenge)) { - foreach($loginChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['login_challenge'] = $loginChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $loginChallenge, + 'login_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($acceptOAuth2LoginRequest)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2LoginRequest)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2LoginRequest)); } else { $httpBody = $acceptOAuth2LoginRequest; } @@ -696,12 +885,12 @@ public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2Lo // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -717,10 +906,11 @@ public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2Lo $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -732,14 +922,15 @@ public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2Lo * Accept OAuth 2.0 Session Logout Request * * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function acceptOAuth2LogoutRequest($logoutChallenge) + public function acceptOAuth2LogoutRequest($logoutChallenge, string $contentType = self::contentTypes['acceptOAuth2LogoutRequest'][0]) { - list($response) = $this->acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge); + list($response) = $this->acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge, $contentType); return $response; } @@ -749,14 +940,15 @@ public function acceptOAuth2LogoutRequest($logoutChallenge) * Accept OAuth 2.0 Session Logout Request * * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) + public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['acceptOAuth2LogoutRequest'][0]) { - $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge, $contentType); try { $options = $this->createHttpClientOption(); @@ -799,6 +991,21 @@ public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -811,6 +1018,21 @@ public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -825,6 +1047,21 @@ public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -862,13 +1099,14 @@ public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) * Accept OAuth 2.0 Session Logout Request * * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2LogoutRequestAsync($logoutChallenge) + public function acceptOAuth2LogoutRequestAsync($logoutChallenge, string $contentType = self::contentTypes['acceptOAuth2LogoutRequest'][0]) { - return $this->acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + return $this->acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, $contentType) ->then( function ($response) { return $response[0]; @@ -882,14 +1120,15 @@ function ($response) { * Accept OAuth 2.0 Session Logout Request * * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + public function acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['acceptOAuth2LogoutRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; - $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -899,6 +1138,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -928,12 +1170,14 @@ function ($exception) { * Create request for operation 'acceptOAuth2LogoutRequest' * * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['acceptOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptOAuth2LogoutRequestRequest($logoutChallenge) + public function acceptOAuth2LogoutRequestRequest($logoutChallenge, string $contentType = self::contentTypes['acceptOAuth2LogoutRequest'][0]) { + // verify the required parameter 'logoutChallenge' is set if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( @@ -941,6 +1185,7 @@ public function acceptOAuth2LogoutRequestRequest($logoutChallenge) ); } + $resourcePath = '/admin/oauth2/auth/requests/logout/accept'; $formParams = []; $queryParams = []; @@ -949,30 +1194,23 @@ public function acceptOAuth2LogoutRequestRequest($logoutChallenge) $multipart = false; // query params - if ($logoutChallenge !== null) { - if('form' === 'form' && is_array($logoutChallenge)) { - foreach($logoutChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['logout_challenge'] = $logoutChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $logoutChallenge, + 'logout_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -990,12 +1228,12 @@ public function acceptOAuth2LogoutRequestRequest($logoutChallenge) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1011,10 +1249,11 @@ public function acceptOAuth2LogoutRequestRequest($logoutChallenge) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1026,14 +1265,15 @@ public function acceptOAuth2LogoutRequestRequest($logoutChallenge) * Create OAuth 2.0 Client * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function createOAuth2Client($oAuth2Client) + public function createOAuth2Client($oAuth2Client, string $contentType = self::contentTypes['createOAuth2Client'][0]) { - list($response) = $this->createOAuth2ClientWithHttpInfo($oAuth2Client); + list($response) = $this->createOAuth2ClientWithHttpInfo($oAuth2Client, $contentType); return $response; } @@ -1043,14 +1283,15 @@ public function createOAuth2Client($oAuth2Client) * Create OAuth 2.0 Client * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function createOAuth2ClientWithHttpInfo($oAuth2Client) + public function createOAuth2ClientWithHttpInfo($oAuth2Client, string $contentType = self::contentTypes['createOAuth2Client'][0]) { - $request = $this->createOAuth2ClientRequest($oAuth2Client); + $request = $this->createOAuth2ClientRequest($oAuth2Client, $contentType); try { $options = $this->createHttpClientOption(); @@ -1093,6 +1334,21 @@ public function createOAuth2ClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1105,6 +1361,21 @@ public function createOAuth2ClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1117,6 +1388,21 @@ public function createOAuth2ClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1131,6 +1417,21 @@ public function createOAuth2ClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1176,13 +1477,14 @@ public function createOAuth2ClientWithHttpInfo($oAuth2Client) * Create OAuth 2.0 Client * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOAuth2ClientAsync($oAuth2Client) + public function createOAuth2ClientAsync($oAuth2Client, string $contentType = self::contentTypes['createOAuth2Client'][0]) { - return $this->createOAuth2ClientAsyncWithHttpInfo($oAuth2Client) + return $this->createOAuth2ClientAsyncWithHttpInfo($oAuth2Client, $contentType) ->then( function ($response) { return $response[0]; @@ -1196,14 +1498,15 @@ function ($response) { * Create OAuth 2.0 Client * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOAuth2ClientAsyncWithHttpInfo($oAuth2Client) + public function createOAuth2ClientAsyncWithHttpInfo($oAuth2Client, string $contentType = self::contentTypes['createOAuth2Client'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->createOAuth2ClientRequest($oAuth2Client); + $request = $this->createOAuth2ClientRequest($oAuth2Client, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1213,6 +1516,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1242,12 +1548,14 @@ function ($exception) { * Create request for operation 'createOAuth2Client' * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createOAuth2ClientRequest($oAuth2Client) + public function createOAuth2ClientRequest($oAuth2Client, string $contentType = self::contentTypes['createOAuth2Client'][0]) { + // verify the required parameter 'oAuth2Client' is set if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( @@ -1255,6 +1563,7 @@ public function createOAuth2ClientRequest($oAuth2Client) ); } + $resourcePath = '/admin/clients'; $formParams = []; $queryParams = []; @@ -1266,21 +1575,17 @@ public function createOAuth2ClientRequest($oAuth2Client) - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($oAuth2Client)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { $httpBody = $oAuth2Client; } @@ -1299,12 +1604,12 @@ public function createOAuth2ClientRequest($oAuth2Client) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1320,10 +1625,11 @@ public function createOAuth2ClientRequest($oAuth2Client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1335,14 +1641,15 @@ public function createOAuth2ClientRequest($oAuth2Client) * Delete OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteOAuth2Client($id) + public function deleteOAuth2Client($id, string $contentType = self::contentTypes['deleteOAuth2Client'][0]) { - $this->deleteOAuth2ClientWithHttpInfo($id); + $this->deleteOAuth2ClientWithHttpInfo($id, $contentType); } /** @@ -1351,14 +1658,15 @@ public function deleteOAuth2Client($id) * Delete OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteOAuth2ClientWithHttpInfo($id) + public function deleteOAuth2ClientWithHttpInfo($id, string $contentType = self::contentTypes['deleteOAuth2Client'][0]) { - $request = $this->deleteOAuth2ClientRequest($id); + $request = $this->deleteOAuth2ClientRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1418,13 +1726,14 @@ public function deleteOAuth2ClientWithHttpInfo($id) * Delete OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOAuth2ClientAsync($id) + public function deleteOAuth2ClientAsync($id, string $contentType = self::contentTypes['deleteOAuth2Client'][0]) { - return $this->deleteOAuth2ClientAsyncWithHttpInfo($id) + return $this->deleteOAuth2ClientAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1438,14 +1747,15 @@ function ($response) { * Delete OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOAuth2ClientAsyncWithHttpInfo($id) + public function deleteOAuth2ClientAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteOAuth2Client'][0]) { $returnType = ''; - $request = $this->deleteOAuth2ClientRequest($id); + $request = $this->deleteOAuth2ClientRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1474,12 +1784,14 @@ function ($exception) { * Create request for operation 'deleteOAuth2Client' * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteOAuth2ClientRequest($id) + public function deleteOAuth2ClientRequest($id, string $contentType = self::contentTypes['deleteOAuth2Client'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -1487,6 +1799,7 @@ public function deleteOAuth2ClientRequest($id) ); } + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; @@ -1506,16 +1819,11 @@ public function deleteOAuth2ClientRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1533,12 +1841,12 @@ public function deleteOAuth2ClientRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1554,10 +1862,11 @@ public function deleteOAuth2ClientRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1569,14 +1878,15 @@ public function deleteOAuth2ClientRequest($id) * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * * @param string $clientId OAuth 2.0 Client ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteOAuth2Token($clientId) + public function deleteOAuth2Token($clientId, string $contentType = self::contentTypes['deleteOAuth2Token'][0]) { - $this->deleteOAuth2TokenWithHttpInfo($clientId); + $this->deleteOAuth2TokenWithHttpInfo($clientId, $contentType); } /** @@ -1585,14 +1895,15 @@ public function deleteOAuth2Token($clientId) * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * * @param string $clientId OAuth 2.0 Client ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteOAuth2TokenWithHttpInfo($clientId) + public function deleteOAuth2TokenWithHttpInfo($clientId, string $contentType = self::contentTypes['deleteOAuth2Token'][0]) { - $request = $this->deleteOAuth2TokenRequest($clientId); + $request = $this->deleteOAuth2TokenRequest($clientId, $contentType); try { $options = $this->createHttpClientOption(); @@ -1652,13 +1963,14 @@ public function deleteOAuth2TokenWithHttpInfo($clientId) * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * * @param string $clientId OAuth 2.0 Client ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOAuth2TokenAsync($clientId) + public function deleteOAuth2TokenAsync($clientId, string $contentType = self::contentTypes['deleteOAuth2Token'][0]) { - return $this->deleteOAuth2TokenAsyncWithHttpInfo($clientId) + return $this->deleteOAuth2TokenAsyncWithHttpInfo($clientId, $contentType) ->then( function ($response) { return $response[0]; @@ -1672,14 +1984,15 @@ function ($response) { * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * * @param string $clientId OAuth 2.0 Client ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOAuth2TokenAsyncWithHttpInfo($clientId) + public function deleteOAuth2TokenAsyncWithHttpInfo($clientId, string $contentType = self::contentTypes['deleteOAuth2Token'][0]) { $returnType = ''; - $request = $this->deleteOAuth2TokenRequest($clientId); + $request = $this->deleteOAuth2TokenRequest($clientId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1708,12 +2021,14 @@ function ($exception) { * Create request for operation 'deleteOAuth2Token' * * @param string $clientId OAuth 2.0 Client ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteOAuth2TokenRequest($clientId) + public function deleteOAuth2TokenRequest($clientId, string $contentType = self::contentTypes['deleteOAuth2Token'][0]) { + // verify the required parameter 'clientId' is set if ($clientId === null || (is_array($clientId) && count($clientId) === 0)) { throw new \InvalidArgumentException( @@ -1721,6 +2036,7 @@ public function deleteOAuth2TokenRequest($clientId) ); } + $resourcePath = '/admin/oauth2/tokens'; $formParams = []; $queryParams = []; @@ -1729,30 +2045,23 @@ public function deleteOAuth2TokenRequest($clientId) $multipart = false; // query params - if ($clientId !== null) { - if('form' === 'form' && is_array($clientId)) { - foreach($clientId as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['client_id'] = $clientId; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $clientId, + 'client_id', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1770,12 +2079,12 @@ public function deleteOAuth2TokenRequest($clientId) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1791,10 +2100,11 @@ public function deleteOAuth2TokenRequest($clientId) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1806,14 +2116,15 @@ public function deleteOAuth2TokenRequest($clientId) * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteTrustedOAuth2JwtGrantIssuer($id) + public function deleteTrustedOAuth2JwtGrantIssuer($id, string $contentType = self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'][0]) { - $this->deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id); + $this->deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id, $contentType); } /** @@ -1822,14 +2133,15 @@ public function deleteTrustedOAuth2JwtGrantIssuer($id) * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) + public function deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id, string $contentType = self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'][0]) { - $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id); + $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1889,13 +2201,14 @@ public function deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTrustedOAuth2JwtGrantIssuerAsync($id) + public function deleteTrustedOAuth2JwtGrantIssuerAsync($id, string $contentType = self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'][0]) { - return $this->deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) + return $this->deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1909,14 +2222,15 @@ function ($response) { * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) + public function deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'][0]) { $returnType = ''; - $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id); + $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1945,12 +2259,14 @@ function ($exception) { * Create request for operation 'deleteTrustedOAuth2JwtGrantIssuer' * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) + public function deleteTrustedOAuth2JwtGrantIssuerRequest($id, string $contentType = self::contentTypes['deleteTrustedOAuth2JwtGrantIssuer'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -1958,6 +2274,7 @@ public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) ); } + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers/{id}'; $formParams = []; $queryParams = []; @@ -1977,16 +2294,11 @@ public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -2004,12 +2316,12 @@ public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2025,10 +2337,11 @@ public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2040,14 +2353,15 @@ public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) * Get an OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOAuth2Client($id) + public function getOAuth2Client($id, string $contentType = self::contentTypes['getOAuth2Client'][0]) { - list($response) = $this->getOAuth2ClientWithHttpInfo($id); + list($response) = $this->getOAuth2ClientWithHttpInfo($id, $contentType); return $response; } @@ -2057,14 +2371,15 @@ public function getOAuth2Client($id) * Get an OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOAuth2ClientWithHttpInfo($id) + public function getOAuth2ClientWithHttpInfo($id, string $contentType = self::contentTypes['getOAuth2Client'][0]) { - $request = $this->getOAuth2ClientRequest($id); + $request = $this->getOAuth2ClientRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2107,6 +2422,21 @@ public function getOAuth2ClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2119,6 +2449,21 @@ public function getOAuth2ClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2133,6 +2478,21 @@ public function getOAuth2ClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2170,13 +2530,14 @@ public function getOAuth2ClientWithHttpInfo($id) * Get an OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ClientAsync($id) + public function getOAuth2ClientAsync($id, string $contentType = self::contentTypes['getOAuth2Client'][0]) { - return $this->getOAuth2ClientAsyncWithHttpInfo($id) + return $this->getOAuth2ClientAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -2190,14 +2551,15 @@ function ($response) { * Get an OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ClientAsyncWithHttpInfo($id) + public function getOAuth2ClientAsyncWithHttpInfo($id, string $contentType = self::contentTypes['getOAuth2Client'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->getOAuth2ClientRequest($id); + $request = $this->getOAuth2ClientRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2207,6 +2569,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2236,12 +2601,14 @@ function ($exception) { * Create request for operation 'getOAuth2Client' * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOAuth2ClientRequest($id) + public function getOAuth2ClientRequest($id, string $contentType = self::contentTypes['getOAuth2Client'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -2249,6 +2616,7 @@ public function getOAuth2ClientRequest($id) ); } + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; @@ -2268,16 +2636,11 @@ public function getOAuth2ClientRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -2295,12 +2658,12 @@ public function getOAuth2ClientRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2316,10 +2679,11 @@ public function getOAuth2ClientRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2331,14 +2695,15 @@ public function getOAuth2ClientRequest($id) * Get OAuth 2.0 Consent Request * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2ConsentRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOAuth2ConsentRequest($consentChallenge) + public function getOAuth2ConsentRequest($consentChallenge, string $contentType = self::contentTypes['getOAuth2ConsentRequest'][0]) { - list($response) = $this->getOAuth2ConsentRequestWithHttpInfo($consentChallenge); + list($response) = $this->getOAuth2ConsentRequestWithHttpInfo($consentChallenge, $contentType); return $response; } @@ -2348,14 +2713,15 @@ public function getOAuth2ConsentRequest($consentChallenge) * Get OAuth 2.0 Consent Request * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2ConsentRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) + public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge, string $contentType = self::contentTypes['getOAuth2ConsentRequest'][0]) { - $request = $this->getOAuth2ConsentRequestRequest($consentChallenge); + $request = $this->getOAuth2ConsentRequestRequest($consentChallenge, $contentType); try { $options = $this->createHttpClientOption(); @@ -2398,6 +2764,21 @@ public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2ConsentRequest' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2410,6 +2791,21 @@ public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2422,6 +2818,21 @@ public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2436,6 +2847,21 @@ public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2481,13 +2907,14 @@ public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) * Get OAuth 2.0 Consent Request * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ConsentRequestAsync($consentChallenge) + public function getOAuth2ConsentRequestAsync($consentChallenge, string $contentType = self::contentTypes['getOAuth2ConsentRequest'][0]) { - return $this->getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge) + return $this->getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $contentType) ->then( function ($response) { return $response[0]; @@ -2501,14 +2928,15 @@ function ($response) { * Get OAuth 2.0 Consent Request * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge) + public function getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, string $contentType = self::contentTypes['getOAuth2ConsentRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentRequest'; - $request = $this->getOAuth2ConsentRequestRequest($consentChallenge); + $request = $this->getOAuth2ConsentRequestRequest($consentChallenge, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2518,6 +2946,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2547,12 +2978,14 @@ function ($exception) { * Create request for operation 'getOAuth2ConsentRequest' * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOAuth2ConsentRequestRequest($consentChallenge) + public function getOAuth2ConsentRequestRequest($consentChallenge, string $contentType = self::contentTypes['getOAuth2ConsentRequest'][0]) { + // verify the required parameter 'consentChallenge' is set if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( @@ -2560,6 +2993,7 @@ public function getOAuth2ConsentRequestRequest($consentChallenge) ); } + $resourcePath = '/admin/oauth2/auth/requests/consent'; $formParams = []; $queryParams = []; @@ -2568,30 +3002,23 @@ public function getOAuth2ConsentRequestRequest($consentChallenge) $multipart = false; // query params - if ($consentChallenge !== null) { - if('form' === 'form' && is_array($consentChallenge)) { - foreach($consentChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['consent_challenge'] = $consentChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $consentChallenge, + 'consent_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -2609,12 +3036,12 @@ public function getOAuth2ConsentRequestRequest($consentChallenge) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2630,10 +3057,11 @@ public function getOAuth2ConsentRequestRequest($consentChallenge) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2645,14 +3073,15 @@ public function getOAuth2ConsentRequestRequest($consentChallenge) * Get OAuth 2.0 Login Request * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2LoginRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOAuth2LoginRequest($loginChallenge) + public function getOAuth2LoginRequest($loginChallenge, string $contentType = self::contentTypes['getOAuth2LoginRequest'][0]) { - list($response) = $this->getOAuth2LoginRequestWithHttpInfo($loginChallenge); + list($response) = $this->getOAuth2LoginRequestWithHttpInfo($loginChallenge, $contentType); return $response; } @@ -2662,14 +3091,15 @@ public function getOAuth2LoginRequest($loginChallenge) * Get OAuth 2.0 Login Request * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2LoginRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) + public function getOAuth2LoginRequestWithHttpInfo($loginChallenge, string $contentType = self::contentTypes['getOAuth2LoginRequest'][0]) { - $request = $this->getOAuth2LoginRequestRequest($loginChallenge); + $request = $this->getOAuth2LoginRequestRequest($loginChallenge, $contentType); try { $options = $this->createHttpClientOption(); @@ -2712,6 +3142,21 @@ public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2LoginRequest' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2724,6 +3169,21 @@ public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2736,6 +3196,21 @@ public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2750,6 +3225,21 @@ public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2795,13 +3285,14 @@ public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) * Get OAuth 2.0 Login Request * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2LoginRequestAsync($loginChallenge) + public function getOAuth2LoginRequestAsync($loginChallenge, string $contentType = self::contentTypes['getOAuth2LoginRequest'][0]) { - return $this->getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge) + return $this->getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $contentType) ->then( function ($response) { return $response[0]; @@ -2815,14 +3306,15 @@ function ($response) { * Get OAuth 2.0 Login Request * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge) + public function getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, string $contentType = self::contentTypes['getOAuth2LoginRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2LoginRequest'; - $request = $this->getOAuth2LoginRequestRequest($loginChallenge); + $request = $this->getOAuth2LoginRequestRequest($loginChallenge, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2832,6 +3324,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2861,12 +3356,14 @@ function ($exception) { * Create request for operation 'getOAuth2LoginRequest' * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOAuth2LoginRequestRequest($loginChallenge) + public function getOAuth2LoginRequestRequest($loginChallenge, string $contentType = self::contentTypes['getOAuth2LoginRequest'][0]) { + // verify the required parameter 'loginChallenge' is set if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( @@ -2874,6 +3371,7 @@ public function getOAuth2LoginRequestRequest($loginChallenge) ); } + $resourcePath = '/admin/oauth2/auth/requests/login'; $formParams = []; $queryParams = []; @@ -2882,30 +3380,23 @@ public function getOAuth2LoginRequestRequest($loginChallenge) $multipart = false; // query params - if ($loginChallenge !== null) { - if('form' === 'form' && is_array($loginChallenge)) { - foreach($loginChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['login_challenge'] = $loginChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $loginChallenge, + 'login_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -2923,12 +3414,12 @@ public function getOAuth2LoginRequestRequest($loginChallenge) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2944,10 +3435,11 @@ public function getOAuth2LoginRequestRequest($loginChallenge) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2959,14 +3451,15 @@ public function getOAuth2LoginRequestRequest($loginChallenge) * Get OAuth 2.0 Session Logout Request * * @param string $logoutChallenge logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2LogoutRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOAuth2LogoutRequest($logoutChallenge) + public function getOAuth2LogoutRequest($logoutChallenge, string $contentType = self::contentTypes['getOAuth2LogoutRequest'][0]) { - list($response) = $this->getOAuth2LogoutRequestWithHttpInfo($logoutChallenge); + list($response) = $this->getOAuth2LogoutRequestWithHttpInfo($logoutChallenge, $contentType); return $response; } @@ -2976,14 +3469,15 @@ public function getOAuth2LogoutRequest($logoutChallenge) * Get OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2LogoutRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) + public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['getOAuth2LogoutRequest'][0]) { - $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge, $contentType); try { $options = $this->createHttpClientOption(); @@ -3026,6 +3520,21 @@ public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2LogoutRequest' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3038,6 +3547,21 @@ public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3050,6 +3574,21 @@ public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3064,6 +3603,21 @@ public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3109,13 +3663,14 @@ public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) * Get OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2LogoutRequestAsync($logoutChallenge) + public function getOAuth2LogoutRequestAsync($logoutChallenge, string $contentType = self::contentTypes['getOAuth2LogoutRequest'][0]) { - return $this->getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + return $this->getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, $contentType) ->then( function ($response) { return $response[0]; @@ -3129,14 +3684,15 @@ function ($response) { * Get OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + public function getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['getOAuth2LogoutRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2LogoutRequest'; - $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3146,6 +3702,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -3175,12 +3734,14 @@ function ($exception) { * Create request for operation 'getOAuth2LogoutRequest' * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOAuth2LogoutRequestRequest($logoutChallenge) + public function getOAuth2LogoutRequestRequest($logoutChallenge, string $contentType = self::contentTypes['getOAuth2LogoutRequest'][0]) { + // verify the required parameter 'logoutChallenge' is set if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( @@ -3188,6 +3749,7 @@ public function getOAuth2LogoutRequestRequest($logoutChallenge) ); } + $resourcePath = '/admin/oauth2/auth/requests/logout'; $formParams = []; $queryParams = []; @@ -3196,30 +3758,23 @@ public function getOAuth2LogoutRequestRequest($logoutChallenge) $multipart = false; // query params - if ($logoutChallenge !== null) { - if('form' === 'form' && is_array($logoutChallenge)) { - foreach($logoutChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['logout_challenge'] = $logoutChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $logoutChallenge, + 'logout_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -3237,12 +3792,12 @@ public function getOAuth2LogoutRequestRequest($logoutChallenge) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3258,10 +3813,11 @@ public function getOAuth2LogoutRequestRequest($logoutChallenge) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3273,14 +3829,15 @@ public function getOAuth2LogoutRequestRequest($logoutChallenge) * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError */ - public function getTrustedOAuth2JwtGrantIssuer($id) + public function getTrustedOAuth2JwtGrantIssuer($id, string $contentType = self::contentTypes['getTrustedOAuth2JwtGrantIssuer'][0]) { - list($response) = $this->getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id); + list($response) = $this->getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id, $contentType); return $response; } @@ -3290,14 +3847,15 @@ public function getTrustedOAuth2JwtGrantIssuer($id) * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) + public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id, string $contentType = self::contentTypes['getTrustedOAuth2JwtGrantIssuer'][0]) { - $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id); + $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3340,6 +3898,21 @@ public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3352,6 +3925,21 @@ public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GenericError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3366,6 +3954,21 @@ public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3403,13 +4006,14 @@ public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustedOAuth2JwtGrantIssuerAsync($id) + public function getTrustedOAuth2JwtGrantIssuerAsync($id, string $contentType = self::contentTypes['getTrustedOAuth2JwtGrantIssuer'][0]) { - return $this->getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) + return $this->getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -3423,14 +4027,15 @@ function ($response) { * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) + public function getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id, string $contentType = self::contentTypes['getTrustedOAuth2JwtGrantIssuer'][0]) { $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; - $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id); + $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3440,6 +4045,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -3469,12 +4077,14 @@ function ($exception) { * Create request for operation 'getTrustedOAuth2JwtGrantIssuer' * * @param string $id The id of the desired grant (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTrustedOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTrustedOAuth2JwtGrantIssuerRequest($id) + public function getTrustedOAuth2JwtGrantIssuerRequest($id, string $contentType = self::contentTypes['getTrustedOAuth2JwtGrantIssuer'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -3482,6 +4092,7 @@ public function getTrustedOAuth2JwtGrantIssuerRequest($id) ); } + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers/{id}'; $formParams = []; $queryParams = []; @@ -3501,16 +4112,11 @@ public function getTrustedOAuth2JwtGrantIssuerRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -3528,12 +4134,12 @@ public function getTrustedOAuth2JwtGrantIssuerRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3549,10 +4155,11 @@ public function getTrustedOAuth2JwtGrantIssuerRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3565,14 +4172,15 @@ public function getTrustedOAuth2JwtGrantIssuerRequest($id) * * @param string $token The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) * @param string $scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['introspectOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\IntrospectedOAuth2Token|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function introspectOAuth2Token($token, $scope = null) + public function introspectOAuth2Token($token, $scope = null, string $contentType = self::contentTypes['introspectOAuth2Token'][0]) { - list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope); + list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope, $contentType); return $response; } @@ -3583,14 +4191,15 @@ public function introspectOAuth2Token($token, $scope = null) * * @param string $token The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) * @param string $scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['introspectOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\IntrospectedOAuth2Token|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) + public function introspectOAuth2TokenWithHttpInfo($token, $scope = null, string $contentType = self::contentTypes['introspectOAuth2Token'][0]) { - $request = $this->introspectOAuth2TokenRequest($token, $scope); + $request = $this->introspectOAuth2TokenRequest($token, $scope, $contentType); try { $options = $this->createHttpClientOption(); @@ -3633,6 +4242,21 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\IntrospectedOAuth2Token' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3645,6 +4269,21 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3659,6 +4298,21 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3697,13 +4351,14 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) * * @param string $token The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) * @param string $scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['introspectOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function introspectOAuth2TokenAsync($token, $scope = null) + public function introspectOAuth2TokenAsync($token, $scope = null, string $contentType = self::contentTypes['introspectOAuth2Token'][0]) { - return $this->introspectOAuth2TokenAsyncWithHttpInfo($token, $scope) + return $this->introspectOAuth2TokenAsyncWithHttpInfo($token, $scope, $contentType) ->then( function ($response) { return $response[0]; @@ -3718,14 +4373,15 @@ function ($response) { * * @param string $token The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) * @param string $scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['introspectOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function introspectOAuth2TokenAsyncWithHttpInfo($token, $scope = null) + public function introspectOAuth2TokenAsyncWithHttpInfo($token, $scope = null, string $contentType = self::contentTypes['introspectOAuth2Token'][0]) { $returnType = '\Ory\Hydra\Client\Model\IntrospectedOAuth2Token'; - $request = $this->introspectOAuth2TokenRequest($token, $scope); + $request = $this->introspectOAuth2TokenRequest($token, $scope, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3735,6 +4391,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -3765,12 +4424,14 @@ function ($exception) { * * @param string $token The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) * @param string $scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['introspectOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function introspectOAuth2TokenRequest($token, $scope = null) + public function introspectOAuth2TokenRequest($token, $scope = null, string $contentType = self::contentTypes['introspectOAuth2Token'][0]) { + // verify the required parameter 'token' is set if ($token === null || (is_array($token) && count($token) === 0)) { throw new \InvalidArgumentException( @@ -3778,6 +4439,8 @@ public function introspectOAuth2TokenRequest($token, $scope = null) ); } + + $resourcePath = '/admin/oauth2/introspect'; $formParams = []; $queryParams = []; @@ -3797,16 +4460,11 @@ public function introspectOAuth2TokenRequest($token, $scope = null) $formParams['token'] = ObjectSerializer::toFormValue($token); } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/x-www-form-urlencoded'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -3824,12 +4482,12 @@ public function introspectOAuth2TokenRequest($token, $scope = null) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -3845,10 +4503,11 @@ public function introspectOAuth2TokenRequest($token, $scope = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3863,14 +4522,15 @@ public function introspectOAuth2TokenRequest($token, $scope = null) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $clientName The name of the clients to filter by. (optional) * @param string $owner The owner of the clients to filter by. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2Clients'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function listOAuth2Clients($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) + public function listOAuth2Clients($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null, string $contentType = self::contentTypes['listOAuth2Clients'][0]) { - list($response) = $this->listOAuth2ClientsWithHttpInfo($pageSize, $pageToken, $clientName, $owner); + list($response) = $this->listOAuth2ClientsWithHttpInfo($pageSize, $pageToken, $clientName, $owner, $contentType); return $response; } @@ -3883,14 +4543,15 @@ public function listOAuth2Clients($pageSize = 250, $pageToken = '1', $clientName * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $clientName The name of the clients to filter by. (optional) * @param string $owner The owner of the clients to filter by. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2Clients'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) + public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null, string $contentType = self::contentTypes['listOAuth2Clients'][0]) { - $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner); + $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner, $contentType); try { $options = $this->createHttpClientOption(); @@ -3933,6 +4594,21 @@ public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3945,6 +4621,21 @@ public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3959,6 +4650,21 @@ public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -3999,13 +4705,14 @@ public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $clientName The name of the clients to filter by. (optional) * @param string $owner The owner of the clients to filter by. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2Clients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ClientsAsync($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) + public function listOAuth2ClientsAsync($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null, string $contentType = self::contentTypes['listOAuth2Clients'][0]) { - return $this->listOAuth2ClientsAsyncWithHttpInfo($pageSize, $pageToken, $clientName, $owner) + return $this->listOAuth2ClientsAsyncWithHttpInfo($pageSize, $pageToken, $clientName, $owner, $contentType) ->then( function ($response) { return $response[0]; @@ -4022,14 +4729,15 @@ function ($response) { * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $clientName The name of the clients to filter by. (optional) * @param string $owner The owner of the clients to filter by. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2Clients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ClientsAsyncWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) + public function listOAuth2ClientsAsyncWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null, string $contentType = self::contentTypes['listOAuth2Clients'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client[]'; - $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner); + $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4039,6 +4747,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -4071,18 +4782,22 @@ function ($exception) { * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $clientName The name of the clients to filter by. (optional) * @param string $owner The owner of the clients to filter by. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2Clients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) + public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null, string $contentType = self::contentTypes['listOAuth2Clients'][0]) { + if ($pageSize !== null && $pageSize > 500) { throw new \InvalidArgumentException('invalid value for "$pageSize" when calling OAuth2Api.listOAuth2Clients, must be smaller than or equal to 500.'); } if ($pageSize !== null && $pageSize < 1) { throw new \InvalidArgumentException('invalid value for "$pageSize" when calling OAuth2Api.listOAuth2Clients, must be bigger than or equal to 1.'); } + + @@ -4094,63 +4809,50 @@ public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $cli $multipart = false; // query params - if ($pageSize !== null) { - if('form' === 'form' && is_array($pageSize)) { - foreach($pageSize as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['page_size'] = $pageSize; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'page_size', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($pageToken !== null) { - if('form' === 'form' && is_array($pageToken)) { - foreach($pageToken as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['page_token'] = $pageToken; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageToken, + 'page_token', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($clientName !== null) { - if('form' === 'form' && is_array($clientName)) { - foreach($clientName as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['client_name'] = $clientName; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $clientName, + 'client_name', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($owner !== null) { - if('form' === 'form' && is_array($owner)) { - foreach($owner as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['owner'] = $owner; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $owner, + 'owner', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -4168,12 +4870,12 @@ public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $cli // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4189,10 +4891,11 @@ public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $cli $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4207,14 +4910,15 @@ public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $cli * @param int $pageSize Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $loginSessionId The login session id to list the consent sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2ConsentSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2ConsentSession[]|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function listOAuth2ConsentSessions($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null) + public function listOAuth2ConsentSessions($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null, string $contentType = self::contentTypes['listOAuth2ConsentSessions'][0]) { - list($response) = $this->listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize, $pageToken, $loginSessionId); + list($response) = $this->listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize, $pageToken, $loginSessionId, $contentType); return $response; } @@ -4227,14 +4931,15 @@ public function listOAuth2ConsentSessions($subject, $pageSize = 250, $pageToken * @param int $pageSize Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $loginSessionId The login session id to list the consent sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2ConsentSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2ConsentSession[]|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null) + public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null, string $contentType = self::contentTypes['listOAuth2ConsentSessions'][0]) { - $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken, $loginSessionId); + $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken, $loginSessionId, $contentType); try { $options = $this->createHttpClientOption(); @@ -4277,6 +4982,21 @@ public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2ConsentSession[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4289,6 +5009,21 @@ public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4303,6 +5038,21 @@ public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4343,13 +5093,14 @@ public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, * @param int $pageSize Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $loginSessionId The login session id to list the consent sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ConsentSessionsAsync($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null) + public function listOAuth2ConsentSessionsAsync($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null, string $contentType = self::contentTypes['listOAuth2ConsentSessions'][0]) { - return $this->listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize, $pageToken, $loginSessionId) + return $this->listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize, $pageToken, $loginSessionId, $contentType) ->then( function ($response) { return $response[0]; @@ -4366,14 +5117,15 @@ function ($response) { * @param int $pageSize Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $loginSessionId The login session id to list the consent sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null) + public function listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null, string $contentType = self::contentTypes['listOAuth2ConsentSessions'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentSession[]'; - $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken, $loginSessionId); + $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken, $loginSessionId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4383,6 +5135,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -4415,25 +5170,29 @@ function ($exception) { * @param int $pageSize Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) * @param string $pageToken Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to '1') * @param string $loginSessionId The login session id to list the consent sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null) + public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pageToken = '1', $loginSessionId = null, string $contentType = self::contentTypes['listOAuth2ConsentSessions'][0]) { + // verify the required parameter 'subject' is set if ($subject === null || (is_array($subject) && count($subject) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $subject when calling listOAuth2ConsentSessions' ); } + if ($pageSize !== null && $pageSize > 500) { throw new \InvalidArgumentException('invalid value for "$pageSize" when calling OAuth2Api.listOAuth2ConsentSessions, must be smaller than or equal to 500.'); } if ($pageSize !== null && $pageSize < 1) { throw new \InvalidArgumentException('invalid value for "$pageSize" when calling OAuth2Api.listOAuth2ConsentSessions, must be bigger than or equal to 1.'); } - + + $resourcePath = '/admin/oauth2/auth/sessions/consent'; @@ -4444,63 +5203,50 @@ public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pag $multipart = false; // query params - if ($pageSize !== null) { - if('form' === 'form' && is_array($pageSize)) { - foreach($pageSize as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['page_size'] = $pageSize; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'page_size', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($pageToken !== null) { - if('form' === 'form' && is_array($pageToken)) { - foreach($pageToken as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['page_token'] = $pageToken; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageToken, + 'page_token', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($subject !== null) { - if('form' === 'form' && is_array($subject)) { - foreach($subject as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['subject'] = $subject; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $subject, + 'subject', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params - if ($loginSessionId !== null) { - if('form' === 'form' && is_array($loginSessionId)) { - foreach($loginSessionId as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['login_session_id'] = $loginSessionId; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $loginSessionId, + 'login_session_id', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -4518,12 +5264,12 @@ public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pag // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4539,10 +5285,11 @@ public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pag $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4556,14 +5303,15 @@ public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pag * @param int $maxItems maxItems (optional) * @param int $defaultItems defaultItems (optional) * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrustedOAuth2JwtGrantIssuers'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError */ - public function listTrustedOAuth2JwtGrantIssuers($maxItems = null, $defaultItems = null, $issuer = null) + public function listTrustedOAuth2JwtGrantIssuers($maxItems = null, $defaultItems = null, $issuer = null, string $contentType = self::contentTypes['listTrustedOAuth2JwtGrantIssuers'][0]) { - list($response) = $this->listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems, $defaultItems, $issuer); + list($response) = $this->listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems, $defaultItems, $issuer, $contentType); return $response; } @@ -4575,14 +5323,15 @@ public function listTrustedOAuth2JwtGrantIssuers($maxItems = null, $defaultItems * @param int $maxItems (optional) * @param int $defaultItems (optional) * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrustedOAuth2JwtGrantIssuers'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null) + public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null, string $contentType = self::contentTypes['listTrustedOAuth2JwtGrantIssuers'][0]) { - $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer); + $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer, $contentType); try { $options = $this->createHttpClientOption(); @@ -4625,6 +5374,21 @@ public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $ $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4637,6 +5401,21 @@ public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $ $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GenericError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4651,6 +5430,21 @@ public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $ $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4690,13 +5484,14 @@ public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $ * @param int $maxItems (optional) * @param int $defaultItems (optional) * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrustedOAuth2JwtGrantIssuers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrustedOAuth2JwtGrantIssuersAsync($maxItems = null, $defaultItems = null, $issuer = null) + public function listTrustedOAuth2JwtGrantIssuersAsync($maxItems = null, $defaultItems = null, $issuer = null, string $contentType = self::contentTypes['listTrustedOAuth2JwtGrantIssuers'][0]) { - return $this->listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems, $defaultItems, $issuer) + return $this->listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems, $defaultItems, $issuer, $contentType) ->then( function ($response) { return $response[0]; @@ -4712,14 +5507,15 @@ function ($response) { * @param int $maxItems (optional) * @param int $defaultItems (optional) * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrustedOAuth2JwtGrantIssuers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null) + public function listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null, string $contentType = self::contentTypes['listTrustedOAuth2JwtGrantIssuers'][0]) { $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]'; - $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer); + $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4729,6 +5525,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -4760,13 +5559,18 @@ function ($exception) { * @param int $maxItems (optional) * @param int $defaultItems (optional) * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTrustedOAuth2JwtGrantIssuers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defaultItems = null, $issuer = null) + public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defaultItems = null, $issuer = null, string $contentType = self::contentTypes['listTrustedOAuth2JwtGrantIssuers'][0]) { + + + + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers'; $formParams = []; $queryParams = []; @@ -4775,52 +5579,41 @@ public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defau $multipart = false; // query params - if ($maxItems !== null) { - if('form' === 'form' && is_array($maxItems)) { - foreach($maxItems as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['MaxItems'] = $maxItems; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $maxItems, + 'MaxItems', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($defaultItems !== null) { - if('form' === 'form' && is_array($defaultItems)) { - foreach($defaultItems as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['DefaultItems'] = $defaultItems; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $defaultItems, + 'DefaultItems', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($issuer !== null) { - if('form' === 'form' && is_array($issuer)) { - foreach($issuer as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['issuer'] = $issuer; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $issuer, + 'issuer', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -4838,12 +5631,12 @@ public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defau // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -4859,10 +5652,11 @@ public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defau $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4873,14 +5667,15 @@ public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defau * * OAuth 2.0 Authorize Endpoint * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oAuth2Authorize'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return |\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function oAuth2Authorize() + public function oAuth2Authorize(string $contentType = self::contentTypes['oAuth2Authorize'][0]) { - list($response) = $this->oAuth2AuthorizeWithHttpInfo(); + list($response) = $this->oAuth2AuthorizeWithHttpInfo($contentType); return $response; } @@ -4889,14 +5684,15 @@ public function oAuth2Authorize() * * OAuth 2.0 Authorize Endpoint * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oAuth2Authorize'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of |\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function oAuth2AuthorizeWithHttpInfo() + public function oAuth2AuthorizeWithHttpInfo(string $contentType = self::contentTypes['oAuth2Authorize'][0]) { - $request = $this->oAuth2AuthorizeRequest(); + $request = $this->oAuth2AuthorizeRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -4939,6 +5735,21 @@ public function oAuth2AuthorizeWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4953,6 +5764,21 @@ public function oAuth2AuthorizeWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -4981,13 +5807,14 @@ public function oAuth2AuthorizeWithHttpInfo() * * OAuth 2.0 Authorize Endpoint * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oAuth2Authorize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function oAuth2AuthorizeAsync() + public function oAuth2AuthorizeAsync(string $contentType = self::contentTypes['oAuth2Authorize'][0]) { - return $this->oAuth2AuthorizeAsyncWithHttpInfo() + return $this->oAuth2AuthorizeAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -5000,14 +5827,15 @@ function ($response) { * * OAuth 2.0 Authorize Endpoint * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oAuth2Authorize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function oAuth2AuthorizeAsyncWithHttpInfo() + public function oAuth2AuthorizeAsyncWithHttpInfo(string $contentType = self::contentTypes['oAuth2Authorize'][0]) { $returnType = '\Ory\Hydra\Client\Model\ErrorOAuth2'; - $request = $this->oAuth2AuthorizeRequest(); + $request = $this->oAuth2AuthorizeRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5017,6 +5845,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -5045,13 +5876,15 @@ function ($exception) { /** * Create request for operation 'oAuth2Authorize' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oAuth2Authorize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function oAuth2AuthorizeRequest() + public function oAuth2AuthorizeRequest(string $contentType = self::contentTypes['oAuth2Authorize'][0]) { + $resourcePath = '/oauth2/auth'; $formParams = []; $queryParams = []; @@ -5063,16 +5896,11 @@ public function oAuth2AuthorizeRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -5090,12 +5918,12 @@ public function oAuth2AuthorizeRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -5111,10 +5939,11 @@ public function oAuth2AuthorizeRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -5130,14 +5959,15 @@ public function oAuth2AuthorizeRequest() * @param string $code code (optional) * @param string $redirectUri redirectUri (optional) * @param string $refreshToken refreshToken (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauth2TokenExchange'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2TokenExchange|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function oauth2TokenExchange($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) + public function oauth2TokenExchange($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null, string $contentType = self::contentTypes['oauth2TokenExchange'][0]) { - list($response) = $this->oauth2TokenExchangeWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken); + list($response) = $this->oauth2TokenExchangeWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken, $contentType); return $response; } @@ -5151,14 +5981,15 @@ public function oauth2TokenExchange($grantType, $clientId = null, $code = null, * @param string $code (optional) * @param string $redirectUri (optional) * @param string $refreshToken (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauth2TokenExchange'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2TokenExchange|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) + public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null, string $contentType = self::contentTypes['oauth2TokenExchange'][0]) { - $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken); + $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken, $contentType); try { $options = $this->createHttpClientOption(); @@ -5201,6 +6032,21 @@ public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $c $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2TokenExchange' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5213,6 +6059,21 @@ public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $c $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5227,6 +6088,21 @@ public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $c $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5268,13 +6144,14 @@ public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $c * @param string $code (optional) * @param string $redirectUri (optional) * @param string $refreshToken (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauth2TokenExchange'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function oauth2TokenExchangeAsync($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) + public function oauth2TokenExchangeAsync($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null, string $contentType = self::contentTypes['oauth2TokenExchange'][0]) { - return $this->oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken) + return $this->oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken, $contentType) ->then( function ($response) { return $response[0]; @@ -5292,14 +6169,15 @@ function ($response) { * @param string $code (optional) * @param string $redirectUri (optional) * @param string $refreshToken (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauth2TokenExchange'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) + public function oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null, string $contentType = self::contentTypes['oauth2TokenExchange'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2TokenExchange'; - $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken); + $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5309,6 +6187,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -5342,12 +6223,14 @@ function ($exception) { * @param string $code (optional) * @param string $redirectUri (optional) * @param string $refreshToken (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauth2TokenExchange'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) + public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null, string $contentType = self::contentTypes['oauth2TokenExchange'][0]) { + // verify the required parameter 'grantType' is set if ($grantType === null || (is_array($grantType) && count($grantType) === 0)) { throw new \InvalidArgumentException( @@ -5355,6 +6238,11 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = ); } + + + + + $resourcePath = '/oauth2/token'; $formParams = []; $queryParams = []; @@ -5386,16 +6274,11 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = $formParams['refresh_token'] = ObjectSerializer::toFormValue($refreshToken); } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/x-www-form-urlencoded'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -5413,12 +6296,12 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -5427,7 +6310,7 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -5442,10 +6325,11 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -5458,14 +6342,15 @@ public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = * * @param string $id The id of the OAuth 2.0 Client. (required) * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function patchOAuth2Client($id, $jsonPatch) + public function patchOAuth2Client($id, $jsonPatch, string $contentType = self::contentTypes['patchOAuth2Client'][0]) { - list($response) = $this->patchOAuth2ClientWithHttpInfo($id, $jsonPatch); + list($response) = $this->patchOAuth2ClientWithHttpInfo($id, $jsonPatch, $contentType); return $response; } @@ -5476,14 +6361,15 @@ public function patchOAuth2Client($id, $jsonPatch) * * @param string $id The id of the OAuth 2.0 Client. (required) * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) + public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch, string $contentType = self::contentTypes['patchOAuth2Client'][0]) { - $request = $this->patchOAuth2ClientRequest($id, $jsonPatch); + $request = $this->patchOAuth2ClientRequest($id, $jsonPatch, $contentType); try { $options = $this->createHttpClientOption(); @@ -5526,6 +6412,21 @@ public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5538,6 +6439,21 @@ public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5550,6 +6466,21 @@ public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5564,6 +6495,21 @@ public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5610,13 +6556,14 @@ public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) * * @param string $id The id of the OAuth 2.0 Client. (required) * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchOAuth2ClientAsync($id, $jsonPatch) + public function patchOAuth2ClientAsync($id, $jsonPatch, string $contentType = self::contentTypes['patchOAuth2Client'][0]) { - return $this->patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch) + return $this->patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch, $contentType) ->then( function ($response) { return $response[0]; @@ -5631,14 +6578,15 @@ function ($response) { * * @param string $id The id of the OAuth 2.0 Client. (required) * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch) + public function patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch, string $contentType = self::contentTypes['patchOAuth2Client'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->patchOAuth2ClientRequest($id, $jsonPatch); + $request = $this->patchOAuth2ClientRequest($id, $jsonPatch, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5648,6 +6596,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -5678,18 +6629,21 @@ function ($exception) { * * @param string $id The id of the OAuth 2.0 Client. (required) * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['patchOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchOAuth2ClientRequest($id, $jsonPatch) + public function patchOAuth2ClientRequest($id, $jsonPatch, string $contentType = self::contentTypes['patchOAuth2Client'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $id when calling patchOAuth2Client' ); } + // verify the required parameter 'jsonPatch' is set if ($jsonPatch === null || (is_array($jsonPatch) && count($jsonPatch) === 0)) { throw new \InvalidArgumentException( @@ -5697,6 +6651,7 @@ public function patchOAuth2ClientRequest($id, $jsonPatch) ); } + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; @@ -5716,21 +6671,17 @@ public function patchOAuth2ClientRequest($id, $jsonPatch) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($jsonPatch)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonPatch)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($jsonPatch)); } else { $httpBody = $jsonPatch; } @@ -5749,12 +6700,12 @@ public function patchOAuth2ClientRequest($id, $jsonPatch) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -5770,10 +6721,11 @@ public function patchOAuth2ClientRequest($id, $jsonPatch) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -5786,14 +6738,15 @@ public function patchOAuth2ClientRequest($id, $jsonPatch) * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2ConsentRequest'][0]) { - list($response) = $this->rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request); + list($response) = $this->rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request, $contentType); return $response; } @@ -5804,14 +6757,15 @@ public function rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Reque * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2ConsentRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2ConsentRequest'][0]) { - $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request); + $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request, $contentType); try { $options = $this->createHttpClientOption(); @@ -5854,6 +6808,21 @@ public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejec $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5866,6 +6835,21 @@ public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejec $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5880,6 +6864,21 @@ public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejec $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -5918,13 +6917,14 @@ public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejec * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2ConsentRequestAsync($consentChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2ConsentRequestAsync($consentChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2ConsentRequest'][0]) { - return $this->rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request) + return $this->rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request, $contentType) ->then( function ($response) { return $response[0]; @@ -5939,14 +6939,15 @@ function ($response) { * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2ConsentRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; - $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request); + $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5956,6 +6957,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -5986,12 +6990,14 @@ function ($exception) { * * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2ConsentRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2ConsentRequest'][0]) { + // verify the required parameter 'consentChallenge' is set if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( @@ -5999,6 +7005,8 @@ public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAut ); } + + $resourcePath = '/admin/oauth2/auth/requests/consent/reject'; $formParams = []; $queryParams = []; @@ -6007,35 +7015,29 @@ public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAut $multipart = false; // query params - if ($consentChallenge !== null) { - if('form' === 'form' && is_array($consentChallenge)) { - foreach($consentChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['consent_challenge'] = $consentChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $consentChallenge, + 'consent_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($rejectOAuth2Request)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); } else { $httpBody = $rejectOAuth2Request; } @@ -6054,12 +7056,12 @@ public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAut // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -6075,10 +7077,11 @@ public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAut $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -6091,14 +7094,15 @@ public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAut * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2LoginRequest'][0]) { - list($response) = $this->rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request); + list($response) = $this->rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request, $contentType); return $response; } @@ -6109,14 +7113,15 @@ public function rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request = * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LoginRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2LoginRequest'][0]) { - $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request); + $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request, $contentType); try { $options = $this->createHttpClientOption(); @@ -6159,6 +7164,21 @@ public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -6171,6 +7191,21 @@ public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -6185,6 +7220,21 @@ public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAu $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -6223,13 +7273,14 @@ public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAu * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2LoginRequestAsync($loginChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2LoginRequestAsync($loginChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2LoginRequest'][0]) { - return $this->rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request) + return $this->rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request, $contentType) ->then( function ($response) { return $response[0]; @@ -6244,14 +7295,15 @@ function ($response) { * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2LoginRequest'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; - $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request); + $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6261,6 +7313,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -6291,12 +7346,14 @@ function ($exception) { * * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LoginRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request = null) + public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request = null, string $contentType = self::contentTypes['rejectOAuth2LoginRequest'][0]) { + // verify the required parameter 'loginChallenge' is set if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( @@ -6304,6 +7361,8 @@ public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Re ); } + + $resourcePath = '/admin/oauth2/auth/requests/login/reject'; $formParams = []; $queryParams = []; @@ -6312,35 +7371,29 @@ public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Re $multipart = false; // query params - if ($loginChallenge !== null) { - if('form' === 'form' && is_array($loginChallenge)) { - foreach($loginChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['login_challenge'] = $loginChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $loginChallenge, + 'login_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($rejectOAuth2Request)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); } else { $httpBody = $rejectOAuth2Request; } @@ -6359,12 +7412,12 @@ public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Re // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -6380,10 +7433,11 @@ public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Re $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -6395,14 +7449,15 @@ public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Re * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function rejectOAuth2LogoutRequest($logoutChallenge) + public function rejectOAuth2LogoutRequest($logoutChallenge, string $contentType = self::contentTypes['rejectOAuth2LogoutRequest'][0]) { - $this->rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge); + $this->rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge, $contentType); } /** @@ -6411,14 +7466,15 @@ public function rejectOAuth2LogoutRequest($logoutChallenge) * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LogoutRequest'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge) + public function rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['rejectOAuth2LogoutRequest'][0]) { - $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge, $contentType); try { $options = $this->createHttpClientOption(); @@ -6478,13 +7534,14 @@ public function rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge) * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2LogoutRequestAsync($logoutChallenge) + public function rejectOAuth2LogoutRequestAsync($logoutChallenge, string $contentType = self::contentTypes['rejectOAuth2LogoutRequest'][0]) { - return $this->rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + return $this->rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, $contentType) ->then( function ($response) { return $response[0]; @@ -6498,14 +7555,15 @@ function ($response) { * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) + public function rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge, string $contentType = self::contentTypes['rejectOAuth2LogoutRequest'][0]) { $returnType = ''; - $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge); + $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6534,12 +7592,14 @@ function ($exception) { * Create request for operation 'rejectOAuth2LogoutRequest' * * @param string $logoutChallenge (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rejectOAuth2LogoutRequest'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectOAuth2LogoutRequestRequest($logoutChallenge) + public function rejectOAuth2LogoutRequestRequest($logoutChallenge, string $contentType = self::contentTypes['rejectOAuth2LogoutRequest'][0]) { + // verify the required parameter 'logoutChallenge' is set if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( @@ -6547,6 +7607,7 @@ public function rejectOAuth2LogoutRequestRequest($logoutChallenge) ); } + $resourcePath = '/admin/oauth2/auth/requests/logout/reject'; $formParams = []; $queryParams = []; @@ -6555,30 +7616,23 @@ public function rejectOAuth2LogoutRequestRequest($logoutChallenge) $multipart = false; // query params - if ($logoutChallenge !== null) { - if('form' === 'form' && is_array($logoutChallenge)) { - foreach($logoutChallenge as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['logout_challenge'] = $logoutChallenge; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $logoutChallenge, + 'logout_challenge', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -6596,12 +7650,12 @@ public function rejectOAuth2LogoutRequestRequest($logoutChallenge) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -6617,10 +7671,11 @@ public function rejectOAuth2LogoutRequestRequest($logoutChallenge) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -6634,14 +7689,15 @@ public function rejectOAuth2LogoutRequestRequest($logoutChallenge) * @param string $subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) * @param string $client OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) * @param bool $all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2ConsentSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function revokeOAuth2ConsentSessions($subject, $client = null, $all = null) + public function revokeOAuth2ConsentSessions($subject, $client = null, $all = null, string $contentType = self::contentTypes['revokeOAuth2ConsentSessions'][0]) { - $this->revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client, $all); + $this->revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client, $all, $contentType); } /** @@ -6652,14 +7708,15 @@ public function revokeOAuth2ConsentSessions($subject, $client = null, $all = nul * @param string $subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) * @param string $client OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) * @param bool $all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2ConsentSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client = null, $all = null) + public function revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client = null, $all = null, string $contentType = self::contentTypes['revokeOAuth2ConsentSessions'][0]) { - $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all); + $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all, $contentType); try { $options = $this->createHttpClientOption(); @@ -6721,13 +7778,14 @@ public function revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client = null * @param string $subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) * @param string $client OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) * @param bool $all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2ConsentSessionsAsync($subject, $client = null, $all = null) + public function revokeOAuth2ConsentSessionsAsync($subject, $client = null, $all = null, string $contentType = self::contentTypes['revokeOAuth2ConsentSessions'][0]) { - return $this->revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client, $all) + return $this->revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client, $all, $contentType) ->then( function ($response) { return $response[0]; @@ -6743,14 +7801,15 @@ function ($response) { * @param string $subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) * @param string $client OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) * @param bool $all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client = null, $all = null) + public function revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client = null, $all = null, string $contentType = self::contentTypes['revokeOAuth2ConsentSessions'][0]) { $returnType = ''; - $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all); + $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6781,12 +7840,14 @@ function ($exception) { * @param string $subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) * @param string $client OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) * @param bool $all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2ConsentSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $all = null) + public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $all = null, string $contentType = self::contentTypes['revokeOAuth2ConsentSessions'][0]) { + // verify the required parameter 'subject' is set if ($subject === null || (is_array($subject) && count($subject) === 0)) { throw new \InvalidArgumentException( @@ -6794,6 +7855,9 @@ public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $al ); } + + + $resourcePath = '/admin/oauth2/auth/sessions/consent'; $formParams = []; $queryParams = []; @@ -6802,52 +7866,41 @@ public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $al $multipart = false; // query params - if ($subject !== null) { - if('form' === 'form' && is_array($subject)) { - foreach($subject as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['subject'] = $subject; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $subject, + 'subject', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); // query params - if ($client !== null) { - if('form' === 'form' && is_array($client)) { - foreach($client as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['client'] = $client; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $client, + 'client', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($all !== null) { - if('form' === 'form' && is_array($all)) { - foreach($all as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['all'] = $all; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $all, + 'all', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -6865,12 +7918,12 @@ public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $al // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -6886,10 +7939,11 @@ public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $al $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -6902,14 +7956,15 @@ public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $al * * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) * @param string $sid OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2LoginSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function revokeOAuth2LoginSessions($subject = null, $sid = null) + public function revokeOAuth2LoginSessions($subject = null, $sid = null, string $contentType = self::contentTypes['revokeOAuth2LoginSessions'][0]) { - $this->revokeOAuth2LoginSessionsWithHttpInfo($subject, $sid); + $this->revokeOAuth2LoginSessionsWithHttpInfo($subject, $sid, $contentType); } /** @@ -6919,14 +7974,15 @@ public function revokeOAuth2LoginSessions($subject = null, $sid = null) * * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) * @param string $sid OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2LoginSessions'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeOAuth2LoginSessionsWithHttpInfo($subject = null, $sid = null) + public function revokeOAuth2LoginSessionsWithHttpInfo($subject = null, $sid = null, string $contentType = self::contentTypes['revokeOAuth2LoginSessions'][0]) { - $request = $this->revokeOAuth2LoginSessionsRequest($subject, $sid); + $request = $this->revokeOAuth2LoginSessionsRequest($subject, $sid, $contentType); try { $options = $this->createHttpClientOption(); @@ -6987,13 +8043,14 @@ public function revokeOAuth2LoginSessionsWithHttpInfo($subject = null, $sid = nu * * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) * @param string $sid OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2LoginSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2LoginSessionsAsync($subject = null, $sid = null) + public function revokeOAuth2LoginSessionsAsync($subject = null, $sid = null, string $contentType = self::contentTypes['revokeOAuth2LoginSessions'][0]) { - return $this->revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject, $sid) + return $this->revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject, $sid, $contentType) ->then( function ($response) { return $response[0]; @@ -7008,14 +8065,15 @@ function ($response) { * * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) * @param string $sid OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2LoginSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject = null, $sid = null) + public function revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject = null, $sid = null, string $contentType = self::contentTypes['revokeOAuth2LoginSessions'][0]) { $returnType = ''; - $request = $this->revokeOAuth2LoginSessionsRequest($subject, $sid); + $request = $this->revokeOAuth2LoginSessionsRequest($subject, $sid, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7045,13 +8103,17 @@ function ($exception) { * * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) * @param string $sid OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2LoginSessions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null) + public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null, string $contentType = self::contentTypes['revokeOAuth2LoginSessions'][0]) { + + + $resourcePath = '/admin/oauth2/auth/sessions/login'; $formParams = []; $queryParams = []; @@ -7060,41 +8122,32 @@ public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null) $multipart = false; // query params - if ($subject !== null) { - if('form' === 'form' && is_array($subject)) { - foreach($subject as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['subject'] = $subject; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $subject, + 'subject', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params - if ($sid !== null) { - if('form' === 'form' && is_array($sid)) { - foreach($sid as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['sid'] = $sid; - } - } + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sid, + 'sid', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -7112,12 +8165,12 @@ public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -7133,10 +8186,11 @@ public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -7150,14 +8204,15 @@ public function revokeOAuth2LoginSessionsRequest($subject = null, $sid = null) * @param string $token token (required) * @param string $clientId clientId (optional) * @param string $clientSecret clientSecret (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function revokeOAuth2Token($token, $clientId = null, $clientSecret = null) + public function revokeOAuth2Token($token, $clientId = null, $clientSecret = null, string $contentType = self::contentTypes['revokeOAuth2Token'][0]) { - $this->revokeOAuth2TokenWithHttpInfo($token, $clientId, $clientSecret); + $this->revokeOAuth2TokenWithHttpInfo($token, $clientId, $clientSecret, $contentType); } /** @@ -7168,14 +8223,15 @@ public function revokeOAuth2Token($token, $clientId = null, $clientSecret = null * @param string $token (required) * @param string $clientId (optional) * @param string $clientSecret (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2Token'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeOAuth2TokenWithHttpInfo($token, $clientId = null, $clientSecret = null) + public function revokeOAuth2TokenWithHttpInfo($token, $clientId = null, $clientSecret = null, string $contentType = self::contentTypes['revokeOAuth2Token'][0]) { - $request = $this->revokeOAuth2TokenRequest($token, $clientId, $clientSecret); + $request = $this->revokeOAuth2TokenRequest($token, $clientId, $clientSecret, $contentType); try { $options = $this->createHttpClientOption(); @@ -7237,13 +8293,14 @@ public function revokeOAuth2TokenWithHttpInfo($token, $clientId = null, $clientS * @param string $token (required) * @param string $clientId (optional) * @param string $clientSecret (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2TokenAsync($token, $clientId = null, $clientSecret = null) + public function revokeOAuth2TokenAsync($token, $clientId = null, $clientSecret = null, string $contentType = self::contentTypes['revokeOAuth2Token'][0]) { - return $this->revokeOAuth2TokenAsyncWithHttpInfo($token, $clientId, $clientSecret) + return $this->revokeOAuth2TokenAsyncWithHttpInfo($token, $clientId, $clientSecret, $contentType) ->then( function ($response) { return $response[0]; @@ -7259,14 +8316,15 @@ function ($response) { * @param string $token (required) * @param string $clientId (optional) * @param string $clientSecret (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOAuth2TokenAsyncWithHttpInfo($token, $clientId = null, $clientSecret = null) + public function revokeOAuth2TokenAsyncWithHttpInfo($token, $clientId = null, $clientSecret = null, string $contentType = self::contentTypes['revokeOAuth2Token'][0]) { $returnType = ''; - $request = $this->revokeOAuth2TokenRequest($token, $clientId, $clientSecret); + $request = $this->revokeOAuth2TokenRequest($token, $clientId, $clientSecret, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7297,12 +8355,14 @@ function ($exception) { * @param string $token (required) * @param string $clientId (optional) * @param string $clientSecret (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOAuth2Token'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret = null) + public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret = null, string $contentType = self::contentTypes['revokeOAuth2Token'][0]) { + // verify the required parameter 'token' is set if ($token === null || (is_array($token) && count($token) === 0)) { throw new \InvalidArgumentException( @@ -7310,6 +8370,9 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret ); } + + + $resourcePath = '/oauth2/revoke'; $formParams = []; $queryParams = []; @@ -7333,16 +8396,11 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret $formParams['token'] = ObjectSerializer::toFormValue($token); } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/x-www-form-urlencoded'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -7360,12 +8418,12 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -7374,7 +8432,7 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -7389,10 +8447,11 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -7405,14 +8464,15 @@ public function revokeOAuth2TokenRequest($token, $clientId = null, $clientSecret * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function setOAuth2Client($id, $oAuth2Client) + public function setOAuth2Client($id, $oAuth2Client, string $contentType = self::contentTypes['setOAuth2Client'][0]) { - list($response) = $this->setOAuth2ClientWithHttpInfo($id, $oAuth2Client); + list($response) = $this->setOAuth2ClientWithHttpInfo($id, $oAuth2Client, $contentType); return $response; } @@ -7423,14 +8483,15 @@ public function setOAuth2Client($id, $oAuth2Client) * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2Client'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) + public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client, string $contentType = self::contentTypes['setOAuth2Client'][0]) { - $request = $this->setOAuth2ClientRequest($id, $oAuth2Client); + $request = $this->setOAuth2ClientRequest($id, $oAuth2Client, $contentType); try { $options = $this->createHttpClientOption(); @@ -7473,6 +8534,21 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7485,6 +8561,21 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7497,6 +8588,21 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7509,6 +8615,21 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7523,6 +8644,21 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7577,13 +8713,14 @@ public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOAuth2ClientAsync($id, $oAuth2Client) + public function setOAuth2ClientAsync($id, $oAuth2Client, string $contentType = self::contentTypes['setOAuth2Client'][0]) { - return $this->setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client) + return $this->setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client, $contentType) ->then( function ($response) { return $response[0]; @@ -7598,14 +8735,15 @@ function ($response) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client) + public function setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client, string $contentType = self::contentTypes['setOAuth2Client'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->setOAuth2ClientRequest($id, $oAuth2Client); + $request = $this->setOAuth2ClientRequest($id, $oAuth2Client, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7615,6 +8753,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -7645,18 +8786,21 @@ function ($exception) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2Client'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setOAuth2ClientRequest($id, $oAuth2Client) + public function setOAuth2ClientRequest($id, $oAuth2Client, string $contentType = self::contentTypes['setOAuth2Client'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $id when calling setOAuth2Client' ); } + // verify the required parameter 'oAuth2Client' is set if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( @@ -7664,6 +8808,7 @@ public function setOAuth2ClientRequest($id, $oAuth2Client) ); } + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; @@ -7683,21 +8828,17 @@ public function setOAuth2ClientRequest($id, $oAuth2Client) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($oAuth2Client)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { $httpBody = $oAuth2Client; } @@ -7716,12 +8857,12 @@ public function setOAuth2ClientRequest($id, $oAuth2Client) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -7737,10 +8878,11 @@ public function setOAuth2ClientRequest($id, $oAuth2Client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -7753,14 +8895,15 @@ public function setOAuth2ClientRequest($id, $oAuth2Client) * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans oAuth2ClientTokenLifespans (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2ClientLifespans'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\GenericError */ - public function setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans = null) + public function setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans = null, string $contentType = self::contentTypes['setOAuth2ClientLifespans'][0]) { - list($response) = $this->setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans); + list($response) = $this->setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans, $contentType); return $response; } @@ -7771,14 +8914,15 @@ public function setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans = null * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2ClientLifespans'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans = null) + public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans = null, string $contentType = self::contentTypes['setOAuth2ClientLifespans'][0]) { - $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans); + $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans, $contentType); try { $options = $this->createHttpClientOption(); @@ -7821,6 +8965,21 @@ public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLife $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7833,6 +8992,21 @@ public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLife $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GenericError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7847,6 +9021,21 @@ public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLife $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -7885,13 +9074,14 @@ public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLife * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2ClientLifespans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOAuth2ClientLifespansAsync($id, $oAuth2ClientTokenLifespans = null) + public function setOAuth2ClientLifespansAsync($id, $oAuth2ClientTokenLifespans = null, string $contentType = self::contentTypes['setOAuth2ClientLifespans'][0]) { - return $this->setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans) + return $this->setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans, $contentType) ->then( function ($response) { return $response[0]; @@ -7906,14 +9096,15 @@ function ($response) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2ClientLifespans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans = null) + public function setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans = null, string $contentType = self::contentTypes['setOAuth2ClientLifespans'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans); + $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7923,6 +9114,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -7953,12 +9147,14 @@ function ($exception) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOAuth2ClientLifespans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans = null) + public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans = null, string $contentType = self::contentTypes['setOAuth2ClientLifespans'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -7966,6 +9162,8 @@ public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans ); } + + $resourcePath = '/admin/clients/{id}/lifespans'; $formParams = []; $queryParams = []; @@ -7985,21 +9183,17 @@ public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($oAuth2ClientTokenLifespans)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2ClientTokenLifespans)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($oAuth2ClientTokenLifespans)); } else { $httpBody = $oAuth2ClientTokenLifespans; } @@ -8018,12 +9212,12 @@ public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -8039,10 +9233,11 @@ public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -8054,14 +9249,15 @@ public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans * Trust OAuth2 JWT Bearer Grant Type Issuer * * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['trustOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError */ - public function trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer = null) + public function trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer = null, string $contentType = self::contentTypes['trustOAuth2JwtGrantIssuer'][0]) { - list($response) = $this->trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer); + list($response) = $this->trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer, $contentType); return $response; } @@ -8071,14 +9267,15 @@ public function trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer = null) * Trust OAuth2 JWT Bearer Grant Type Issuer * * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['trustOAuth2JwtGrantIssuer'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer = null) + public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer = null, string $contentType = self::contentTypes['trustOAuth2JwtGrantIssuer'][0]) { - $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer); + $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer, $contentType); try { $options = $this->createHttpClientOption(); @@ -8121,6 +9318,21 @@ public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -8133,6 +9345,21 @@ public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\GenericError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -8147,6 +9374,21 @@ public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -8184,13 +9426,14 @@ public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer * Trust OAuth2 JWT Bearer Grant Type Issuer * * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['trustOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trustOAuth2JwtGrantIssuerAsync($trustOAuth2JwtGrantIssuer = null) + public function trustOAuth2JwtGrantIssuerAsync($trustOAuth2JwtGrantIssuer = null, string $contentType = self::contentTypes['trustOAuth2JwtGrantIssuer'][0]) { - return $this->trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer) + return $this->trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer, $contentType) ->then( function ($response) { return $response[0]; @@ -8204,14 +9447,15 @@ function ($response) { * Trust OAuth2 JWT Bearer Grant Type Issuer * * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['trustOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer = null) + public function trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer = null, string $contentType = self::contentTypes['trustOAuth2JwtGrantIssuer'][0]) { $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; - $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer); + $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8221,6 +9465,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -8250,13 +9497,16 @@ function ($exception) { * Create request for operation 'trustOAuth2JwtGrantIssuer' * * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['trustOAuth2JwtGrantIssuer'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = null) + public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = null, string $contentType = self::contentTypes['trustOAuth2JwtGrantIssuer'][0]) { + + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers'; $formParams = []; $queryParams = []; @@ -8268,21 +9518,17 @@ public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = nu - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($trustOAuth2JwtGrantIssuer)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trustOAuth2JwtGrantIssuer)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($trustOAuth2JwtGrantIssuer)); } else { $httpBody = $trustOAuth2JwtGrantIssuer; } @@ -8301,12 +9547,12 @@ public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = nu // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -8322,10 +9568,11 @@ public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = nu $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/clients/hydra/php/lib/Api/OidcApi.php b/clients/hydra/php/lib/Api/OidcApi.php index 86b359610a1..83db3c4d9c0 100644 --- a/clients/hydra/php/lib/Api/OidcApi.php +++ b/clients/hydra/php/lib/Api/OidcApi.php @@ -1,7 +1,7 @@ [ + 'application/json', + ], + 'createVerifiableCredential' => [ + 'application/json', + ], + 'deleteOidcDynamicClient' => [ + 'application/json', + ], + 'discoverOidcConfiguration' => [ + 'application/json', + ], + 'getOidcDynamicClient' => [ + 'application/json', + ], + 'getOidcUserInfo' => [ + 'application/json', + ], + 'revokeOidcSession' => [ + 'application/json', + ], + 'setOidcDynamicClient' => [ + 'application/json', + ], + ]; + /** * @param ClientInterface $client * @param Configuration $config @@ -122,14 +150,15 @@ public function getConfig() * Register OAuth2 Client using OpenID Dynamic Client Registration * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function createOidcDynamicClient($oAuth2Client) + public function createOidcDynamicClient($oAuth2Client, string $contentType = self::contentTypes['createOidcDynamicClient'][0]) { - list($response) = $this->createOidcDynamicClientWithHttpInfo($oAuth2Client); + list($response) = $this->createOidcDynamicClientWithHttpInfo($oAuth2Client, $contentType); return $response; } @@ -139,14 +168,15 @@ public function createOidcDynamicClient($oAuth2Client) * Register OAuth2 Client using OpenID Dynamic Client Registration * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function createOidcDynamicClientWithHttpInfo($oAuth2Client) + public function createOidcDynamicClientWithHttpInfo($oAuth2Client, string $contentType = self::contentTypes['createOidcDynamicClient'][0]) { - $request = $this->createOidcDynamicClientRequest($oAuth2Client); + $request = $this->createOidcDynamicClientRequest($oAuth2Client, $contentType); try { $options = $this->createHttpClientOption(); @@ -189,6 +219,21 @@ public function createOidcDynamicClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -201,6 +246,21 @@ public function createOidcDynamicClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -213,6 +273,21 @@ public function createOidcDynamicClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -227,6 +302,21 @@ public function createOidcDynamicClientWithHttpInfo($oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -272,13 +362,14 @@ public function createOidcDynamicClientWithHttpInfo($oAuth2Client) * Register OAuth2 Client using OpenID Dynamic Client Registration * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOidcDynamicClientAsync($oAuth2Client) + public function createOidcDynamicClientAsync($oAuth2Client, string $contentType = self::contentTypes['createOidcDynamicClient'][0]) { - return $this->createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client) + return $this->createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client, $contentType) ->then( function ($response) { return $response[0]; @@ -292,14 +383,15 @@ function ($response) { * Register OAuth2 Client using OpenID Dynamic Client Registration * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client) + public function createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client, string $contentType = self::contentTypes['createOidcDynamicClient'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->createOidcDynamicClientRequest($oAuth2Client); + $request = $this->createOidcDynamicClientRequest($oAuth2Client, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -309,6 +401,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -338,12 +433,14 @@ function ($exception) { * Create request for operation 'createOidcDynamicClient' * * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createOidcDynamicClientRequest($oAuth2Client) + public function createOidcDynamicClientRequest($oAuth2Client, string $contentType = self::contentTypes['createOidcDynamicClient'][0]) { + // verify the required parameter 'oAuth2Client' is set if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( @@ -351,6 +448,7 @@ public function createOidcDynamicClientRequest($oAuth2Client) ); } + $resourcePath = '/oauth2/register'; $formParams = []; $queryParams = []; @@ -362,21 +460,17 @@ public function createOidcDynamicClientRequest($oAuth2Client) - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($oAuth2Client)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { $httpBody = $oAuth2Client; } @@ -395,12 +489,12 @@ public function createOidcDynamicClientRequest($oAuth2Client) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -416,10 +510,11 @@ public function createOidcDynamicClientRequest($oAuth2Client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -431,14 +526,15 @@ public function createOidcDynamicClientRequest($oAuth2Client) * Issues a Verifiable Credential * * @param \Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody $createVerifiableCredentialRequestBody createVerifiableCredentialRequestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createVerifiableCredential'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\VerifiableCredentialResponse|\Ory\Hydra\Client\Model\VerifiableCredentialPrimingResponse|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function createVerifiableCredential($createVerifiableCredentialRequestBody = null) + public function createVerifiableCredential($createVerifiableCredentialRequestBody = null, string $contentType = self::contentTypes['createVerifiableCredential'][0]) { - list($response) = $this->createVerifiableCredentialWithHttpInfo($createVerifiableCredentialRequestBody); + list($response) = $this->createVerifiableCredentialWithHttpInfo($createVerifiableCredentialRequestBody, $contentType); return $response; } @@ -448,14 +544,15 @@ public function createVerifiableCredential($createVerifiableCredentialRequestBod * Issues a Verifiable Credential * * @param \Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody $createVerifiableCredentialRequestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createVerifiableCredential'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\VerifiableCredentialResponse|\Ory\Hydra\Client\Model\VerifiableCredentialPrimingResponse|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function createVerifiableCredentialWithHttpInfo($createVerifiableCredentialRequestBody = null) + public function createVerifiableCredentialWithHttpInfo($createVerifiableCredentialRequestBody = null, string $contentType = self::contentTypes['createVerifiableCredential'][0]) { - $request = $this->createVerifiableCredentialRequest($createVerifiableCredentialRequestBody); + $request = $this->createVerifiableCredentialRequest($createVerifiableCredentialRequestBody, $contentType); try { $options = $this->createHttpClientOption(); @@ -498,6 +595,21 @@ public function createVerifiableCredentialWithHttpInfo($createVerifiableCredenti $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\VerifiableCredentialResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -510,6 +622,21 @@ public function createVerifiableCredentialWithHttpInfo($createVerifiableCredenti $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\VerifiableCredentialPrimingResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -522,6 +649,21 @@ public function createVerifiableCredentialWithHttpInfo($createVerifiableCredenti $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -536,6 +678,21 @@ public function createVerifiableCredentialWithHttpInfo($createVerifiableCredenti $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -581,13 +738,14 @@ public function createVerifiableCredentialWithHttpInfo($createVerifiableCredenti * Issues a Verifiable Credential * * @param \Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody $createVerifiableCredentialRequestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createVerifiableCredential'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createVerifiableCredentialAsync($createVerifiableCredentialRequestBody = null) + public function createVerifiableCredentialAsync($createVerifiableCredentialRequestBody = null, string $contentType = self::contentTypes['createVerifiableCredential'][0]) { - return $this->createVerifiableCredentialAsyncWithHttpInfo($createVerifiableCredentialRequestBody) + return $this->createVerifiableCredentialAsyncWithHttpInfo($createVerifiableCredentialRequestBody, $contentType) ->then( function ($response) { return $response[0]; @@ -601,14 +759,15 @@ function ($response) { * Issues a Verifiable Credential * * @param \Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody $createVerifiableCredentialRequestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createVerifiableCredential'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createVerifiableCredentialAsyncWithHttpInfo($createVerifiableCredentialRequestBody = null) + public function createVerifiableCredentialAsyncWithHttpInfo($createVerifiableCredentialRequestBody = null, string $contentType = self::contentTypes['createVerifiableCredential'][0]) { $returnType = '\Ory\Hydra\Client\Model\VerifiableCredentialResponse'; - $request = $this->createVerifiableCredentialRequest($createVerifiableCredentialRequestBody); + $request = $this->createVerifiableCredentialRequest($createVerifiableCredentialRequestBody, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -618,6 +777,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -647,13 +809,16 @@ function ($exception) { * Create request for operation 'createVerifiableCredential' * * @param \Ory\Hydra\Client\Model\CreateVerifiableCredentialRequestBody $createVerifiableCredentialRequestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createVerifiableCredential'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createVerifiableCredentialRequest($createVerifiableCredentialRequestBody = null) + public function createVerifiableCredentialRequest($createVerifiableCredentialRequestBody = null, string $contentType = self::contentTypes['createVerifiableCredential'][0]) { + + $resourcePath = '/credentials'; $formParams = []; $queryParams = []; @@ -665,21 +830,17 @@ public function createVerifiableCredentialRequest($createVerifiableCredentialReq - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($createVerifiableCredentialRequestBody)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($createVerifiableCredentialRequestBody)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($createVerifiableCredentialRequestBody)); } else { $httpBody = $createVerifiableCredentialRequestBody; } @@ -698,12 +859,12 @@ public function createVerifiableCredentialRequest($createVerifiableCredentialReq // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -719,10 +880,11 @@ public function createVerifiableCredentialRequest($createVerifiableCredentialReq $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -734,14 +896,15 @@ public function createVerifiableCredentialRequest($createVerifiableCredentialReq * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function deleteOidcDynamicClient($id) + public function deleteOidcDynamicClient($id, string $contentType = self::contentTypes['deleteOidcDynamicClient'][0]) { - $this->deleteOidcDynamicClientWithHttpInfo($id); + $this->deleteOidcDynamicClientWithHttpInfo($id, $contentType); } /** @@ -750,14 +913,15 @@ public function deleteOidcDynamicClient($id) * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteOidcDynamicClientWithHttpInfo($id) + public function deleteOidcDynamicClientWithHttpInfo($id, string $contentType = self::contentTypes['deleteOidcDynamicClient'][0]) { - $request = $this->deleteOidcDynamicClientRequest($id); + $request = $this->deleteOidcDynamicClientRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -817,13 +981,14 @@ public function deleteOidcDynamicClientWithHttpInfo($id) * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOidcDynamicClientAsync($id) + public function deleteOidcDynamicClientAsync($id, string $contentType = self::contentTypes['deleteOidcDynamicClient'][0]) { - return $this->deleteOidcDynamicClientAsyncWithHttpInfo($id) + return $this->deleteOidcDynamicClientAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -837,14 +1002,15 @@ function ($response) { * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteOidcDynamicClientAsyncWithHttpInfo($id) + public function deleteOidcDynamicClientAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteOidcDynamicClient'][0]) { $returnType = ''; - $request = $this->deleteOidcDynamicClientRequest($id); + $request = $this->deleteOidcDynamicClientRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -873,12 +1039,14 @@ function ($exception) { * Create request for operation 'deleteOidcDynamicClient' * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteOidcDynamicClientRequest($id) + public function deleteOidcDynamicClientRequest($id, string $contentType = self::contentTypes['deleteOidcDynamicClient'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -886,6 +1054,7 @@ public function deleteOidcDynamicClientRequest($id) ); } + $resourcePath = '/oauth2/register/{id}'; $formParams = []; $queryParams = []; @@ -905,16 +1074,11 @@ public function deleteOidcDynamicClientRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -932,17 +1096,17 @@ public function deleteOidcDynamicClientRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -957,10 +1121,11 @@ public function deleteOidcDynamicClientRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -971,14 +1136,15 @@ public function deleteOidcDynamicClientRequest($id) * * OpenID Connect Discovery * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverOidcConfiguration'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OidcConfiguration|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function discoverOidcConfiguration() + public function discoverOidcConfiguration(string $contentType = self::contentTypes['discoverOidcConfiguration'][0]) { - list($response) = $this->discoverOidcConfigurationWithHttpInfo(); + list($response) = $this->discoverOidcConfigurationWithHttpInfo($contentType); return $response; } @@ -987,14 +1153,15 @@ public function discoverOidcConfiguration() * * OpenID Connect Discovery * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverOidcConfiguration'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OidcConfiguration|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function discoverOidcConfigurationWithHttpInfo() + public function discoverOidcConfigurationWithHttpInfo(string $contentType = self::contentTypes['discoverOidcConfiguration'][0]) { - $request = $this->discoverOidcConfigurationRequest(); + $request = $this->discoverOidcConfigurationRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1037,6 +1204,21 @@ public function discoverOidcConfigurationWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OidcConfiguration' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1049,6 +1231,21 @@ public function discoverOidcConfigurationWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1063,6 +1260,21 @@ public function discoverOidcConfigurationWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1099,13 +1311,14 @@ public function discoverOidcConfigurationWithHttpInfo() * * OpenID Connect Discovery * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverOidcConfiguration'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function discoverOidcConfigurationAsync() + public function discoverOidcConfigurationAsync(string $contentType = self::contentTypes['discoverOidcConfiguration'][0]) { - return $this->discoverOidcConfigurationAsyncWithHttpInfo() + return $this->discoverOidcConfigurationAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1118,14 +1331,15 @@ function ($response) { * * OpenID Connect Discovery * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverOidcConfiguration'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function discoverOidcConfigurationAsyncWithHttpInfo() + public function discoverOidcConfigurationAsyncWithHttpInfo(string $contentType = self::contentTypes['discoverOidcConfiguration'][0]) { $returnType = '\Ory\Hydra\Client\Model\OidcConfiguration'; - $request = $this->discoverOidcConfigurationRequest(); + $request = $this->discoverOidcConfigurationRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1135,6 +1349,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1163,13 +1380,15 @@ function ($exception) { /** * Create request for operation 'discoverOidcConfiguration' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverOidcConfiguration'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function discoverOidcConfigurationRequest() + public function discoverOidcConfigurationRequest(string $contentType = self::contentTypes['discoverOidcConfiguration'][0]) { + $resourcePath = '/.well-known/openid-configuration'; $formParams = []; $queryParams = []; @@ -1181,16 +1400,11 @@ public function discoverOidcConfigurationRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1208,12 +1422,12 @@ public function discoverOidcConfigurationRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -1229,10 +1443,11 @@ public function discoverOidcConfigurationRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1244,14 +1459,15 @@ public function discoverOidcConfigurationRequest() * Get OAuth2 Client using OpenID Dynamic Client Registration * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOidcDynamicClient($id) + public function getOidcDynamicClient($id, string $contentType = self::contentTypes['getOidcDynamicClient'][0]) { - list($response) = $this->getOidcDynamicClientWithHttpInfo($id); + list($response) = $this->getOidcDynamicClientWithHttpInfo($id, $contentType); return $response; } @@ -1261,14 +1477,15 @@ public function getOidcDynamicClient($id) * Get OAuth2 Client using OpenID Dynamic Client Registration * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOidcDynamicClientWithHttpInfo($id) + public function getOidcDynamicClientWithHttpInfo($id, string $contentType = self::contentTypes['getOidcDynamicClient'][0]) { - $request = $this->getOidcDynamicClientRequest($id); + $request = $this->getOidcDynamicClientRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1311,6 +1528,21 @@ public function getOidcDynamicClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1323,6 +1555,21 @@ public function getOidcDynamicClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1337,6 +1584,21 @@ public function getOidcDynamicClientWithHttpInfo($id) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1374,13 +1636,14 @@ public function getOidcDynamicClientWithHttpInfo($id) * Get OAuth2 Client using OpenID Dynamic Client Registration * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOidcDynamicClientAsync($id) + public function getOidcDynamicClientAsync($id, string $contentType = self::contentTypes['getOidcDynamicClient'][0]) { - return $this->getOidcDynamicClientAsyncWithHttpInfo($id) + return $this->getOidcDynamicClientAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1394,14 +1657,15 @@ function ($response) { * Get OAuth2 Client using OpenID Dynamic Client Registration * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOidcDynamicClientAsyncWithHttpInfo($id) + public function getOidcDynamicClientAsyncWithHttpInfo($id, string $contentType = self::contentTypes['getOidcDynamicClient'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->getOidcDynamicClientRequest($id); + $request = $this->getOidcDynamicClientRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1411,6 +1675,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1440,12 +1707,14 @@ function ($exception) { * Create request for operation 'getOidcDynamicClient' * * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOidcDynamicClientRequest($id) + public function getOidcDynamicClientRequest($id, string $contentType = self::contentTypes['getOidcDynamicClient'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( @@ -1453,6 +1722,7 @@ public function getOidcDynamicClientRequest($id) ); } + $resourcePath = '/oauth2/register/{id}'; $formParams = []; $queryParams = []; @@ -1472,16 +1742,11 @@ public function getOidcDynamicClientRequest($id) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1499,17 +1764,17 @@ public function getOidcDynamicClientRequest($id) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1524,10 +1789,11 @@ public function getOidcDynamicClientRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1538,14 +1804,15 @@ public function getOidcDynamicClientRequest($id) * * OpenID Connect Userinfo * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcUserInfo'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OidcUserInfo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOidcUserInfo() + public function getOidcUserInfo(string $contentType = self::contentTypes['getOidcUserInfo'][0]) { - list($response) = $this->getOidcUserInfoWithHttpInfo(); + list($response) = $this->getOidcUserInfoWithHttpInfo($contentType); return $response; } @@ -1554,14 +1821,15 @@ public function getOidcUserInfo() * * OpenID Connect Userinfo * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcUserInfo'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OidcUserInfo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getOidcUserInfoWithHttpInfo() + public function getOidcUserInfoWithHttpInfo(string $contentType = self::contentTypes['getOidcUserInfo'][0]) { - $request = $this->getOidcUserInfoRequest(); + $request = $this->getOidcUserInfoRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1604,6 +1872,21 @@ public function getOidcUserInfoWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OidcUserInfo' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1616,6 +1899,21 @@ public function getOidcUserInfoWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1630,6 +1928,21 @@ public function getOidcUserInfoWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -1666,13 +1979,14 @@ public function getOidcUserInfoWithHttpInfo() * * OpenID Connect Userinfo * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOidcUserInfoAsync() + public function getOidcUserInfoAsync(string $contentType = self::contentTypes['getOidcUserInfo'][0]) { - return $this->getOidcUserInfoAsyncWithHttpInfo() + return $this->getOidcUserInfoAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1685,14 +1999,15 @@ function ($response) { * * OpenID Connect Userinfo * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOidcUserInfoAsyncWithHttpInfo() + public function getOidcUserInfoAsyncWithHttpInfo(string $contentType = self::contentTypes['getOidcUserInfo'][0]) { $returnType = '\Ory\Hydra\Client\Model\OidcUserInfo'; - $request = $this->getOidcUserInfoRequest(); + $request = $this->getOidcUserInfoRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1702,6 +2017,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -1730,13 +2048,15 @@ function ($exception) { /** * Create request for operation 'getOidcUserInfo' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOidcUserInfo'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOidcUserInfoRequest() + public function getOidcUserInfoRequest(string $contentType = self::contentTypes['getOidcUserInfo'][0]) { + $resourcePath = '/userinfo'; $formParams = []; $queryParams = []; @@ -1748,16 +2068,11 @@ public function getOidcUserInfoRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1775,17 +2090,17 @@ public function getOidcUserInfoRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1800,10 +2115,11 @@ public function getOidcUserInfoRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1814,14 +2130,15 @@ public function getOidcUserInfoRequest() * * OpenID Connect Front- and Back-channel Enabled Logout * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOidcSession'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function revokeOidcSession() + public function revokeOidcSession(string $contentType = self::contentTypes['revokeOidcSession'][0]) { - $this->revokeOidcSessionWithHttpInfo(); + $this->revokeOidcSessionWithHttpInfo($contentType); } /** @@ -1829,14 +2146,15 @@ public function revokeOidcSession() * * OpenID Connect Front- and Back-channel Enabled Logout * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOidcSession'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeOidcSessionWithHttpInfo() + public function revokeOidcSessionWithHttpInfo(string $contentType = self::contentTypes['revokeOidcSession'][0]) { - $request = $this->revokeOidcSessionRequest(); + $request = $this->revokeOidcSessionRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1887,13 +2205,14 @@ public function revokeOidcSessionWithHttpInfo() * * OpenID Connect Front- and Back-channel Enabled Logout * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOidcSession'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOidcSessionAsync() + public function revokeOidcSessionAsync(string $contentType = self::contentTypes['revokeOidcSession'][0]) { - return $this->revokeOidcSessionAsyncWithHttpInfo() + return $this->revokeOidcSessionAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1906,14 +2225,15 @@ function ($response) { * * OpenID Connect Front- and Back-channel Enabled Logout * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOidcSession'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeOidcSessionAsyncWithHttpInfo() + public function revokeOidcSessionAsyncWithHttpInfo(string $contentType = self::contentTypes['revokeOidcSession'][0]) { $returnType = ''; - $request = $this->revokeOidcSessionRequest(); + $request = $this->revokeOidcSessionRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1941,13 +2261,15 @@ function ($exception) { /** * Create request for operation 'revokeOidcSession' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['revokeOidcSession'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeOidcSessionRequest() + public function revokeOidcSessionRequest(string $contentType = self::contentTypes['revokeOidcSession'][0]) { + $resourcePath = '/oauth2/sessions/logout'; $formParams = []; $queryParams = []; @@ -1959,16 +2281,11 @@ public function revokeOidcSessionRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -1986,12 +2303,12 @@ public function revokeOidcSessionRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -2007,10 +2324,11 @@ public function revokeOidcSessionRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2023,14 +2341,15 @@ public function revokeOidcSessionRequest() * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function setOidcDynamicClient($id, $oAuth2Client) + public function setOidcDynamicClient($id, $oAuth2Client, string $contentType = self::contentTypes['setOidcDynamicClient'][0]) { - list($response) = $this->setOidcDynamicClientWithHttpInfo($id, $oAuth2Client); + list($response) = $this->setOidcDynamicClientWithHttpInfo($id, $oAuth2Client, $contentType); return $response; } @@ -2041,14 +2360,15 @@ public function setOidcDynamicClient($id, $oAuth2Client) * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOidcDynamicClient'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) + public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client, string $contentType = self::contentTypes['setOidcDynamicClient'][0]) { - $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client); + $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client, $contentType); try { $options = $this->createHttpClientOption(); @@ -2091,6 +2411,21 @@ public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\OAuth2Client' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2103,6 +2438,21 @@ public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2115,6 +2465,21 @@ public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2129,6 +2494,21 @@ public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -2175,13 +2555,14 @@ public function setOidcDynamicClientWithHttpInfo($id, $oAuth2Client) * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOidcDynamicClientAsync($id, $oAuth2Client) + public function setOidcDynamicClientAsync($id, $oAuth2Client, string $contentType = self::contentTypes['setOidcDynamicClient'][0]) { - return $this->setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client) + return $this->setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client, $contentType) ->then( function ($response) { return $response[0]; @@ -2196,14 +2577,15 @@ function ($response) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client) + public function setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client, string $contentType = self::contentTypes['setOidcDynamicClient'][0]) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client); + $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2213,6 +2595,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -2243,18 +2628,21 @@ function ($exception) { * * @param string $id OAuth 2.0 Client ID (required) * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOidcDynamicClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setOidcDynamicClientRequest($id, $oAuth2Client) + public function setOidcDynamicClientRequest($id, $oAuth2Client, string $contentType = self::contentTypes['setOidcDynamicClient'][0]) { + // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $id when calling setOidcDynamicClient' ); } + // verify the required parameter 'oAuth2Client' is set if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( @@ -2262,6 +2650,7 @@ public function setOidcDynamicClientRequest($id, $oAuth2Client) ); } + $resourcePath = '/oauth2/register/{id}'; $formParams = []; $queryParams = []; @@ -2281,21 +2670,17 @@ public function setOidcDynamicClientRequest($id, $oAuth2Client) } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (isset($oAuth2Client)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { $httpBody = $oAuth2Client; } @@ -2314,17 +2699,17 @@ public function setOidcDynamicClientRequest($id, $oAuth2Client) // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } // this endpoint requires Bearer authentication (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2339,10 +2724,11 @@ public function setOidcDynamicClientRequest($id, $oAuth2Client) $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/clients/hydra/php/lib/Api/WellknownApi.php b/clients/hydra/php/lib/Api/WellknownApi.php index 53fd17178d4..9f30978d776 100644 --- a/clients/hydra/php/lib/Api/WellknownApi.php +++ b/clients/hydra/php/lib/Api/WellknownApi.php @@ -1,7 +1,7 @@ [ + 'application/json', + ], + ]; + /** * @param ClientInterface $client * @param Configuration $config @@ -121,14 +128,15 @@ public function getConfig() * * Discover Well-Known JSON Web Keys * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverJsonWebKeys'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function discoverJsonWebKeys() + public function discoverJsonWebKeys(string $contentType = self::contentTypes['discoverJsonWebKeys'][0]) { - list($response) = $this->discoverJsonWebKeysWithHttpInfo(); + list($response) = $this->discoverJsonWebKeysWithHttpInfo($contentType); return $response; } @@ -137,14 +145,15 @@ public function discoverJsonWebKeys() * * Discover Well-Known JSON Web Keys * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverJsonWebKeys'] to see the possible values for this operation * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \Ory\Hydra\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function discoverJsonWebKeysWithHttpInfo() + public function discoverJsonWebKeysWithHttpInfo(string $contentType = self::contentTypes['discoverJsonWebKeys'][0]) { - $request = $this->discoverJsonWebKeysRequest(); + $request = $this->discoverJsonWebKeysRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -187,6 +196,21 @@ public function discoverJsonWebKeysWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -199,6 +223,21 @@ public function discoverJsonWebKeysWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -213,6 +252,21 @@ public function discoverJsonWebKeysWithHttpInfo() $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } } return [ @@ -249,13 +303,14 @@ public function discoverJsonWebKeysWithHttpInfo() * * Discover Well-Known JSON Web Keys * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverJsonWebKeys'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function discoverJsonWebKeysAsync() + public function discoverJsonWebKeysAsync(string $contentType = self::contentTypes['discoverJsonWebKeys'][0]) { - return $this->discoverJsonWebKeysAsyncWithHttpInfo() + return $this->discoverJsonWebKeysAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -268,14 +323,15 @@ function ($response) { * * Discover Well-Known JSON Web Keys * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverJsonWebKeys'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function discoverJsonWebKeysAsyncWithHttpInfo() + public function discoverJsonWebKeysAsyncWithHttpInfo(string $contentType = self::contentTypes['discoverJsonWebKeys'][0]) { $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; - $request = $this->discoverJsonWebKeysRequest(); + $request = $this->discoverJsonWebKeysRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -285,6 +341,9 @@ function ($response) use ($returnType) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } } return [ @@ -313,13 +372,15 @@ function ($exception) { /** * Create request for operation 'discoverJsonWebKeys' * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['discoverJsonWebKeys'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function discoverJsonWebKeysRequest() + public function discoverJsonWebKeysRequest(string $contentType = self::contentTypes['discoverJsonWebKeys'][0]) { + $resourcePath = '/.well-known/jwks.json'; $formParams = []; $queryParams = []; @@ -331,16 +392,11 @@ public function discoverJsonWebKeysRequest() - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); // for model (json/xml) if (count($formParams) > 0) { @@ -358,12 +414,12 @@ public function discoverJsonWebKeysRequest() // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + $httpBody = ObjectSerializer::buildQuery($formParams); } } @@ -379,10 +435,11 @@ public function discoverJsonWebKeysRequest() $headers ); - $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/clients/hydra/php/lib/ApiException.php b/clients/hydra/php/lib/ApiException.php index d3a5efbba89..d91446e6dca 100644 --- a/clients/hydra/php/lib/ApiException.php +++ b/clients/hydra/php/lib/ApiException.php @@ -1,7 +1,7 @@ accessToken; } + /** + * Sets boolean format for query string. + * + * @param string $booleanFormat Boolean format for query string + * + * @return $this + */ + public function setBooleanFormatForQueryString(string $booleanFormat) + { + $this->booleanFormatForQueryString = $booleanFormat; + + return $this; + } + + /** + * Gets boolean format for query string. + * + * @return string Boolean format for query string + */ + public function getBooleanFormatForQueryString(): string + { + return $this->booleanFormatForQueryString; + } + /** * Sets the username for HTTP basic authentication * @@ -399,7 +433,7 @@ public static function toDebugReport() $report = 'PHP SDK (Ory\Hydra\Client) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: v2.2.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: v2.2.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; @@ -446,32 +480,31 @@ public function getHostSettings() } /** - * Returns URL based on the index and variables - * - * @param int $index index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) - * @return string URL based on host settings - */ - public function getHostFromSettings($index, $variables = null) + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) { if (null === $variables) { $variables = []; } - $hosts = $this->getHostSettings(); - // check array index out of bound - if ($index < 0 || $index >= sizeof($hosts)) { - throw new \InvalidArgumentException("Invalid index $index when selecting the host. Must be less than ".sizeof($hosts)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); } - $host = $hosts[$index]; + $host = $hostSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value foreach ($host["variables"] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user - if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum $url = str_replace("{".$name."}", $variables[$name], $url); } else { throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); @@ -484,4 +517,16 @@ public function getHostFromSettings($index, $variables = null) return $url; } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } } diff --git a/clients/hydra/php/lib/HeaderSelector.php b/clients/hydra/php/lib/HeaderSelector.php index e7b6d2c19cc..5a469ca2164 100644 --- a/clients/hydra/php/lib/HeaderSelector.php +++ b/clients/hydra/php/lib/HeaderSelector.php @@ -1,7 +1,7 @@ selectContentTypeHeader($contentTypes); - return $headers; - } + if (!$isMultipart) { + if($contentType === '') { + $contentType = 'application/json'; + } - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); + $headers['Content-Type'] = $contentType; + } - unset($headers['Content-Type']); return $headers; } /** - * Return the header 'Accept' based on an array of Accept provided + * Return the header 'Accept' based on an array of Accept provided. * * @param string[] $accept Array of header * * @return null|string Accept (e.g. application/json) */ - private function selectAcceptHeader($accept) + private function selectAcceptHeader(array $accept): ?string { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { + # filter out empty entries + $accept = array_filter($accept); + + if (count($accept) === 0) { return null; - } elseif ($jsonAccept = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept)) { - return implode(',', $jsonAccept); - } else { + } + + # If there's only one Accept header, just use it + if (count($accept) === 1) { + return reset($accept); + } + + # If none of the available Accept headers is of type "json", then just use all them + $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + if (count($headersWithJson) === 0) { return implode(',', $accept); } + + # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, + # to give the highest priority to json-like headers - recalculating the existing ones, if needed + return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } /** - * Return the content type based on an array of content-type provided + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ + private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string + { + $processedHeaders = [ + 'withApplicationJson' => [], + 'withJson' => [], + 'withoutJson' => [], + ]; + + foreach ($accept as $header) { + + $headerData = $this->getHeaderAndWeight($header); + + if (stripos($headerData['header'], 'application/json') === 0) { + $processedHeaders['withApplicationJson'][] = $headerData; + } elseif (in_array($header, $headersWithJson, true)) { + $processedHeaders['withJson'][] = $headerData; + } else { + $processedHeaders['withoutJson'][] = $headerData; + } + } + + $acceptHeaders = []; + $currentWeight = 1000; + + $hasMoreThan28Headers = count($accept) > 28; + + foreach($processedHeaders as $headers) { + if (count($headers) > 0) { + $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); + } + } + + $acceptHeaders = array_merge(...$acceptHeaders); + + return implode(',', $acceptHeaders); + } + + /** + * Given an Accept header, returns an associative array splitting the header and its weight * - * @param string[] $contentType Array fo content-type + * @param string $header "Accept" Header * - * @return string Content-Type (e.g. application/json) + * @return array with the header and its weight */ - private function selectContentTypeHeader($contentType) + private function getHeaderAndWeight(string $header): array { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; + # matches headers with weight, splitting the header and the weight in $outputArray + if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { + $headerData = [ + 'header' => $outputArray[1], + 'weight' => (int)($outputArray[2] * 1000), + ]; } else { - return implode(',', $contentType); + $headerData = [ + 'header' => trim($header), + 'weight' => 1000, + ]; } + + return $headerData; + } + + /** + * @param array[] $headers + * @param float $currentWeight + * @param bool $hasMoreThan28Headers + * @return string[] array of adjusted "Accept" headers + */ + private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array + { + usort($headers, function (array $a, array $b) { + return $b['weight'] - $a['weight']; + }); + + $acceptHeaders = []; + foreach ($headers as $index => $header) { + if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) + { + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + } + + $weight = $currentWeight; + + $acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight); + } + + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + + return $acceptHeaders; + } + + /** + * @param string $header + * @param int $weight + * @return string + */ + private function buildAcceptHeader(string $header, int $weight): string + { + if($weight === 1000) { + return $header; + } + + return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); + } + + /** + * Calculate the next weight, based on the current one. + * + * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the + * following formula: + * + * next weight = current weight - 10 ^ (floor(log(current weight - 1))) + * + * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) + * + * Starting from 1000, this generates the following series: + * + * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 + * + * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works + * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 + * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. + * + * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) + * @param bool $hasMoreThan28Headers + * @return int + */ + public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int + { + if ($currentWeight <= 1) { + return 1; + } + + if ($hasMoreThan28Headers) { + return $currentWeight - 1; + } + + return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); } } diff --git a/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php index c82e59562a5..c94d12a1716 100644 --- a/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2ConsentRequest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class AcceptOAuth2ConsentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -86,6 +84,28 @@ class AcceptOAuth2ConsentRequest implements ModelInterface, ArrayAccess, \JsonSe 'session' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'context' => true, + 'grantAccessTokenAudience' => false, + 'grantScope' => false, + 'handledAt' => false, + 'remember' => false, + 'rememberFor' => false, + 'session' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -106,6 +126,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -209,13 +281,31 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['context'] = $data['context'] ?? null; - $this->container['grantAccessTokenAudience'] = $data['grantAccessTokenAudience'] ?? null; - $this->container['grantScope'] = $data['grantScope'] ?? null; - $this->container['handledAt'] = $data['handledAt'] ?? null; - $this->container['remember'] = $data['remember'] ?? null; - $this->container['rememberFor'] = $data['rememberFor'] ?? null; - $this->container['session'] = $data['session'] ?? null; + $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('grantAccessTokenAudience', $data ?? [], null); + $this->setIfExists('grantScope', $data ?? [], null); + $this->setIfExists('handledAt', $data ?? [], null); + $this->setIfExists('remember', $data ?? [], null); + $this->setIfExists('rememberFor', $data ?? [], null); + $this->setIfExists('session', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -261,6 +351,16 @@ public function getContext() */ public function setContext($context) { + if (is_null($context)) { + array_push($this->openAPINullablesSetToNull, 'context'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('context', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['context'] = $context; return $this; @@ -285,6 +385,9 @@ public function getGrantAccessTokenAudience() */ public function setGrantAccessTokenAudience($grantAccessTokenAudience) { + if (is_null($grantAccessTokenAudience)) { + throw new \InvalidArgumentException('non-nullable grantAccessTokenAudience cannot be null'); + } $this->container['grantAccessTokenAudience'] = $grantAccessTokenAudience; return $this; @@ -309,6 +412,9 @@ public function getGrantScope() */ public function setGrantScope($grantScope) { + if (is_null($grantScope)) { + throw new \InvalidArgumentException('non-nullable grantScope cannot be null'); + } $this->container['grantScope'] = $grantScope; return $this; @@ -333,6 +439,9 @@ public function getHandledAt() */ public function setHandledAt($handledAt) { + if (is_null($handledAt)) { + throw new \InvalidArgumentException('non-nullable handledAt cannot be null'); + } $this->container['handledAt'] = $handledAt; return $this; @@ -357,6 +466,9 @@ public function getRemember() */ public function setRemember($remember) { + if (is_null($remember)) { + throw new \InvalidArgumentException('non-nullable remember cannot be null'); + } $this->container['remember'] = $remember; return $this; @@ -381,6 +493,9 @@ public function getRememberFor() */ public function setRememberFor($rememberFor) { + if (is_null($rememberFor)) { + throw new \InvalidArgumentException('non-nullable rememberFor cannot be null'); + } $this->container['rememberFor'] = $rememberFor; return $this; @@ -405,6 +520,9 @@ public function getSession() */ public function setSession($session) { + if (is_null($session)) { + throw new \InvalidArgumentException('non-nullable session cannot be null'); + } $this->container['session'] = $session; return $this; @@ -416,7 +534,7 @@ public function setSession($session) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -428,6 +546,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -441,7 +560,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -457,7 +576,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -469,6 +588,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php index 00cf00b3277..ab400df80cf 100644 --- a/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2ConsentRequestSession * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class AcceptOAuth2ConsentRequestSession implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class AcceptOAuth2ConsentRequestSession implements ModelInterface, ArrayAccess, 'idToken' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'accessToken' => true, + 'idToken' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['accessToken'] = $data['accessToken'] ?? null; - $this->container['idToken'] = $data['idToken'] ?? null; + $this->setIfExists('accessToken', $data ?? [], null); + $this->setIfExists('idToken', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -231,6 +316,16 @@ public function getAccessToken() */ public function setAccessToken($accessToken) { + if (is_null($accessToken)) { + array_push($this->openAPINullablesSetToNull, 'accessToken'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accessToken', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['accessToken'] = $accessToken; return $this; @@ -255,6 +350,16 @@ public function getIdToken() */ public function setIdToken($idToken) { + if (is_null($idToken)) { + array_push($this->openAPINullablesSetToNull, 'idToken'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('idToken', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['idToken'] = $idToken; return $this; @@ -266,7 +371,7 @@ public function setIdToken($idToken) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +383,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +397,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +413,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +425,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php b/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php index b7ce384e266..a35fb93dced 100644 --- a/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2LoginRequest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class AcceptOAuth2LoginRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -90,6 +88,30 @@ class AcceptOAuth2LoginRequest implements ModelInterface, ArrayAccess, \JsonSeri 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'acr' => false, + 'amr' => false, + 'context' => true, + 'extendSessionLifespan' => false, + 'forceSubjectIdentifier' => false, + 'identityProviderSessionId' => false, + 'remember' => false, + 'rememberFor' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -110,6 +132,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -219,15 +293,33 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['acr'] = $data['acr'] ?? null; - $this->container['amr'] = $data['amr'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['extendSessionLifespan'] = $data['extendSessionLifespan'] ?? null; - $this->container['forceSubjectIdentifier'] = $data['forceSubjectIdentifier'] ?? null; - $this->container['identityProviderSessionId'] = $data['identityProviderSessionId'] ?? null; - $this->container['remember'] = $data['remember'] ?? null; - $this->container['rememberFor'] = $data['rememberFor'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('acr', $data ?? [], null); + $this->setIfExists('amr', $data ?? [], null); + $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('extendSessionLifespan', $data ?? [], null); + $this->setIfExists('forceSubjectIdentifier', $data ?? [], null); + $this->setIfExists('identityProviderSessionId', $data ?? [], null); + $this->setIfExists('remember', $data ?? [], null); + $this->setIfExists('rememberFor', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -276,6 +368,9 @@ public function getAcr() */ public function setAcr($acr) { + if (is_null($acr)) { + throw new \InvalidArgumentException('non-nullable acr cannot be null'); + } $this->container['acr'] = $acr; return $this; @@ -300,6 +395,9 @@ public function getAmr() */ public function setAmr($amr) { + if (is_null($amr)) { + throw new \InvalidArgumentException('non-nullable amr cannot be null'); + } $this->container['amr'] = $amr; return $this; @@ -324,6 +422,16 @@ public function getContext() */ public function setContext($context) { + if (is_null($context)) { + array_push($this->openAPINullablesSetToNull, 'context'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('context', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['context'] = $context; return $this; @@ -348,6 +456,9 @@ public function getExtendSessionLifespan() */ public function setExtendSessionLifespan($extendSessionLifespan) { + if (is_null($extendSessionLifespan)) { + throw new \InvalidArgumentException('non-nullable extendSessionLifespan cannot be null'); + } $this->container['extendSessionLifespan'] = $extendSessionLifespan; return $this; @@ -372,6 +483,9 @@ public function getForceSubjectIdentifier() */ public function setForceSubjectIdentifier($forceSubjectIdentifier) { + if (is_null($forceSubjectIdentifier)) { + throw new \InvalidArgumentException('non-nullable forceSubjectIdentifier cannot be null'); + } $this->container['forceSubjectIdentifier'] = $forceSubjectIdentifier; return $this; @@ -396,6 +510,9 @@ public function getIdentityProviderSessionId() */ public function setIdentityProviderSessionId($identityProviderSessionId) { + if (is_null($identityProviderSessionId)) { + throw new \InvalidArgumentException('non-nullable identityProviderSessionId cannot be null'); + } $this->container['identityProviderSessionId'] = $identityProviderSessionId; return $this; @@ -420,6 +537,9 @@ public function getRemember() */ public function setRemember($remember) { + if (is_null($remember)) { + throw new \InvalidArgumentException('non-nullable remember cannot be null'); + } $this->container['remember'] = $remember; return $this; @@ -444,6 +564,9 @@ public function getRememberFor() */ public function setRememberFor($rememberFor) { + if (is_null($rememberFor)) { + throw new \InvalidArgumentException('non-nullable rememberFor cannot be null'); + } $this->container['rememberFor'] = $rememberFor; return $this; @@ -468,6 +591,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -479,7 +605,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -491,6 +617,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -504,7 +631,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -520,7 +647,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -532,6 +659,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php b/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php index 3f5fbb160c3..548caaa12dc 100644 --- a/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php +++ b/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php @@ -2,7 +2,7 @@ /** * CreateJsonWebKeySet * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class CreateJsonWebKeySet implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -79,6 +77,24 @@ class CreateJsonWebKeySet implements ModelInterface, ArrayAccess, \JsonSerializa 'use' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'alg' => false, + 'kid' => false, + 'use' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -99,6 +115,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -190,9 +258,27 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['alg'] = $data['alg'] ?? null; - $this->container['kid'] = $data['kid'] ?? null; - $this->container['use'] = $data['use'] ?? null; + $this->setIfExists('alg', $data ?? [], null); + $this->setIfExists('kid', $data ?? [], null); + $this->setIfExists('use', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -247,6 +333,9 @@ public function getAlg() */ public function setAlg($alg) { + if (is_null($alg)) { + throw new \InvalidArgumentException('non-nullable alg cannot be null'); + } $this->container['alg'] = $alg; return $this; @@ -271,6 +360,9 @@ public function getKid() */ public function setKid($kid) { + if (is_null($kid)) { + throw new \InvalidArgumentException('non-nullable kid cannot be null'); + } $this->container['kid'] = $kid; return $this; @@ -295,6 +387,9 @@ public function getUse() */ public function setUse($use) { + if (is_null($use)) { + throw new \InvalidArgumentException('non-nullable use cannot be null'); + } $this->container['use'] = $use; return $this; @@ -306,7 +401,7 @@ public function setUse($use) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -318,6 +413,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -331,7 +427,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,7 +443,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -359,6 +455,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/CreateVerifiableCredentialRequestBody.php b/clients/hydra/php/lib/Model/CreateVerifiableCredentialRequestBody.php index ab87e6b4e88..836ebdf30db 100644 --- a/clients/hydra/php/lib/Model/CreateVerifiableCredentialRequestBody.php +++ b/clients/hydra/php/lib/Model/CreateVerifiableCredentialRequestBody.php @@ -2,7 +2,7 @@ /** * CreateVerifiableCredentialRequestBody * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class CreateVerifiableCredentialRequestBody implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -78,6 +76,24 @@ class CreateVerifiableCredentialRequestBody implements ModelInterface, ArrayAcce 'types' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'format' => false, + 'proof' => false, + 'types' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -98,6 +114,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -189,9 +257,27 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['format'] = $data['format'] ?? null; - $this->container['proof'] = $data['proof'] ?? null; - $this->container['types'] = $data['types'] ?? null; + $this->setIfExists('format', $data ?? [], null); + $this->setIfExists('proof', $data ?? [], null); + $this->setIfExists('types', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -237,6 +323,9 @@ public function getFormat() */ public function setFormat($format) { + if (is_null($format)) { + throw new \InvalidArgumentException('non-nullable format cannot be null'); + } $this->container['format'] = $format; return $this; @@ -261,6 +350,9 @@ public function getProof() */ public function setProof($proof) { + if (is_null($proof)) { + throw new \InvalidArgumentException('non-nullable proof cannot be null'); + } $this->container['proof'] = $proof; return $this; @@ -285,6 +377,9 @@ public function getTypes() */ public function setTypes($types) { + if (is_null($types)) { + throw new \InvalidArgumentException('non-nullable types cannot be null'); + } $this->container['types'] = $types; return $this; @@ -296,7 +391,7 @@ public function setTypes($types) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -308,6 +403,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -321,7 +417,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -337,7 +433,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -349,6 +445,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/CredentialSupportedDraft00.php b/clients/hydra/php/lib/Model/CredentialSupportedDraft00.php index 2ad2bfce994..5f774dd2356 100644 --- a/clients/hydra/php/lib/Model/CredentialSupportedDraft00.php +++ b/clients/hydra/php/lib/Model/CredentialSupportedDraft00.php @@ -2,7 +2,7 @@ /** * CredentialSupportedDraft00 * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class CredentialSupportedDraft00 implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -81,6 +79,25 @@ class CredentialSupportedDraft00 implements ModelInterface, ArrayAccess, \JsonSe 'types' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'cryptographicBindingMethodsSupported' => false, + 'cryptographicSuitesSupported' => false, + 'format' => false, + 'types' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -101,6 +118,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -195,10 +264,28 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['cryptographicBindingMethodsSupported'] = $data['cryptographicBindingMethodsSupported'] ?? null; - $this->container['cryptographicSuitesSupported'] = $data['cryptographicSuitesSupported'] ?? null; - $this->container['format'] = $data['format'] ?? null; - $this->container['types'] = $data['types'] ?? null; + $this->setIfExists('cryptographicBindingMethodsSupported', $data ?? [], null); + $this->setIfExists('cryptographicSuitesSupported', $data ?? [], null); + $this->setIfExists('format', $data ?? [], null); + $this->setIfExists('types', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -244,6 +331,9 @@ public function getCryptographicBindingMethodsSupported() */ public function setCryptographicBindingMethodsSupported($cryptographicBindingMethodsSupported) { + if (is_null($cryptographicBindingMethodsSupported)) { + throw new \InvalidArgumentException('non-nullable cryptographicBindingMethodsSupported cannot be null'); + } $this->container['cryptographicBindingMethodsSupported'] = $cryptographicBindingMethodsSupported; return $this; @@ -268,6 +358,9 @@ public function getCryptographicSuitesSupported() */ public function setCryptographicSuitesSupported($cryptographicSuitesSupported) { + if (is_null($cryptographicSuitesSupported)) { + throw new \InvalidArgumentException('non-nullable cryptographicSuitesSupported cannot be null'); + } $this->container['cryptographicSuitesSupported'] = $cryptographicSuitesSupported; return $this; @@ -292,6 +385,9 @@ public function getFormat() */ public function setFormat($format) { + if (is_null($format)) { + throw new \InvalidArgumentException('non-nullable format cannot be null'); + } $this->container['format'] = $format; return $this; @@ -316,6 +412,9 @@ public function getTypes() */ public function setTypes($types) { + if (is_null($types)) { + throw new \InvalidArgumentException('non-nullable types cannot be null'); + } $this->container['types'] = $types; return $this; @@ -327,7 +426,7 @@ public function setTypes($types) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -339,6 +438,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -352,7 +452,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -368,7 +468,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -380,6 +480,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/ErrorOAuth2.php b/clients/hydra/php/lib/Model/ErrorOAuth2.php index 234ad2e08b1..44500e8ee90 100644 --- a/clients/hydra/php/lib/Model/ErrorOAuth2.php +++ b/clients/hydra/php/lib/Model/ErrorOAuth2.php @@ -2,7 +2,7 @@ /** * ErrorOAuth2 * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class ErrorOAuth2 implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -83,6 +81,26 @@ class ErrorOAuth2 implements ModelInterface, ArrayAccess, \JsonSerializable 'statusCode' => 'int64' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error' => false, + 'errorDebug' => false, + 'errorDescription' => false, + 'errorHint' => false, + 'statusCode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -103,6 +121,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -200,11 +270,29 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['error'] = $data['error'] ?? null; - $this->container['errorDebug'] = $data['errorDebug'] ?? null; - $this->container['errorDescription'] = $data['errorDescription'] ?? null; - $this->container['errorHint'] = $data['errorHint'] ?? null; - $this->container['statusCode'] = $data['statusCode'] ?? null; + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('errorDebug', $data ?? [], null); + $this->setIfExists('errorDescription', $data ?? [], null); + $this->setIfExists('errorHint', $data ?? [], null); + $this->setIfExists('statusCode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -250,6 +338,9 @@ public function getError() */ public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } $this->container['error'] = $error; return $this; @@ -274,6 +365,9 @@ public function getErrorDebug() */ public function setErrorDebug($errorDebug) { + if (is_null($errorDebug)) { + throw new \InvalidArgumentException('non-nullable errorDebug cannot be null'); + } $this->container['errorDebug'] = $errorDebug; return $this; @@ -298,6 +392,9 @@ public function getErrorDescription() */ public function setErrorDescription($errorDescription) { + if (is_null($errorDescription)) { + throw new \InvalidArgumentException('non-nullable errorDescription cannot be null'); + } $this->container['errorDescription'] = $errorDescription; return $this; @@ -322,6 +419,9 @@ public function getErrorHint() */ public function setErrorHint($errorHint) { + if (is_null($errorHint)) { + throw new \InvalidArgumentException('non-nullable errorHint cannot be null'); + } $this->container['errorHint'] = $errorHint; return $this; @@ -346,6 +446,9 @@ public function getStatusCode() */ public function setStatusCode($statusCode) { + if (is_null($statusCode)) { + throw new \InvalidArgumentException('non-nullable statusCode cannot be null'); + } $this->container['statusCode'] = $statusCode; return $this; @@ -357,7 +460,7 @@ public function setStatusCode($statusCode) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -369,6 +472,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -382,7 +486,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -398,7 +502,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -410,6 +514,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/GenericError.php b/clients/hydra/php/lib/Model/GenericError.php index 8fe605ffb41..c6123ae7761 100644 --- a/clients/hydra/php/lib/Model/GenericError.php +++ b/clients/hydra/php/lib/Model/GenericError.php @@ -2,7 +2,7 @@ /** * GenericError * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class GenericError implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -88,6 +86,29 @@ class GenericError implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'code' => false, + 'debug' => false, + 'details' => true, + 'id' => false, + 'message' => false, + 'reason' => false, + 'request' => false, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -108,6 +129,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -214,14 +287,32 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['code'] = $data['code'] ?? null; - $this->container['debug'] = $data['debug'] ?? null; - $this->container['details'] = $data['details'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['message'] = $data['message'] ?? null; - $this->container['reason'] = $data['reason'] ?? null; - $this->container['request'] = $data['request'] ?? null; - $this->container['status'] = $data['status'] ?? null; + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('debug', $data ?? [], null); + $this->setIfExists('details', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('request', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -270,6 +361,9 @@ public function getCode() */ public function setCode($code) { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } $this->container['code'] = $code; return $this; @@ -294,6 +388,9 @@ public function getDebug() */ public function setDebug($debug) { + if (is_null($debug)) { + throw new \InvalidArgumentException('non-nullable debug cannot be null'); + } $this->container['debug'] = $debug; return $this; @@ -318,6 +415,16 @@ public function getDetails() */ public function setDetails($details) { + if (is_null($details)) { + array_push($this->openAPINullablesSetToNull, 'details'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('details', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['details'] = $details; return $this; @@ -342,6 +449,9 @@ public function getId() */ public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } $this->container['id'] = $id; return $this; @@ -366,6 +476,9 @@ public function getMessage() */ public function setMessage($message) { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } $this->container['message'] = $message; return $this; @@ -390,6 +503,9 @@ public function getReason() */ public function setReason($reason) { + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); + } $this->container['reason'] = $reason; return $this; @@ -414,6 +530,9 @@ public function getRequest() */ public function setRequest($request) { + if (is_null($request)) { + throw new \InvalidArgumentException('non-nullable request cannot be null'); + } $this->container['request'] = $request; return $this; @@ -438,6 +557,9 @@ public function getStatus() */ public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } $this->container['status'] = $status; return $this; @@ -449,7 +571,7 @@ public function setStatus($status) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -461,6 +583,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -474,7 +597,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -490,7 +613,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -502,6 +625,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/InlineResponse2001.php b/clients/hydra/php/lib/Model/GetVersion200Response.php similarity index 66% rename from clients/hydra/php/lib/Model/InlineResponse2001.php rename to clients/hydra/php/lib/Model/GetVersion200Response.php index 0ee0701dade..f1c0d039e15 100644 --- a/clients/hydra/php/lib/Model/InlineResponse2001.php +++ b/clients/hydra/php/lib/Model/GetVersion200Response.php @@ -1,8 +1,8 @@ - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ -class InlineResponse2001 implements ModelInterface, ArrayAccess, \JsonSerializable +class GetVersion200Response implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -52,7 +50,7 @@ class InlineResponse2001 implements ModelInterface, ArrayAccess, \JsonSerializab * * @var string */ - protected static $openAPIModelName = 'inline_response_200_1'; + protected static $openAPIModelName = 'getVersion_200_response'; /** * Array of property to type mappings. Used for (de)serialization @@ -74,6 +72,22 @@ class InlineResponse2001 implements ModelInterface, ArrayAccess, \JsonSerializab 'version' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'version' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['version'] = $data['version'] ?? null; + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getVersion() */ public function setVersion($version) { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } $this->container['version'] = $version; return $this; @@ -236,7 +323,7 @@ public function setVersion($version) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/HealthNotReadyStatus.php b/clients/hydra/php/lib/Model/HealthNotReadyStatus.php index 4f6060ecf5c..ffbe22ba6ca 100644 --- a/clients/hydra/php/lib/Model/HealthNotReadyStatus.php +++ b/clients/hydra/php/lib/Model/HealthNotReadyStatus.php @@ -2,7 +2,7 @@ /** * HealthNotReadyStatus * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class HealthNotReadyStatus implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -74,6 +72,22 @@ class HealthNotReadyStatus implements ModelInterface, ArrayAccess, \JsonSerializ 'errors' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['errors'] = $data['errors'] ?? null; + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getErrors() */ public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } $this->container['errors'] = $errors; return $this; @@ -236,7 +323,7 @@ public function setErrors($errors) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/HealthStatus.php b/clients/hydra/php/lib/Model/HealthStatus.php index 24f6d5b86fd..8f590a0f486 100644 --- a/clients/hydra/php/lib/Model/HealthStatus.php +++ b/clients/hydra/php/lib/Model/HealthStatus.php @@ -2,7 +2,7 @@ /** * HealthStatus * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class HealthStatus implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -74,6 +72,22 @@ class HealthStatus implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getStatus() */ public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } $this->container['status'] = $status; return $this; @@ -236,7 +323,7 @@ public function setStatus($status) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php b/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php index 025fc446974..4632d459bd1 100644 --- a/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php +++ b/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php @@ -2,7 +2,7 @@ /** * IntrospectedOAuth2Token * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class IntrospectedOAuth2Token implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -101,6 +99,35 @@ class IntrospectedOAuth2Token implements ModelInterface, ArrayAccess, \JsonSeria 'username' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'active' => false, + 'aud' => false, + 'clientId' => false, + 'exp' => false, + 'ext' => false, + 'iat' => false, + 'iss' => false, + 'nbf' => false, + 'obfuscatedSubject' => false, + 'scope' => false, + 'sub' => false, + 'tokenType' => false, + 'tokenUse' => false, + 'username' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -121,6 +148,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -245,20 +324,38 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['active'] = $data['active'] ?? null; - $this->container['aud'] = $data['aud'] ?? null; - $this->container['clientId'] = $data['clientId'] ?? null; - $this->container['exp'] = $data['exp'] ?? null; - $this->container['ext'] = $data['ext'] ?? null; - $this->container['iat'] = $data['iat'] ?? null; - $this->container['iss'] = $data['iss'] ?? null; - $this->container['nbf'] = $data['nbf'] ?? null; - $this->container['obfuscatedSubject'] = $data['obfuscatedSubject'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['sub'] = $data['sub'] ?? null; - $this->container['tokenType'] = $data['tokenType'] ?? null; - $this->container['tokenUse'] = $data['tokenUse'] ?? null; - $this->container['username'] = $data['username'] ?? null; + $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('aud', $data ?? [], null); + $this->setIfExists('clientId', $data ?? [], null); + $this->setIfExists('exp', $data ?? [], null); + $this->setIfExists('ext', $data ?? [], null); + $this->setIfExists('iat', $data ?? [], null); + $this->setIfExists('iss', $data ?? [], null); + $this->setIfExists('nbf', $data ?? [], null); + $this->setIfExists('obfuscatedSubject', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('sub', $data ?? [], null); + $this->setIfExists('tokenType', $data ?? [], null); + $this->setIfExists('tokenUse', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -307,6 +404,9 @@ public function getActive() */ public function setActive($active) { + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); + } $this->container['active'] = $active; return $this; @@ -331,6 +431,9 @@ public function getAud() */ public function setAud($aud) { + if (is_null($aud)) { + throw new \InvalidArgumentException('non-nullable aud cannot be null'); + } $this->container['aud'] = $aud; return $this; @@ -355,6 +458,9 @@ public function getClientId() */ public function setClientId($clientId) { + if (is_null($clientId)) { + throw new \InvalidArgumentException('non-nullable clientId cannot be null'); + } $this->container['clientId'] = $clientId; return $this; @@ -379,6 +485,9 @@ public function getExp() */ public function setExp($exp) { + if (is_null($exp)) { + throw new \InvalidArgumentException('non-nullable exp cannot be null'); + } $this->container['exp'] = $exp; return $this; @@ -403,6 +512,9 @@ public function getExt() */ public function setExt($ext) { + if (is_null($ext)) { + throw new \InvalidArgumentException('non-nullable ext cannot be null'); + } $this->container['ext'] = $ext; return $this; @@ -427,6 +539,9 @@ public function getIat() */ public function setIat($iat) { + if (is_null($iat)) { + throw new \InvalidArgumentException('non-nullable iat cannot be null'); + } $this->container['iat'] = $iat; return $this; @@ -451,6 +566,9 @@ public function getIss() */ public function setIss($iss) { + if (is_null($iss)) { + throw new \InvalidArgumentException('non-nullable iss cannot be null'); + } $this->container['iss'] = $iss; return $this; @@ -475,6 +593,9 @@ public function getNbf() */ public function setNbf($nbf) { + if (is_null($nbf)) { + throw new \InvalidArgumentException('non-nullable nbf cannot be null'); + } $this->container['nbf'] = $nbf; return $this; @@ -499,6 +620,9 @@ public function getObfuscatedSubject() */ public function setObfuscatedSubject($obfuscatedSubject) { + if (is_null($obfuscatedSubject)) { + throw new \InvalidArgumentException('non-nullable obfuscatedSubject cannot be null'); + } $this->container['obfuscatedSubject'] = $obfuscatedSubject; return $this; @@ -523,6 +647,9 @@ public function getScope() */ public function setScope($scope) { + if (is_null($scope)) { + throw new \InvalidArgumentException('non-nullable scope cannot be null'); + } $this->container['scope'] = $scope; return $this; @@ -547,6 +674,9 @@ public function getSub() */ public function setSub($sub) { + if (is_null($sub)) { + throw new \InvalidArgumentException('non-nullable sub cannot be null'); + } $this->container['sub'] = $sub; return $this; @@ -571,6 +701,9 @@ public function getTokenType() */ public function setTokenType($tokenType) { + if (is_null($tokenType)) { + throw new \InvalidArgumentException('non-nullable tokenType cannot be null'); + } $this->container['tokenType'] = $tokenType; return $this; @@ -595,6 +728,9 @@ public function getTokenUse() */ public function setTokenUse($tokenUse) { + if (is_null($tokenUse)) { + throw new \InvalidArgumentException('non-nullable tokenUse cannot be null'); + } $this->container['tokenUse'] = $tokenUse; return $this; @@ -619,6 +755,9 @@ public function getUsername() */ public function setUsername($username) { + if (is_null($username)) { + throw new \InvalidArgumentException('non-nullable username cannot be null'); + } $this->container['username'] = $username; return $this; @@ -630,7 +769,7 @@ public function setUsername($username) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -642,6 +781,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -655,7 +795,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -671,7 +811,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -683,6 +823,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/InlineResponse200.php b/clients/hydra/php/lib/Model/IsReady200Response.php similarity index 66% rename from clients/hydra/php/lib/Model/InlineResponse200.php rename to clients/hydra/php/lib/Model/IsReady200Response.php index d867b0548d2..3b183b02adc 100644 --- a/clients/hydra/php/lib/Model/InlineResponse200.php +++ b/clients/hydra/php/lib/Model/IsReady200Response.php @@ -1,8 +1,8 @@ - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ -class InlineResponse200 implements ModelInterface, ArrayAccess, \JsonSerializable +class IsReady200Response implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -52,7 +50,7 @@ class InlineResponse200 implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openAPIModelName = 'inline_response_200'; + protected static $openAPIModelName = 'isReady_200_response'; /** * Array of property to type mappings. Used for (de)serialization @@ -74,6 +72,22 @@ class InlineResponse200 implements ModelInterface, ArrayAccess, \JsonSerializabl 'status' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getStatus() */ public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } $this->container['status'] = $status; return $this; @@ -236,7 +323,7 @@ public function setStatus($status) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/InlineResponse503.php b/clients/hydra/php/lib/Model/IsReady503Response.php similarity index 67% rename from clients/hydra/php/lib/Model/InlineResponse503.php rename to clients/hydra/php/lib/Model/IsReady503Response.php index aecf5653381..20b87ab3dc2 100644 --- a/clients/hydra/php/lib/Model/InlineResponse503.php +++ b/clients/hydra/php/lib/Model/IsReady503Response.php @@ -1,8 +1,8 @@ - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ -class InlineResponse503 implements ModelInterface, ArrayAccess, \JsonSerializable +class IsReady503Response implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -52,7 +50,7 @@ class InlineResponse503 implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openAPIModelName = 'inline_response_503'; + protected static $openAPIModelName = 'isReady_503_response'; /** * Array of property to type mappings. Used for (de)serialization @@ -74,6 +72,22 @@ class InlineResponse503 implements ModelInterface, ArrayAccess, \JsonSerializabl 'errors' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['errors'] = $data['errors'] ?? null; + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getErrors() */ public function setErrors($errors) { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } $this->container['errors'] = $errors; return $this; @@ -236,7 +323,7 @@ public function setErrors($errors) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/JsonPatch.php b/clients/hydra/php/lib/Model/JsonPatch.php index a19a496f0c6..99ed1467598 100644 --- a/clients/hydra/php/lib/Model/JsonPatch.php +++ b/clients/hydra/php/lib/Model/JsonPatch.php @@ -2,7 +2,7 @@ /** * JsonPatch * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class JsonPatch implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -81,6 +79,25 @@ class JsonPatch implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'from' => false, + 'op' => false, + 'path' => false, + 'value' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -101,6 +118,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -195,10 +264,28 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['from'] = $data['from'] ?? null; - $this->container['op'] = $data['op'] ?? null; - $this->container['path'] = $data['path'] ?? null; - $this->container['value'] = $data['value'] ?? null; + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('op', $data ?? [], null); + $this->setIfExists('path', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -250,6 +337,9 @@ public function getFrom() */ public function setFrom($from) { + if (is_null($from)) { + throw new \InvalidArgumentException('non-nullable from cannot be null'); + } $this->container['from'] = $from; return $this; @@ -274,6 +364,9 @@ public function getOp() */ public function setOp($op) { + if (is_null($op)) { + throw new \InvalidArgumentException('non-nullable op cannot be null'); + } $this->container['op'] = $op; return $this; @@ -298,6 +391,9 @@ public function getPath() */ public function setPath($path) { + if (is_null($path)) { + throw new \InvalidArgumentException('non-nullable path cannot be null'); + } $this->container['path'] = $path; return $this; @@ -322,6 +418,16 @@ public function getValue() */ public function setValue($value) { + if (is_null($value)) { + array_push($this->openAPINullablesSetToNull, 'value'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('value', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['value'] = $value; return $this; @@ -333,7 +439,7 @@ public function setValue($value) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -345,6 +451,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -358,7 +465,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -374,7 +481,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -386,6 +493,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/JsonWebKey.php b/clients/hydra/php/lib/Model/JsonWebKey.php index 87c1b0e75d0..a27754713a8 100644 --- a/clients/hydra/php/lib/Model/JsonWebKey.php +++ b/clients/hydra/php/lib/Model/JsonWebKey.php @@ -2,7 +2,7 @@ /** * JsonWebKey * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class JsonWebKey implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -106,6 +104,38 @@ class JsonWebKey implements ModelInterface, ArrayAccess, \JsonSerializable 'y' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'alg' => false, + 'crv' => false, + 'd' => false, + 'dp' => false, + 'dq' => false, + 'e' => false, + 'k' => false, + 'kid' => false, + 'kty' => false, + 'n' => false, + 'p' => false, + 'q' => false, + 'qi' => false, + 'use' => false, + 'x' => false, + 'x5c' => false, + 'y' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -126,6 +156,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -259,23 +341,41 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['alg'] = $data['alg'] ?? null; - $this->container['crv'] = $data['crv'] ?? null; - $this->container['d'] = $data['d'] ?? null; - $this->container['dp'] = $data['dp'] ?? null; - $this->container['dq'] = $data['dq'] ?? null; - $this->container['e'] = $data['e'] ?? null; - $this->container['k'] = $data['k'] ?? null; - $this->container['kid'] = $data['kid'] ?? null; - $this->container['kty'] = $data['kty'] ?? null; - $this->container['n'] = $data['n'] ?? null; - $this->container['p'] = $data['p'] ?? null; - $this->container['q'] = $data['q'] ?? null; - $this->container['qi'] = $data['qi'] ?? null; - $this->container['use'] = $data['use'] ?? null; - $this->container['x'] = $data['x'] ?? null; - $this->container['x5c'] = $data['x5c'] ?? null; - $this->container['y'] = $data['y'] ?? null; + $this->setIfExists('alg', $data ?? [], null); + $this->setIfExists('crv', $data ?? [], null); + $this->setIfExists('d', $data ?? [], null); + $this->setIfExists('dp', $data ?? [], null); + $this->setIfExists('dq', $data ?? [], null); + $this->setIfExists('e', $data ?? [], null); + $this->setIfExists('k', $data ?? [], null); + $this->setIfExists('kid', $data ?? [], null); + $this->setIfExists('kty', $data ?? [], null); + $this->setIfExists('n', $data ?? [], null); + $this->setIfExists('p', $data ?? [], null); + $this->setIfExists('q', $data ?? [], null); + $this->setIfExists('qi', $data ?? [], null); + $this->setIfExists('use', $data ?? [], null); + $this->setIfExists('x', $data ?? [], null); + $this->setIfExists('x5c', $data ?? [], null); + $this->setIfExists('y', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -333,6 +433,9 @@ public function getAlg() */ public function setAlg($alg) { + if (is_null($alg)) { + throw new \InvalidArgumentException('non-nullable alg cannot be null'); + } $this->container['alg'] = $alg; return $this; @@ -357,6 +460,9 @@ public function getCrv() */ public function setCrv($crv) { + if (is_null($crv)) { + throw new \InvalidArgumentException('non-nullable crv cannot be null'); + } $this->container['crv'] = $crv; return $this; @@ -381,6 +487,9 @@ public function getD() */ public function setD($d) { + if (is_null($d)) { + throw new \InvalidArgumentException('non-nullable d cannot be null'); + } $this->container['d'] = $d; return $this; @@ -405,6 +514,9 @@ public function getDp() */ public function setDp($dp) { + if (is_null($dp)) { + throw new \InvalidArgumentException('non-nullable dp cannot be null'); + } $this->container['dp'] = $dp; return $this; @@ -429,6 +541,9 @@ public function getDq() */ public function setDq($dq) { + if (is_null($dq)) { + throw new \InvalidArgumentException('non-nullable dq cannot be null'); + } $this->container['dq'] = $dq; return $this; @@ -453,6 +568,9 @@ public function getE() */ public function setE($e) { + if (is_null($e)) { + throw new \InvalidArgumentException('non-nullable e cannot be null'); + } $this->container['e'] = $e; return $this; @@ -477,6 +595,9 @@ public function getK() */ public function setK($k) { + if (is_null($k)) { + throw new \InvalidArgumentException('non-nullable k cannot be null'); + } $this->container['k'] = $k; return $this; @@ -501,6 +622,9 @@ public function getKid() */ public function setKid($kid) { + if (is_null($kid)) { + throw new \InvalidArgumentException('non-nullable kid cannot be null'); + } $this->container['kid'] = $kid; return $this; @@ -525,6 +649,9 @@ public function getKty() */ public function setKty($kty) { + if (is_null($kty)) { + throw new \InvalidArgumentException('non-nullable kty cannot be null'); + } $this->container['kty'] = $kty; return $this; @@ -549,6 +676,9 @@ public function getN() */ public function setN($n) { + if (is_null($n)) { + throw new \InvalidArgumentException('non-nullable n cannot be null'); + } $this->container['n'] = $n; return $this; @@ -573,6 +703,9 @@ public function getP() */ public function setP($p) { + if (is_null($p)) { + throw new \InvalidArgumentException('non-nullable p cannot be null'); + } $this->container['p'] = $p; return $this; @@ -597,6 +730,9 @@ public function getQ() */ public function setQ($q) { + if (is_null($q)) { + throw new \InvalidArgumentException('non-nullable q cannot be null'); + } $this->container['q'] = $q; return $this; @@ -621,6 +757,9 @@ public function getQi() */ public function setQi($qi) { + if (is_null($qi)) { + throw new \InvalidArgumentException('non-nullable qi cannot be null'); + } $this->container['qi'] = $qi; return $this; @@ -645,6 +784,9 @@ public function getUse() */ public function setUse($use) { + if (is_null($use)) { + throw new \InvalidArgumentException('non-nullable use cannot be null'); + } $this->container['use'] = $use; return $this; @@ -669,6 +811,9 @@ public function getX() */ public function setX($x) { + if (is_null($x)) { + throw new \InvalidArgumentException('non-nullable x cannot be null'); + } $this->container['x'] = $x; return $this; @@ -693,6 +838,9 @@ public function getX5c() */ public function setX5c($x5c) { + if (is_null($x5c)) { + throw new \InvalidArgumentException('non-nullable x5c cannot be null'); + } $this->container['x5c'] = $x5c; return $this; @@ -717,6 +865,9 @@ public function getY() */ public function setY($y) { + if (is_null($y)) { + throw new \InvalidArgumentException('non-nullable y cannot be null'); + } $this->container['y'] = $y; return $this; @@ -728,7 +879,7 @@ public function setY($y) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -740,6 +891,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -753,7 +905,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -769,7 +921,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -781,6 +933,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/JsonWebKeySet.php b/clients/hydra/php/lib/Model/JsonWebKeySet.php index a52fbc11c8d..d2ef42a73b2 100644 --- a/clients/hydra/php/lib/Model/JsonWebKeySet.php +++ b/clients/hydra/php/lib/Model/JsonWebKeySet.php @@ -2,7 +2,7 @@ /** * JsonWebKeySet * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class JsonWebKeySet implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -75,6 +73,22 @@ class JsonWebKeySet implements ModelInterface, ArrayAccess, \JsonSerializable 'keys' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'keys' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -95,6 +109,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -180,7 +246,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['keys'] = $data['keys'] ?? null; + $this->setIfExists('keys', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -226,6 +310,9 @@ public function getKeys() */ public function setKeys($keys) { + if (is_null($keys)) { + throw new \InvalidArgumentException('non-nullable keys cannot be null'); + } $this->container['keys'] = $keys; return $this; @@ -237,7 +324,7 @@ public function setKeys($keys) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -249,6 +336,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -262,7 +350,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -278,7 +366,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -290,6 +378,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/ModelInterface.php b/clients/hydra/php/lib/Model/ModelInterface.php index 0fac8f1563d..177d6ae04dd 100644 --- a/clients/hydra/php/lib/Model/ModelInterface.php +++ b/clients/hydra/php/lib/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client\Model @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -93,4 +93,20 @@ public function listInvalidProperties(); * @return bool */ public function valid(); + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool; + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool; } diff --git a/clients/hydra/php/lib/Model/OAuth2Client.php b/clients/hydra/php/lib/Model/OAuth2Client.php index ebf4a110035..6fae1f8650f 100644 --- a/clients/hydra/php/lib/Model/OAuth2Client.php +++ b/clients/hydra/php/lib/Model/OAuth2Client.php @@ -2,7 +2,7 @@ /** * OAuth2Client * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -169,6 +167,69 @@ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable 'userinfoSignedResponseAlg' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'accessTokenStrategy' => false, + 'allowedCorsOrigins' => false, + 'audience' => false, + 'authorizationCodeGrantAccessTokenLifespan' => false, + 'authorizationCodeGrantIdTokenLifespan' => false, + 'authorizationCodeGrantRefreshTokenLifespan' => false, + 'backchannelLogoutSessionRequired' => false, + 'backchannelLogoutUri' => false, + 'clientCredentialsGrantAccessTokenLifespan' => false, + 'clientId' => false, + 'clientName' => false, + 'clientSecret' => false, + 'clientSecretExpiresAt' => false, + 'clientUri' => false, + 'contacts' => false, + 'createdAt' => false, + 'frontchannelLogoutSessionRequired' => false, + 'frontchannelLogoutUri' => false, + 'grantTypes' => false, + 'implicitGrantAccessTokenLifespan' => false, + 'implicitGrantIdTokenLifespan' => false, + 'jwks' => true, + 'jwksUri' => false, + 'jwtBearerGrantAccessTokenLifespan' => false, + 'logoUri' => false, + 'metadata' => true, + 'owner' => false, + 'policyUri' => false, + 'postLogoutRedirectUris' => false, + 'redirectUris' => false, + 'refreshTokenGrantAccessTokenLifespan' => false, + 'refreshTokenGrantIdTokenLifespan' => false, + 'refreshTokenGrantRefreshTokenLifespan' => false, + 'registrationAccessToken' => false, + 'registrationClientUri' => false, + 'requestObjectSigningAlg' => false, + 'requestUris' => false, + 'responseTypes' => false, + 'scope' => false, + 'sectorIdentifierUri' => false, + 'skipConsent' => false, + 'skipLogoutConsent' => false, + 'subjectType' => false, + 'tokenEndpointAuthMethod' => false, + 'tokenEndpointAuthSigningAlg' => false, + 'tosUri' => false, + 'updatedAt' => false, + 'userinfoSignedResponseAlg' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -189,6 +250,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -415,54 +528,72 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['accessTokenStrategy'] = $data['accessTokenStrategy'] ?? null; - $this->container['allowedCorsOrigins'] = $data['allowedCorsOrigins'] ?? null; - $this->container['audience'] = $data['audience'] ?? null; - $this->container['authorizationCodeGrantAccessTokenLifespan'] = $data['authorizationCodeGrantAccessTokenLifespan'] ?? null; - $this->container['authorizationCodeGrantIdTokenLifespan'] = $data['authorizationCodeGrantIdTokenLifespan'] ?? null; - $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $data['authorizationCodeGrantRefreshTokenLifespan'] ?? null; - $this->container['backchannelLogoutSessionRequired'] = $data['backchannelLogoutSessionRequired'] ?? null; - $this->container['backchannelLogoutUri'] = $data['backchannelLogoutUri'] ?? null; - $this->container['clientCredentialsGrantAccessTokenLifespan'] = $data['clientCredentialsGrantAccessTokenLifespan'] ?? null; - $this->container['clientId'] = $data['clientId'] ?? null; - $this->container['clientName'] = $data['clientName'] ?? null; - $this->container['clientSecret'] = $data['clientSecret'] ?? null; - $this->container['clientSecretExpiresAt'] = $data['clientSecretExpiresAt'] ?? null; - $this->container['clientUri'] = $data['clientUri'] ?? null; - $this->container['contacts'] = $data['contacts'] ?? null; - $this->container['createdAt'] = $data['createdAt'] ?? null; - $this->container['frontchannelLogoutSessionRequired'] = $data['frontchannelLogoutSessionRequired'] ?? null; - $this->container['frontchannelLogoutUri'] = $data['frontchannelLogoutUri'] ?? null; - $this->container['grantTypes'] = $data['grantTypes'] ?? null; - $this->container['implicitGrantAccessTokenLifespan'] = $data['implicitGrantAccessTokenLifespan'] ?? null; - $this->container['implicitGrantIdTokenLifespan'] = $data['implicitGrantIdTokenLifespan'] ?? null; - $this->container['jwks'] = $data['jwks'] ?? null; - $this->container['jwksUri'] = $data['jwksUri'] ?? null; - $this->container['jwtBearerGrantAccessTokenLifespan'] = $data['jwtBearerGrantAccessTokenLifespan'] ?? null; - $this->container['logoUri'] = $data['logoUri'] ?? null; - $this->container['metadata'] = $data['metadata'] ?? null; - $this->container['owner'] = $data['owner'] ?? null; - $this->container['policyUri'] = $data['policyUri'] ?? null; - $this->container['postLogoutRedirectUris'] = $data['postLogoutRedirectUris'] ?? null; - $this->container['redirectUris'] = $data['redirectUris'] ?? null; - $this->container['refreshTokenGrantAccessTokenLifespan'] = $data['refreshTokenGrantAccessTokenLifespan'] ?? null; - $this->container['refreshTokenGrantIdTokenLifespan'] = $data['refreshTokenGrantIdTokenLifespan'] ?? null; - $this->container['refreshTokenGrantRefreshTokenLifespan'] = $data['refreshTokenGrantRefreshTokenLifespan'] ?? null; - $this->container['registrationAccessToken'] = $data['registrationAccessToken'] ?? null; - $this->container['registrationClientUri'] = $data['registrationClientUri'] ?? null; - $this->container['requestObjectSigningAlg'] = $data['requestObjectSigningAlg'] ?? null; - $this->container['requestUris'] = $data['requestUris'] ?? null; - $this->container['responseTypes'] = $data['responseTypes'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['sectorIdentifierUri'] = $data['sectorIdentifierUri'] ?? null; - $this->container['skipConsent'] = $data['skipConsent'] ?? null; - $this->container['skipLogoutConsent'] = $data['skipLogoutConsent'] ?? null; - $this->container['subjectType'] = $data['subjectType'] ?? null; - $this->container['tokenEndpointAuthMethod'] = $data['tokenEndpointAuthMethod'] ?? 'client_secret_basic'; - $this->container['tokenEndpointAuthSigningAlg'] = $data['tokenEndpointAuthSigningAlg'] ?? null; - $this->container['tosUri'] = $data['tosUri'] ?? null; - $this->container['updatedAt'] = $data['updatedAt'] ?? null; - $this->container['userinfoSignedResponseAlg'] = $data['userinfoSignedResponseAlg'] ?? null; + $this->setIfExists('accessTokenStrategy', $data ?? [], null); + $this->setIfExists('allowedCorsOrigins', $data ?? [], null); + $this->setIfExists('audience', $data ?? [], null); + $this->setIfExists('authorizationCodeGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('authorizationCodeGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('authorizationCodeGrantRefreshTokenLifespan', $data ?? [], null); + $this->setIfExists('backchannelLogoutSessionRequired', $data ?? [], null); + $this->setIfExists('backchannelLogoutUri', $data ?? [], null); + $this->setIfExists('clientCredentialsGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('clientId', $data ?? [], null); + $this->setIfExists('clientName', $data ?? [], null); + $this->setIfExists('clientSecret', $data ?? [], null); + $this->setIfExists('clientSecretExpiresAt', $data ?? [], null); + $this->setIfExists('clientUri', $data ?? [], null); + $this->setIfExists('contacts', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('frontchannelLogoutSessionRequired', $data ?? [], null); + $this->setIfExists('frontchannelLogoutUri', $data ?? [], null); + $this->setIfExists('grantTypes', $data ?? [], null); + $this->setIfExists('implicitGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('implicitGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('jwks', $data ?? [], null); + $this->setIfExists('jwksUri', $data ?? [], null); + $this->setIfExists('jwtBearerGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('logoUri', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('policyUri', $data ?? [], null); + $this->setIfExists('postLogoutRedirectUris', $data ?? [], null); + $this->setIfExists('redirectUris', $data ?? [], null); + $this->setIfExists('refreshTokenGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('refreshTokenGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('refreshTokenGrantRefreshTokenLifespan', $data ?? [], null); + $this->setIfExists('registrationAccessToken', $data ?? [], null); + $this->setIfExists('registrationClientUri', $data ?? [], null); + $this->setIfExists('requestObjectSigningAlg', $data ?? [], null); + $this->setIfExists('requestUris', $data ?? [], null); + $this->setIfExists('responseTypes', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('sectorIdentifierUri', $data ?? [], null); + $this->setIfExists('skipConsent', $data ?? [], null); + $this->setIfExists('skipLogoutConsent', $data ?? [], null); + $this->setIfExists('subjectType', $data ?? [], null); + $this->setIfExists('tokenEndpointAuthMethod', $data ?? [], 'client_secret_basic'); + $this->setIfExists('tokenEndpointAuthSigningAlg', $data ?? [], null); + $this->setIfExists('tosUri', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('userinfoSignedResponseAlg', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -548,6 +679,9 @@ public function getAccessTokenStrategy() */ public function setAccessTokenStrategy($accessTokenStrategy) { + if (is_null($accessTokenStrategy)) { + throw new \InvalidArgumentException('non-nullable accessTokenStrategy cannot be null'); + } $this->container['accessTokenStrategy'] = $accessTokenStrategy; return $this; @@ -572,6 +706,9 @@ public function getAllowedCorsOrigins() */ public function setAllowedCorsOrigins($allowedCorsOrigins) { + if (is_null($allowedCorsOrigins)) { + throw new \InvalidArgumentException('non-nullable allowedCorsOrigins cannot be null'); + } $this->container['allowedCorsOrigins'] = $allowedCorsOrigins; return $this; @@ -596,6 +733,9 @@ public function getAudience() */ public function setAudience($audience) { + if (is_null($audience)) { + throw new \InvalidArgumentException('non-nullable audience cannot be null'); + } $this->container['audience'] = $audience; return $this; @@ -620,9 +760,12 @@ public function getAuthorizationCodeGrantAccessTokenLifespan() */ public function setAuthorizationCodeGrantAccessTokenLifespan($authorizationCodeGrantAccessTokenLifespan) { + if (is_null($authorizationCodeGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantAccessTokenLifespan'] = $authorizationCodeGrantAccessTokenLifespan; @@ -649,9 +792,12 @@ public function getAuthorizationCodeGrantIdTokenLifespan() */ public function setAuthorizationCodeGrantIdTokenLifespan($authorizationCodeGrantIdTokenLifespan) { + if (is_null($authorizationCodeGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantIdTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantIdTokenLifespan'] = $authorizationCodeGrantIdTokenLifespan; @@ -678,9 +824,12 @@ public function getAuthorizationCodeGrantRefreshTokenLifespan() */ public function setAuthorizationCodeGrantRefreshTokenLifespan($authorizationCodeGrantRefreshTokenLifespan) { + if (is_null($authorizationCodeGrantRefreshTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantRefreshTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantRefreshTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantRefreshTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantRefreshTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantRefreshTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantRefreshTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $authorizationCodeGrantRefreshTokenLifespan; @@ -707,6 +856,9 @@ public function getBackchannelLogoutSessionRequired() */ public function setBackchannelLogoutSessionRequired($backchannelLogoutSessionRequired) { + if (is_null($backchannelLogoutSessionRequired)) { + throw new \InvalidArgumentException('non-nullable backchannelLogoutSessionRequired cannot be null'); + } $this->container['backchannelLogoutSessionRequired'] = $backchannelLogoutSessionRequired; return $this; @@ -731,6 +883,9 @@ public function getBackchannelLogoutUri() */ public function setBackchannelLogoutUri($backchannelLogoutUri) { + if (is_null($backchannelLogoutUri)) { + throw new \InvalidArgumentException('non-nullable backchannelLogoutUri cannot be null'); + } $this->container['backchannelLogoutUri'] = $backchannelLogoutUri; return $this; @@ -755,9 +910,12 @@ public function getClientCredentialsGrantAccessTokenLifespan() */ public function setClientCredentialsGrantAccessTokenLifespan($clientCredentialsGrantAccessTokenLifespan) { + if (is_null($clientCredentialsGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable clientCredentialsGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($clientCredentialsGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $clientCredentialsGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $clientCredentialsGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($clientCredentialsGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$clientCredentialsGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['clientCredentialsGrantAccessTokenLifespan'] = $clientCredentialsGrantAccessTokenLifespan; @@ -784,6 +942,9 @@ public function getClientId() */ public function setClientId($clientId) { + if (is_null($clientId)) { + throw new \InvalidArgumentException('non-nullable clientId cannot be null'); + } $this->container['clientId'] = $clientId; return $this; @@ -808,6 +969,9 @@ public function getClientName() */ public function setClientName($clientName) { + if (is_null($clientName)) { + throw new \InvalidArgumentException('non-nullable clientName cannot be null'); + } $this->container['clientName'] = $clientName; return $this; @@ -832,6 +996,9 @@ public function getClientSecret() */ public function setClientSecret($clientSecret) { + if (is_null($clientSecret)) { + throw new \InvalidArgumentException('non-nullable clientSecret cannot be null'); + } $this->container['clientSecret'] = $clientSecret; return $this; @@ -856,6 +1023,9 @@ public function getClientSecretExpiresAt() */ public function setClientSecretExpiresAt($clientSecretExpiresAt) { + if (is_null($clientSecretExpiresAt)) { + throw new \InvalidArgumentException('non-nullable clientSecretExpiresAt cannot be null'); + } $this->container['clientSecretExpiresAt'] = $clientSecretExpiresAt; return $this; @@ -880,6 +1050,9 @@ public function getClientUri() */ public function setClientUri($clientUri) { + if (is_null($clientUri)) { + throw new \InvalidArgumentException('non-nullable clientUri cannot be null'); + } $this->container['clientUri'] = $clientUri; return $this; @@ -904,6 +1077,9 @@ public function getContacts() */ public function setContacts($contacts) { + if (is_null($contacts)) { + throw new \InvalidArgumentException('non-nullable contacts cannot be null'); + } $this->container['contacts'] = $contacts; return $this; @@ -928,6 +1104,9 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } $this->container['createdAt'] = $createdAt; return $this; @@ -952,6 +1131,9 @@ public function getFrontchannelLogoutSessionRequired() */ public function setFrontchannelLogoutSessionRequired($frontchannelLogoutSessionRequired) { + if (is_null($frontchannelLogoutSessionRequired)) { + throw new \InvalidArgumentException('non-nullable frontchannelLogoutSessionRequired cannot be null'); + } $this->container['frontchannelLogoutSessionRequired'] = $frontchannelLogoutSessionRequired; return $this; @@ -976,6 +1158,9 @@ public function getFrontchannelLogoutUri() */ public function setFrontchannelLogoutUri($frontchannelLogoutUri) { + if (is_null($frontchannelLogoutUri)) { + throw new \InvalidArgumentException('non-nullable frontchannelLogoutUri cannot be null'); + } $this->container['frontchannelLogoutUri'] = $frontchannelLogoutUri; return $this; @@ -1000,6 +1185,9 @@ public function getGrantTypes() */ public function setGrantTypes($grantTypes) { + if (is_null($grantTypes)) { + throw new \InvalidArgumentException('non-nullable grantTypes cannot be null'); + } $this->container['grantTypes'] = $grantTypes; return $this; @@ -1024,9 +1212,12 @@ public function getImplicitGrantAccessTokenLifespan() */ public function setImplicitGrantAccessTokenLifespan($implicitGrantAccessTokenLifespan) { + if (is_null($implicitGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable implicitGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($implicitGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $implicitGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $implicitGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($implicitGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$implicitGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['implicitGrantAccessTokenLifespan'] = $implicitGrantAccessTokenLifespan; @@ -1053,9 +1244,12 @@ public function getImplicitGrantIdTokenLifespan() */ public function setImplicitGrantIdTokenLifespan($implicitGrantIdTokenLifespan) { + if (is_null($implicitGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable implicitGrantIdTokenLifespan cannot be null'); + } - if (!is_null($implicitGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $implicitGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $implicitGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($implicitGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$implicitGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['implicitGrantIdTokenLifespan'] = $implicitGrantIdTokenLifespan; @@ -1082,6 +1276,16 @@ public function getJwks() */ public function setJwks($jwks) { + if (is_null($jwks)) { + array_push($this->openAPINullablesSetToNull, 'jwks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('jwks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['jwks'] = $jwks; return $this; @@ -1106,6 +1310,9 @@ public function getJwksUri() */ public function setJwksUri($jwksUri) { + if (is_null($jwksUri)) { + throw new \InvalidArgumentException('non-nullable jwksUri cannot be null'); + } $this->container['jwksUri'] = $jwksUri; return $this; @@ -1130,9 +1337,12 @@ public function getJwtBearerGrantAccessTokenLifespan() */ public function setJwtBearerGrantAccessTokenLifespan($jwtBearerGrantAccessTokenLifespan) { + if (is_null($jwtBearerGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable jwtBearerGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($jwtBearerGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $jwtBearerGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $jwtBearerGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($jwtBearerGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$jwtBearerGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['jwtBearerGrantAccessTokenLifespan'] = $jwtBearerGrantAccessTokenLifespan; @@ -1159,6 +1369,9 @@ public function getLogoUri() */ public function setLogoUri($logoUri) { + if (is_null($logoUri)) { + throw new \InvalidArgumentException('non-nullable logoUri cannot be null'); + } $this->container['logoUri'] = $logoUri; return $this; @@ -1183,6 +1396,16 @@ public function getMetadata() */ public function setMetadata($metadata) { + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['metadata'] = $metadata; return $this; @@ -1207,6 +1430,9 @@ public function getOwner() */ public function setOwner($owner) { + if (is_null($owner)) { + throw new \InvalidArgumentException('non-nullable owner cannot be null'); + } $this->container['owner'] = $owner; return $this; @@ -1231,6 +1457,9 @@ public function getPolicyUri() */ public function setPolicyUri($policyUri) { + if (is_null($policyUri)) { + throw new \InvalidArgumentException('non-nullable policyUri cannot be null'); + } $this->container['policyUri'] = $policyUri; return $this; @@ -1255,6 +1484,9 @@ public function getPostLogoutRedirectUris() */ public function setPostLogoutRedirectUris($postLogoutRedirectUris) { + if (is_null($postLogoutRedirectUris)) { + throw new \InvalidArgumentException('non-nullable postLogoutRedirectUris cannot be null'); + } $this->container['postLogoutRedirectUris'] = $postLogoutRedirectUris; return $this; @@ -1279,6 +1511,9 @@ public function getRedirectUris() */ public function setRedirectUris($redirectUris) { + if (is_null($redirectUris)) { + throw new \InvalidArgumentException('non-nullable redirectUris cannot be null'); + } $this->container['redirectUris'] = $redirectUris; return $this; @@ -1303,9 +1538,12 @@ public function getRefreshTokenGrantAccessTokenLifespan() */ public function setRefreshTokenGrantAccessTokenLifespan($refreshTokenGrantAccessTokenLifespan) { + if (is_null($refreshTokenGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantAccessTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantAccessTokenLifespan'] = $refreshTokenGrantAccessTokenLifespan; @@ -1332,9 +1570,12 @@ public function getRefreshTokenGrantIdTokenLifespan() */ public function setRefreshTokenGrantIdTokenLifespan($refreshTokenGrantIdTokenLifespan) { + if (is_null($refreshTokenGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantIdTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantIdTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantIdTokenLifespan'] = $refreshTokenGrantIdTokenLifespan; @@ -1361,9 +1602,12 @@ public function getRefreshTokenGrantRefreshTokenLifespan() */ public function setRefreshTokenGrantRefreshTokenLifespan($refreshTokenGrantRefreshTokenLifespan) { + if (is_null($refreshTokenGrantRefreshTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantRefreshTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantRefreshTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantRefreshTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantRefreshTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantRefreshTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantRefreshTokenLifespan when calling OAuth2Client., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantRefreshTokenLifespan'] = $refreshTokenGrantRefreshTokenLifespan; @@ -1390,6 +1634,9 @@ public function getRegistrationAccessToken() */ public function setRegistrationAccessToken($registrationAccessToken) { + if (is_null($registrationAccessToken)) { + throw new \InvalidArgumentException('non-nullable registrationAccessToken cannot be null'); + } $this->container['registrationAccessToken'] = $registrationAccessToken; return $this; @@ -1414,6 +1661,9 @@ public function getRegistrationClientUri() */ public function setRegistrationClientUri($registrationClientUri) { + if (is_null($registrationClientUri)) { + throw new \InvalidArgumentException('non-nullable registrationClientUri cannot be null'); + } $this->container['registrationClientUri'] = $registrationClientUri; return $this; @@ -1438,6 +1688,9 @@ public function getRequestObjectSigningAlg() */ public function setRequestObjectSigningAlg($requestObjectSigningAlg) { + if (is_null($requestObjectSigningAlg)) { + throw new \InvalidArgumentException('non-nullable requestObjectSigningAlg cannot be null'); + } $this->container['requestObjectSigningAlg'] = $requestObjectSigningAlg; return $this; @@ -1462,6 +1715,9 @@ public function getRequestUris() */ public function setRequestUris($requestUris) { + if (is_null($requestUris)) { + throw new \InvalidArgumentException('non-nullable requestUris cannot be null'); + } $this->container['requestUris'] = $requestUris; return $this; @@ -1486,6 +1742,9 @@ public function getResponseTypes() */ public function setResponseTypes($responseTypes) { + if (is_null($responseTypes)) { + throw new \InvalidArgumentException('non-nullable responseTypes cannot be null'); + } $this->container['responseTypes'] = $responseTypes; return $this; @@ -1510,6 +1769,9 @@ public function getScope() */ public function setScope($scope) { + if (is_null($scope)) { + throw new \InvalidArgumentException('non-nullable scope cannot be null'); + } $this->container['scope'] = $scope; return $this; @@ -1534,6 +1796,9 @@ public function getSectorIdentifierUri() */ public function setSectorIdentifierUri($sectorIdentifierUri) { + if (is_null($sectorIdentifierUri)) { + throw new \InvalidArgumentException('non-nullable sectorIdentifierUri cannot be null'); + } $this->container['sectorIdentifierUri'] = $sectorIdentifierUri; return $this; @@ -1558,6 +1823,9 @@ public function getSkipConsent() */ public function setSkipConsent($skipConsent) { + if (is_null($skipConsent)) { + throw new \InvalidArgumentException('non-nullable skipConsent cannot be null'); + } $this->container['skipConsent'] = $skipConsent; return $this; @@ -1582,6 +1850,9 @@ public function getSkipLogoutConsent() */ public function setSkipLogoutConsent($skipLogoutConsent) { + if (is_null($skipLogoutConsent)) { + throw new \InvalidArgumentException('non-nullable skipLogoutConsent cannot be null'); + } $this->container['skipLogoutConsent'] = $skipLogoutConsent; return $this; @@ -1606,6 +1877,9 @@ public function getSubjectType() */ public function setSubjectType($subjectType) { + if (is_null($subjectType)) { + throw new \InvalidArgumentException('non-nullable subjectType cannot be null'); + } $this->container['subjectType'] = $subjectType; return $this; @@ -1630,6 +1904,9 @@ public function getTokenEndpointAuthMethod() */ public function setTokenEndpointAuthMethod($tokenEndpointAuthMethod) { + if (is_null($tokenEndpointAuthMethod)) { + throw new \InvalidArgumentException('non-nullable tokenEndpointAuthMethod cannot be null'); + } $this->container['tokenEndpointAuthMethod'] = $tokenEndpointAuthMethod; return $this; @@ -1654,6 +1931,9 @@ public function getTokenEndpointAuthSigningAlg() */ public function setTokenEndpointAuthSigningAlg($tokenEndpointAuthSigningAlg) { + if (is_null($tokenEndpointAuthSigningAlg)) { + throw new \InvalidArgumentException('non-nullable tokenEndpointAuthSigningAlg cannot be null'); + } $this->container['tokenEndpointAuthSigningAlg'] = $tokenEndpointAuthSigningAlg; return $this; @@ -1678,6 +1958,9 @@ public function getTosUri() */ public function setTosUri($tosUri) { + if (is_null($tosUri)) { + throw new \InvalidArgumentException('non-nullable tosUri cannot be null'); + } $this->container['tosUri'] = $tosUri; return $this; @@ -1702,6 +1985,9 @@ public function getUpdatedAt() */ public function setUpdatedAt($updatedAt) { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } $this->container['updatedAt'] = $updatedAt; return $this; @@ -1726,6 +2012,9 @@ public function getUserinfoSignedResponseAlg() */ public function setUserinfoSignedResponseAlg($userinfoSignedResponseAlg) { + if (is_null($userinfoSignedResponseAlg)) { + throw new \InvalidArgumentException('non-nullable userinfoSignedResponseAlg cannot be null'); + } $this->container['userinfoSignedResponseAlg'] = $userinfoSignedResponseAlg; return $this; @@ -1737,7 +2026,7 @@ public function setUserinfoSignedResponseAlg($userinfoSignedResponseAlg) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -1749,6 +2038,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -1762,7 +2052,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -1778,7 +2068,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -1790,6 +2080,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php b/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php index 0a91790fc12..23a81fb65ac 100644 --- a/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php +++ b/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php @@ -2,7 +2,7 @@ /** * OAuth2ClientTokenLifespans * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2ClientTokenLifespans implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -93,6 +91,31 @@ class OAuth2ClientTokenLifespans implements ModelInterface, ArrayAccess, \JsonSe 'refreshTokenGrantRefreshTokenLifespan' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'authorizationCodeGrantAccessTokenLifespan' => false, + 'authorizationCodeGrantIdTokenLifespan' => false, + 'authorizationCodeGrantRefreshTokenLifespan' => false, + 'clientCredentialsGrantAccessTokenLifespan' => false, + 'implicitGrantAccessTokenLifespan' => false, + 'implicitGrantIdTokenLifespan' => false, + 'jwtBearerGrantAccessTokenLifespan' => false, + 'refreshTokenGrantAccessTokenLifespan' => false, + 'refreshTokenGrantIdTokenLifespan' => false, + 'refreshTokenGrantRefreshTokenLifespan' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -113,6 +136,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -225,16 +300,34 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['authorizationCodeGrantAccessTokenLifespan'] = $data['authorizationCodeGrantAccessTokenLifespan'] ?? null; - $this->container['authorizationCodeGrantIdTokenLifespan'] = $data['authorizationCodeGrantIdTokenLifespan'] ?? null; - $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $data['authorizationCodeGrantRefreshTokenLifespan'] ?? null; - $this->container['clientCredentialsGrantAccessTokenLifespan'] = $data['clientCredentialsGrantAccessTokenLifespan'] ?? null; - $this->container['implicitGrantAccessTokenLifespan'] = $data['implicitGrantAccessTokenLifespan'] ?? null; - $this->container['implicitGrantIdTokenLifespan'] = $data['implicitGrantIdTokenLifespan'] ?? null; - $this->container['jwtBearerGrantAccessTokenLifespan'] = $data['jwtBearerGrantAccessTokenLifespan'] ?? null; - $this->container['refreshTokenGrantAccessTokenLifespan'] = $data['refreshTokenGrantAccessTokenLifespan'] ?? null; - $this->container['refreshTokenGrantIdTokenLifespan'] = $data['refreshTokenGrantIdTokenLifespan'] ?? null; - $this->container['refreshTokenGrantRefreshTokenLifespan'] = $data['refreshTokenGrantRefreshTokenLifespan'] ?? null; + $this->setIfExists('authorizationCodeGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('authorizationCodeGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('authorizationCodeGrantRefreshTokenLifespan', $data ?? [], null); + $this->setIfExists('clientCredentialsGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('implicitGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('implicitGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('jwtBearerGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('refreshTokenGrantAccessTokenLifespan', $data ?? [], null); + $this->setIfExists('refreshTokenGrantIdTokenLifespan', $data ?? [], null); + $this->setIfExists('refreshTokenGrantRefreshTokenLifespan', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -320,9 +413,12 @@ public function getAuthorizationCodeGrantAccessTokenLifespan() */ public function setAuthorizationCodeGrantAccessTokenLifespan($authorizationCodeGrantAccessTokenLifespan) { + if (is_null($authorizationCodeGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantAccessTokenLifespan'] = $authorizationCodeGrantAccessTokenLifespan; @@ -349,9 +445,12 @@ public function getAuthorizationCodeGrantIdTokenLifespan() */ public function setAuthorizationCodeGrantIdTokenLifespan($authorizationCodeGrantIdTokenLifespan) { + if (is_null($authorizationCodeGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantIdTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantIdTokenLifespan'] = $authorizationCodeGrantIdTokenLifespan; @@ -378,9 +477,12 @@ public function getAuthorizationCodeGrantRefreshTokenLifespan() */ public function setAuthorizationCodeGrantRefreshTokenLifespan($authorizationCodeGrantRefreshTokenLifespan) { + if (is_null($authorizationCodeGrantRefreshTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable authorizationCodeGrantRefreshTokenLifespan cannot be null'); + } - if (!is_null($authorizationCodeGrantRefreshTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $authorizationCodeGrantRefreshTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $authorizationCodeGrantRefreshTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($authorizationCodeGrantRefreshTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$authorizationCodeGrantRefreshTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $authorizationCodeGrantRefreshTokenLifespan; @@ -407,9 +509,12 @@ public function getClientCredentialsGrantAccessTokenLifespan() */ public function setClientCredentialsGrantAccessTokenLifespan($clientCredentialsGrantAccessTokenLifespan) { + if (is_null($clientCredentialsGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable clientCredentialsGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($clientCredentialsGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $clientCredentialsGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $clientCredentialsGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($clientCredentialsGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$clientCredentialsGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['clientCredentialsGrantAccessTokenLifespan'] = $clientCredentialsGrantAccessTokenLifespan; @@ -436,9 +541,12 @@ public function getImplicitGrantAccessTokenLifespan() */ public function setImplicitGrantAccessTokenLifespan($implicitGrantAccessTokenLifespan) { + if (is_null($implicitGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable implicitGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($implicitGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $implicitGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $implicitGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($implicitGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$implicitGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['implicitGrantAccessTokenLifespan'] = $implicitGrantAccessTokenLifespan; @@ -465,9 +573,12 @@ public function getImplicitGrantIdTokenLifespan() */ public function setImplicitGrantIdTokenLifespan($implicitGrantIdTokenLifespan) { + if (is_null($implicitGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable implicitGrantIdTokenLifespan cannot be null'); + } - if (!is_null($implicitGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $implicitGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $implicitGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($implicitGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$implicitGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['implicitGrantIdTokenLifespan'] = $implicitGrantIdTokenLifespan; @@ -494,9 +605,12 @@ public function getJwtBearerGrantAccessTokenLifespan() */ public function setJwtBearerGrantAccessTokenLifespan($jwtBearerGrantAccessTokenLifespan) { + if (is_null($jwtBearerGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable jwtBearerGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($jwtBearerGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $jwtBearerGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $jwtBearerGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($jwtBearerGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$jwtBearerGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['jwtBearerGrantAccessTokenLifespan'] = $jwtBearerGrantAccessTokenLifespan; @@ -523,9 +637,12 @@ public function getRefreshTokenGrantAccessTokenLifespan() */ public function setRefreshTokenGrantAccessTokenLifespan($refreshTokenGrantAccessTokenLifespan) { + if (is_null($refreshTokenGrantAccessTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantAccessTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantAccessTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantAccessTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantAccessTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantAccessTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantAccessTokenLifespan'] = $refreshTokenGrantAccessTokenLifespan; @@ -552,9 +669,12 @@ public function getRefreshTokenGrantIdTokenLifespan() */ public function setRefreshTokenGrantIdTokenLifespan($refreshTokenGrantIdTokenLifespan) { + if (is_null($refreshTokenGrantIdTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantIdTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantIdTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantIdTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantIdTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantIdTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantIdTokenLifespan'] = $refreshTokenGrantIdTokenLifespan; @@ -581,9 +701,12 @@ public function getRefreshTokenGrantRefreshTokenLifespan() */ public function setRefreshTokenGrantRefreshTokenLifespan($refreshTokenGrantRefreshTokenLifespan) { + if (is_null($refreshTokenGrantRefreshTokenLifespan)) { + throw new \InvalidArgumentException('non-nullable refreshTokenGrantRefreshTokenLifespan cannot be null'); + } - if (!is_null($refreshTokenGrantRefreshTokenLifespan) && (!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $refreshTokenGrantRefreshTokenLifespan))) { - throw new \InvalidArgumentException("invalid value for $refreshTokenGrantRefreshTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); + if ((!preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", ObjectSerializer::toString($refreshTokenGrantRefreshTokenLifespan)))) { + throw new \InvalidArgumentException("invalid value for \$refreshTokenGrantRefreshTokenLifespan when calling OAuth2ClientTokenLifespans., must conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."); } $this->container['refreshTokenGrantRefreshTokenLifespan'] = $refreshTokenGrantRefreshTokenLifespan; @@ -597,7 +720,7 @@ public function setRefreshTokenGrantRefreshTokenLifespan($refreshTokenGrantRefre * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -609,6 +732,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -622,7 +746,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -638,7 +762,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -650,6 +774,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php b/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php index 47464d69fdb..ec7a33b586e 100644 --- a/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentRequest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2ConsentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -98,6 +96,34 @@ class OAuth2ConsentRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'acr' => false, + 'amr' => false, + 'challenge' => false, + 'client' => false, + 'context' => true, + 'loginChallenge' => false, + 'loginSessionId' => false, + 'oidcContext' => false, + 'requestUrl' => false, + 'requestedAccessTokenAudience' => false, + 'requestedScope' => false, + 'skip' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -118,6 +144,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -239,19 +317,37 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['acr'] = $data['acr'] ?? null; - $this->container['amr'] = $data['amr'] ?? null; - $this->container['challenge'] = $data['challenge'] ?? null; - $this->container['client'] = $data['client'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['loginChallenge'] = $data['loginChallenge'] ?? null; - $this->container['loginSessionId'] = $data['loginSessionId'] ?? null; - $this->container['oidcContext'] = $data['oidcContext'] ?? null; - $this->container['requestUrl'] = $data['requestUrl'] ?? null; - $this->container['requestedAccessTokenAudience'] = $data['requestedAccessTokenAudience'] ?? null; - $this->container['requestedScope'] = $data['requestedScope'] ?? null; - $this->container['skip'] = $data['skip'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('acr', $data ?? [], null); + $this->setIfExists('amr', $data ?? [], null); + $this->setIfExists('challenge', $data ?? [], null); + $this->setIfExists('client', $data ?? [], null); + $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('loginChallenge', $data ?? [], null); + $this->setIfExists('loginSessionId', $data ?? [], null); + $this->setIfExists('oidcContext', $data ?? [], null); + $this->setIfExists('requestUrl', $data ?? [], null); + $this->setIfExists('requestedAccessTokenAudience', $data ?? [], null); + $this->setIfExists('requestedScope', $data ?? [], null); + $this->setIfExists('skip', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -300,6 +396,9 @@ public function getAcr() */ public function setAcr($acr) { + if (is_null($acr)) { + throw new \InvalidArgumentException('non-nullable acr cannot be null'); + } $this->container['acr'] = $acr; return $this; @@ -324,6 +423,9 @@ public function getAmr() */ public function setAmr($amr) { + if (is_null($amr)) { + throw new \InvalidArgumentException('non-nullable amr cannot be null'); + } $this->container['amr'] = $amr; return $this; @@ -348,6 +450,9 @@ public function getChallenge() */ public function setChallenge($challenge) { + if (is_null($challenge)) { + throw new \InvalidArgumentException('non-nullable challenge cannot be null'); + } $this->container['challenge'] = $challenge; return $this; @@ -372,6 +477,9 @@ public function getClient() */ public function setClient($client) { + if (is_null($client)) { + throw new \InvalidArgumentException('non-nullable client cannot be null'); + } $this->container['client'] = $client; return $this; @@ -396,6 +504,16 @@ public function getContext() */ public function setContext($context) { + if (is_null($context)) { + array_push($this->openAPINullablesSetToNull, 'context'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('context', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['context'] = $context; return $this; @@ -420,6 +538,9 @@ public function getLoginChallenge() */ public function setLoginChallenge($loginChallenge) { + if (is_null($loginChallenge)) { + throw new \InvalidArgumentException('non-nullable loginChallenge cannot be null'); + } $this->container['loginChallenge'] = $loginChallenge; return $this; @@ -444,6 +565,9 @@ public function getLoginSessionId() */ public function setLoginSessionId($loginSessionId) { + if (is_null($loginSessionId)) { + throw new \InvalidArgumentException('non-nullable loginSessionId cannot be null'); + } $this->container['loginSessionId'] = $loginSessionId; return $this; @@ -468,6 +592,9 @@ public function getOidcContext() */ public function setOidcContext($oidcContext) { + if (is_null($oidcContext)) { + throw new \InvalidArgumentException('non-nullable oidcContext cannot be null'); + } $this->container['oidcContext'] = $oidcContext; return $this; @@ -492,6 +619,9 @@ public function getRequestUrl() */ public function setRequestUrl($requestUrl) { + if (is_null($requestUrl)) { + throw new \InvalidArgumentException('non-nullable requestUrl cannot be null'); + } $this->container['requestUrl'] = $requestUrl; return $this; @@ -516,6 +646,9 @@ public function getRequestedAccessTokenAudience() */ public function setRequestedAccessTokenAudience($requestedAccessTokenAudience) { + if (is_null($requestedAccessTokenAudience)) { + throw new \InvalidArgumentException('non-nullable requestedAccessTokenAudience cannot be null'); + } $this->container['requestedAccessTokenAudience'] = $requestedAccessTokenAudience; return $this; @@ -540,6 +673,9 @@ public function getRequestedScope() */ public function setRequestedScope($requestedScope) { + if (is_null($requestedScope)) { + throw new \InvalidArgumentException('non-nullable requestedScope cannot be null'); + } $this->container['requestedScope'] = $requestedScope; return $this; @@ -564,6 +700,9 @@ public function getSkip() */ public function setSkip($skip) { + if (is_null($skip)) { + throw new \InvalidArgumentException('non-nullable skip cannot be null'); + } $this->container['skip'] = $skip; return $this; @@ -588,6 +727,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -599,7 +741,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -611,6 +753,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -624,7 +767,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -640,7 +783,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -652,6 +795,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php b/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php index bd8367edc3e..d36e4905d17 100644 --- a/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentRequestOpenIDConnectContext * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2ConsentRequestOpenIDConnectContext implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -82,6 +80,26 @@ class OAuth2ConsentRequestOpenIDConnectContext implements ModelInterface, ArrayA 'uiLocales' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'acrValues' => false, + 'display' => false, + 'idTokenHintClaims' => false, + 'loginHint' => false, + 'uiLocales' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -102,6 +120,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -199,11 +269,29 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['acrValues'] = $data['acrValues'] ?? null; - $this->container['display'] = $data['display'] ?? null; - $this->container['idTokenHintClaims'] = $data['idTokenHintClaims'] ?? null; - $this->container['loginHint'] = $data['loginHint'] ?? null; - $this->container['uiLocales'] = $data['uiLocales'] ?? null; + $this->setIfExists('acrValues', $data ?? [], null); + $this->setIfExists('display', $data ?? [], null); + $this->setIfExists('idTokenHintClaims', $data ?? [], null); + $this->setIfExists('loginHint', $data ?? [], null); + $this->setIfExists('uiLocales', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -249,6 +337,9 @@ public function getAcrValues() */ public function setAcrValues($acrValues) { + if (is_null($acrValues)) { + throw new \InvalidArgumentException('non-nullable acrValues cannot be null'); + } $this->container['acrValues'] = $acrValues; return $this; @@ -273,6 +364,9 @@ public function getDisplay() */ public function setDisplay($display) { + if (is_null($display)) { + throw new \InvalidArgumentException('non-nullable display cannot be null'); + } $this->container['display'] = $display; return $this; @@ -297,6 +391,9 @@ public function getIdTokenHintClaims() */ public function setIdTokenHintClaims($idTokenHintClaims) { + if (is_null($idTokenHintClaims)) { + throw new \InvalidArgumentException('non-nullable idTokenHintClaims cannot be null'); + } $this->container['idTokenHintClaims'] = $idTokenHintClaims; return $this; @@ -321,6 +418,9 @@ public function getLoginHint() */ public function setLoginHint($loginHint) { + if (is_null($loginHint)) { + throw new \InvalidArgumentException('non-nullable loginHint cannot be null'); + } $this->container['loginHint'] = $loginHint; return $this; @@ -345,6 +445,9 @@ public function getUiLocales() */ public function setUiLocales($uiLocales) { + if (is_null($uiLocales)) { + throw new \InvalidArgumentException('non-nullable uiLocales cannot be null'); + } $this->container['uiLocales'] = $uiLocales; return $this; @@ -356,7 +459,7 @@ public function setUiLocales($uiLocales) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -368,6 +471,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -381,7 +485,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -397,7 +501,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -409,6 +513,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2ConsentSession.php b/clients/hydra/php/lib/Model/OAuth2ConsentSession.php index 3d692e83093..5bc8f14fc59 100644 --- a/clients/hydra/php/lib/Model/OAuth2ConsentSession.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentSession.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentSession * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2ConsentSession implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -91,6 +89,30 @@ class OAuth2ConsentSession implements ModelInterface, ArrayAccess, \JsonSerializ 'session' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'consentRequest' => false, + 'context' => true, + 'expiresAt' => false, + 'grantAccessTokenAudience' => false, + 'grantScope' => false, + 'handledAt' => false, + 'remember' => false, + 'rememberFor' => false, + 'session' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -111,6 +133,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -220,15 +294,33 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['consentRequest'] = $data['consentRequest'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['expiresAt'] = $data['expiresAt'] ?? null; - $this->container['grantAccessTokenAudience'] = $data['grantAccessTokenAudience'] ?? null; - $this->container['grantScope'] = $data['grantScope'] ?? null; - $this->container['handledAt'] = $data['handledAt'] ?? null; - $this->container['remember'] = $data['remember'] ?? null; - $this->container['rememberFor'] = $data['rememberFor'] ?? null; - $this->container['session'] = $data['session'] ?? null; + $this->setIfExists('consentRequest', $data ?? [], null); + $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('expiresAt', $data ?? [], null); + $this->setIfExists('grantAccessTokenAudience', $data ?? [], null); + $this->setIfExists('grantScope', $data ?? [], null); + $this->setIfExists('handledAt', $data ?? [], null); + $this->setIfExists('remember', $data ?? [], null); + $this->setIfExists('rememberFor', $data ?? [], null); + $this->setIfExists('session', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -274,6 +366,9 @@ public function getConsentRequest() */ public function setConsentRequest($consentRequest) { + if (is_null($consentRequest)) { + throw new \InvalidArgumentException('non-nullable consentRequest cannot be null'); + } $this->container['consentRequest'] = $consentRequest; return $this; @@ -298,6 +393,16 @@ public function getContext() */ public function setContext($context) { + if (is_null($context)) { + array_push($this->openAPINullablesSetToNull, 'context'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('context', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } $this->container['context'] = $context; return $this; @@ -322,6 +427,9 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { + if (is_null($expiresAt)) { + throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); + } $this->container['expiresAt'] = $expiresAt; return $this; @@ -346,6 +454,9 @@ public function getGrantAccessTokenAudience() */ public function setGrantAccessTokenAudience($grantAccessTokenAudience) { + if (is_null($grantAccessTokenAudience)) { + throw new \InvalidArgumentException('non-nullable grantAccessTokenAudience cannot be null'); + } $this->container['grantAccessTokenAudience'] = $grantAccessTokenAudience; return $this; @@ -370,6 +481,9 @@ public function getGrantScope() */ public function setGrantScope($grantScope) { + if (is_null($grantScope)) { + throw new \InvalidArgumentException('non-nullable grantScope cannot be null'); + } $this->container['grantScope'] = $grantScope; return $this; @@ -394,6 +508,9 @@ public function getHandledAt() */ public function setHandledAt($handledAt) { + if (is_null($handledAt)) { + throw new \InvalidArgumentException('non-nullable handledAt cannot be null'); + } $this->container['handledAt'] = $handledAt; return $this; @@ -418,6 +535,9 @@ public function getRemember() */ public function setRemember($remember) { + if (is_null($remember)) { + throw new \InvalidArgumentException('non-nullable remember cannot be null'); + } $this->container['remember'] = $remember; return $this; @@ -442,6 +562,9 @@ public function getRememberFor() */ public function setRememberFor($rememberFor) { + if (is_null($rememberFor)) { + throw new \InvalidArgumentException('non-nullable rememberFor cannot be null'); + } $this->container['rememberFor'] = $rememberFor; return $this; @@ -466,6 +589,9 @@ public function getSession() */ public function setSession($session) { + if (is_null($session)) { + throw new \InvalidArgumentException('non-nullable session cannot be null'); + } $this->container['session'] = $session; return $this; @@ -477,7 +603,7 @@ public function setSession($session) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -489,6 +615,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -502,7 +629,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -518,7 +645,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -530,6 +657,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php b/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php index 89b6afb67ea..a29acaa9a92 100644 --- a/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentSessionExpiresAt * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2ConsentSessionExpiresAt implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -82,6 +80,26 @@ class OAuth2ConsentSessionExpiresAt implements ModelInterface, ArrayAccess, \Jso 'refreshToken' => 'date-time' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'accessToken' => false, + 'authorizeCode' => false, + 'idToken' => false, + 'parContext' => false, + 'refreshToken' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -102,6 +120,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -199,11 +269,29 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['accessToken'] = $data['accessToken'] ?? null; - $this->container['authorizeCode'] = $data['authorizeCode'] ?? null; - $this->container['idToken'] = $data['idToken'] ?? null; - $this->container['parContext'] = $data['parContext'] ?? null; - $this->container['refreshToken'] = $data['refreshToken'] ?? null; + $this->setIfExists('accessToken', $data ?? [], null); + $this->setIfExists('authorizeCode', $data ?? [], null); + $this->setIfExists('idToken', $data ?? [], null); + $this->setIfExists('parContext', $data ?? [], null); + $this->setIfExists('refreshToken', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -249,6 +337,9 @@ public function getAccessToken() */ public function setAccessToken($accessToken) { + if (is_null($accessToken)) { + throw new \InvalidArgumentException('non-nullable accessToken cannot be null'); + } $this->container['accessToken'] = $accessToken; return $this; @@ -273,6 +364,9 @@ public function getAuthorizeCode() */ public function setAuthorizeCode($authorizeCode) { + if (is_null($authorizeCode)) { + throw new \InvalidArgumentException('non-nullable authorizeCode cannot be null'); + } $this->container['authorizeCode'] = $authorizeCode; return $this; @@ -297,6 +391,9 @@ public function getIdToken() */ public function setIdToken($idToken) { + if (is_null($idToken)) { + throw new \InvalidArgumentException('non-nullable idToken cannot be null'); + } $this->container['idToken'] = $idToken; return $this; @@ -321,6 +418,9 @@ public function getParContext() */ public function setParContext($parContext) { + if (is_null($parContext)) { + throw new \InvalidArgumentException('non-nullable parContext cannot be null'); + } $this->container['parContext'] = $parContext; return $this; @@ -345,6 +445,9 @@ public function getRefreshToken() */ public function setRefreshToken($refreshToken) { + if (is_null($refreshToken)) { + throw new \InvalidArgumentException('non-nullable refreshToken cannot be null'); + } $this->container['refreshToken'] = $refreshToken; return $this; @@ -356,7 +459,7 @@ public function setRefreshToken($refreshToken) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -368,6 +471,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -381,7 +485,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -397,7 +501,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -409,6 +513,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2LoginRequest.php b/clients/hydra/php/lib/Model/OAuth2LoginRequest.php index 3cebde64a26..63edc0a2cf4 100644 --- a/clients/hydra/php/lib/Model/OAuth2LoginRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2LoginRequest.php @@ -2,7 +2,7 @@ /** * OAuth2LoginRequest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2LoginRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -90,6 +88,30 @@ class OAuth2LoginRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'challenge' => false, + 'client' => false, + 'oidcContext' => false, + 'requestUrl' => false, + 'requestedAccessTokenAudience' => false, + 'requestedScope' => false, + 'sessionId' => false, + 'skip' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -110,6 +132,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -219,15 +293,33 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['challenge'] = $data['challenge'] ?? null; - $this->container['client'] = $data['client'] ?? null; - $this->container['oidcContext'] = $data['oidcContext'] ?? null; - $this->container['requestUrl'] = $data['requestUrl'] ?? null; - $this->container['requestedAccessTokenAudience'] = $data['requestedAccessTokenAudience'] ?? null; - $this->container['requestedScope'] = $data['requestedScope'] ?? null; - $this->container['sessionId'] = $data['sessionId'] ?? null; - $this->container['skip'] = $data['skip'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('challenge', $data ?? [], null); + $this->setIfExists('client', $data ?? [], null); + $this->setIfExists('oidcContext', $data ?? [], null); + $this->setIfExists('requestUrl', $data ?? [], null); + $this->setIfExists('requestedAccessTokenAudience', $data ?? [], null); + $this->setIfExists('requestedScope', $data ?? [], null); + $this->setIfExists('sessionId', $data ?? [], null); + $this->setIfExists('skip', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -288,6 +380,9 @@ public function getChallenge() */ public function setChallenge($challenge) { + if (is_null($challenge)) { + throw new \InvalidArgumentException('non-nullable challenge cannot be null'); + } $this->container['challenge'] = $challenge; return $this; @@ -312,6 +407,9 @@ public function getClient() */ public function setClient($client) { + if (is_null($client)) { + throw new \InvalidArgumentException('non-nullable client cannot be null'); + } $this->container['client'] = $client; return $this; @@ -336,6 +434,9 @@ public function getOidcContext() */ public function setOidcContext($oidcContext) { + if (is_null($oidcContext)) { + throw new \InvalidArgumentException('non-nullable oidcContext cannot be null'); + } $this->container['oidcContext'] = $oidcContext; return $this; @@ -360,6 +461,9 @@ public function getRequestUrl() */ public function setRequestUrl($requestUrl) { + if (is_null($requestUrl)) { + throw new \InvalidArgumentException('non-nullable requestUrl cannot be null'); + } $this->container['requestUrl'] = $requestUrl; return $this; @@ -384,6 +488,9 @@ public function getRequestedAccessTokenAudience() */ public function setRequestedAccessTokenAudience($requestedAccessTokenAudience) { + if (is_null($requestedAccessTokenAudience)) { + throw new \InvalidArgumentException('non-nullable requestedAccessTokenAudience cannot be null'); + } $this->container['requestedAccessTokenAudience'] = $requestedAccessTokenAudience; return $this; @@ -408,6 +515,9 @@ public function getRequestedScope() */ public function setRequestedScope($requestedScope) { + if (is_null($requestedScope)) { + throw new \InvalidArgumentException('non-nullable requestedScope cannot be null'); + } $this->container['requestedScope'] = $requestedScope; return $this; @@ -432,6 +542,9 @@ public function getSessionId() */ public function setSessionId($sessionId) { + if (is_null($sessionId)) { + throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); + } $this->container['sessionId'] = $sessionId; return $this; @@ -456,6 +569,9 @@ public function getSkip() */ public function setSkip($skip) { + if (is_null($skip)) { + throw new \InvalidArgumentException('non-nullable skip cannot be null'); + } $this->container['skip'] = $skip; return $this; @@ -480,6 +596,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -491,7 +610,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -503,6 +622,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -516,7 +636,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -532,7 +652,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -544,6 +664,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php b/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php index af84b1a2448..2763fe1d248 100644 --- a/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php @@ -2,7 +2,7 @@ /** * OAuth2LogoutRequest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2LogoutRequest implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -84,6 +82,27 @@ class OAuth2LogoutRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'challenge' => false, + 'client' => false, + 'requestUrl' => false, + 'rpInitiated' => false, + 'sid' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -104,6 +123,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -204,12 +275,30 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['challenge'] = $data['challenge'] ?? null; - $this->container['client'] = $data['client'] ?? null; - $this->container['requestUrl'] = $data['requestUrl'] ?? null; - $this->container['rpInitiated'] = $data['rpInitiated'] ?? null; - $this->container['sid'] = $data['sid'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('challenge', $data ?? [], null); + $this->setIfExists('client', $data ?? [], null); + $this->setIfExists('requestUrl', $data ?? [], null); + $this->setIfExists('rpInitiated', $data ?? [], null); + $this->setIfExists('sid', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -255,6 +344,9 @@ public function getChallenge() */ public function setChallenge($challenge) { + if (is_null($challenge)) { + throw new \InvalidArgumentException('non-nullable challenge cannot be null'); + } $this->container['challenge'] = $challenge; return $this; @@ -279,6 +371,9 @@ public function getClient() */ public function setClient($client) { + if (is_null($client)) { + throw new \InvalidArgumentException('non-nullable client cannot be null'); + } $this->container['client'] = $client; return $this; @@ -303,6 +398,9 @@ public function getRequestUrl() */ public function setRequestUrl($requestUrl) { + if (is_null($requestUrl)) { + throw new \InvalidArgumentException('non-nullable requestUrl cannot be null'); + } $this->container['requestUrl'] = $requestUrl; return $this; @@ -327,6 +425,9 @@ public function getRpInitiated() */ public function setRpInitiated($rpInitiated) { + if (is_null($rpInitiated)) { + throw new \InvalidArgumentException('non-nullable rpInitiated cannot be null'); + } $this->container['rpInitiated'] = $rpInitiated; return $this; @@ -351,6 +452,9 @@ public function getSid() */ public function setSid($sid) { + if (is_null($sid)) { + throw new \InvalidArgumentException('non-nullable sid cannot be null'); + } $this->container['sid'] = $sid; return $this; @@ -375,6 +479,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -386,7 +493,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -398,6 +505,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -411,7 +519,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -427,7 +535,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -439,6 +547,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2RedirectTo.php b/clients/hydra/php/lib/Model/OAuth2RedirectTo.php index d27790a9387..d2d68a524d2 100644 --- a/clients/hydra/php/lib/Model/OAuth2RedirectTo.php +++ b/clients/hydra/php/lib/Model/OAuth2RedirectTo.php @@ -2,7 +2,7 @@ /** * OAuth2RedirectTo * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2RedirectTo implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -75,6 +73,22 @@ class OAuth2RedirectTo implements ModelInterface, ArrayAccess, \JsonSerializable 'redirectTo' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'redirectTo' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -95,6 +109,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -180,7 +246,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['redirectTo'] = $data['redirectTo'] ?? null; + $this->setIfExists('redirectTo', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -229,6 +313,9 @@ public function getRedirectTo() */ public function setRedirectTo($redirectTo) { + if (is_null($redirectTo)) { + throw new \InvalidArgumentException('non-nullable redirectTo cannot be null'); + } $this->container['redirectTo'] = $redirectTo; return $this; @@ -240,7 +327,7 @@ public function setRedirectTo($redirectTo) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,6 +339,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -265,7 +353,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -281,7 +369,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -293,6 +381,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OAuth2TokenExchange.php b/clients/hydra/php/lib/Model/OAuth2TokenExchange.php index 00869b235a9..786bbf8d827 100644 --- a/clients/hydra/php/lib/Model/OAuth2TokenExchange.php +++ b/clients/hydra/php/lib/Model/OAuth2TokenExchange.php @@ -2,7 +2,7 @@ /** * OAuth2TokenExchange * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OAuth2TokenExchange implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -85,6 +83,27 @@ class OAuth2TokenExchange implements ModelInterface, ArrayAccess, \JsonSerializa 'tokenType' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'accessToken' => false, + 'expiresIn' => false, + 'idToken' => false, + 'refreshToken' => false, + 'scope' => false, + 'tokenType' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -105,6 +124,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -205,12 +276,30 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['accessToken'] = $data['accessToken'] ?? null; - $this->container['expiresIn'] = $data['expiresIn'] ?? null; - $this->container['idToken'] = $data['idToken'] ?? null; - $this->container['refreshToken'] = $data['refreshToken'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['tokenType'] = $data['tokenType'] ?? null; + $this->setIfExists('accessToken', $data ?? [], null); + $this->setIfExists('expiresIn', $data ?? [], null); + $this->setIfExists('idToken', $data ?? [], null); + $this->setIfExists('refreshToken', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('tokenType', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -256,6 +345,9 @@ public function getAccessToken() */ public function setAccessToken($accessToken) { + if (is_null($accessToken)) { + throw new \InvalidArgumentException('non-nullable accessToken cannot be null'); + } $this->container['accessToken'] = $accessToken; return $this; @@ -280,6 +372,9 @@ public function getExpiresIn() */ public function setExpiresIn($expiresIn) { + if (is_null($expiresIn)) { + throw new \InvalidArgumentException('non-nullable expiresIn cannot be null'); + } $this->container['expiresIn'] = $expiresIn; return $this; @@ -304,6 +399,9 @@ public function getIdToken() */ public function setIdToken($idToken) { + if (is_null($idToken)) { + throw new \InvalidArgumentException('non-nullable idToken cannot be null'); + } $this->container['idToken'] = $idToken; return $this; @@ -328,6 +426,9 @@ public function getRefreshToken() */ public function setRefreshToken($refreshToken) { + if (is_null($refreshToken)) { + throw new \InvalidArgumentException('non-nullable refreshToken cannot be null'); + } $this->container['refreshToken'] = $refreshToken; return $this; @@ -352,6 +453,9 @@ public function getScope() */ public function setScope($scope) { + if (is_null($scope)) { + throw new \InvalidArgumentException('non-nullable scope cannot be null'); + } $this->container['scope'] = $scope; return $this; @@ -376,6 +480,9 @@ public function getTokenType() */ public function setTokenType($tokenType) { + if (is_null($tokenType)) { + throw new \InvalidArgumentException('non-nullable tokenType cannot be null'); + } $this->container['tokenType'] = $tokenType; return $this; @@ -387,7 +494,7 @@ public function setTokenType($tokenType) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -399,6 +506,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -412,7 +520,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -428,7 +536,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -440,6 +548,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OidcConfiguration.php b/clients/hydra/php/lib/Model/OidcConfiguration.php index 6885b814b5e..7c7b31a9942 100644 --- a/clients/hydra/php/lib/Model/OidcConfiguration.php +++ b/clients/hydra/php/lib/Model/OidcConfiguration.php @@ -2,7 +2,7 @@ /** * OidcConfiguration * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OidcConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -135,6 +133,52 @@ class OidcConfiguration implements ModelInterface, ArrayAccess, \JsonSerializabl 'userinfoSigningAlgValuesSupported' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'authorizationEndpoint' => false, + 'backchannelLogoutSessionSupported' => false, + 'backchannelLogoutSupported' => false, + 'claimsParameterSupported' => false, + 'claimsSupported' => false, + 'codeChallengeMethodsSupported' => false, + 'credentialsEndpointDraft00' => false, + 'credentialsSupportedDraft00' => false, + 'endSessionEndpoint' => false, + 'frontchannelLogoutSessionSupported' => false, + 'frontchannelLogoutSupported' => false, + 'grantTypesSupported' => false, + 'idTokenSignedResponseAlg' => false, + 'idTokenSigningAlgValuesSupported' => false, + 'issuer' => false, + 'jwksUri' => false, + 'registrationEndpoint' => false, + 'requestObjectSigningAlgValuesSupported' => false, + 'requestParameterSupported' => false, + 'requestUriParameterSupported' => false, + 'requireRequestUriRegistration' => false, + 'responseModesSupported' => false, + 'responseTypesSupported' => false, + 'revocationEndpoint' => false, + 'scopesSupported' => false, + 'subjectTypesSupported' => false, + 'tokenEndpoint' => false, + 'tokenEndpointAuthMethodsSupported' => false, + 'userinfoEndpoint' => false, + 'userinfoSignedResponseAlg' => false, + 'userinfoSigningAlgValuesSupported' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -155,6 +199,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -330,37 +426,55 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['authorizationEndpoint'] = $data['authorizationEndpoint'] ?? null; - $this->container['backchannelLogoutSessionSupported'] = $data['backchannelLogoutSessionSupported'] ?? null; - $this->container['backchannelLogoutSupported'] = $data['backchannelLogoutSupported'] ?? null; - $this->container['claimsParameterSupported'] = $data['claimsParameterSupported'] ?? null; - $this->container['claimsSupported'] = $data['claimsSupported'] ?? null; - $this->container['codeChallengeMethodsSupported'] = $data['codeChallengeMethodsSupported'] ?? null; - $this->container['credentialsEndpointDraft00'] = $data['credentialsEndpointDraft00'] ?? null; - $this->container['credentialsSupportedDraft00'] = $data['credentialsSupportedDraft00'] ?? null; - $this->container['endSessionEndpoint'] = $data['endSessionEndpoint'] ?? null; - $this->container['frontchannelLogoutSessionSupported'] = $data['frontchannelLogoutSessionSupported'] ?? null; - $this->container['frontchannelLogoutSupported'] = $data['frontchannelLogoutSupported'] ?? null; - $this->container['grantTypesSupported'] = $data['grantTypesSupported'] ?? null; - $this->container['idTokenSignedResponseAlg'] = $data['idTokenSignedResponseAlg'] ?? null; - $this->container['idTokenSigningAlgValuesSupported'] = $data['idTokenSigningAlgValuesSupported'] ?? null; - $this->container['issuer'] = $data['issuer'] ?? null; - $this->container['jwksUri'] = $data['jwksUri'] ?? null; - $this->container['registrationEndpoint'] = $data['registrationEndpoint'] ?? null; - $this->container['requestObjectSigningAlgValuesSupported'] = $data['requestObjectSigningAlgValuesSupported'] ?? null; - $this->container['requestParameterSupported'] = $data['requestParameterSupported'] ?? null; - $this->container['requestUriParameterSupported'] = $data['requestUriParameterSupported'] ?? null; - $this->container['requireRequestUriRegistration'] = $data['requireRequestUriRegistration'] ?? null; - $this->container['responseModesSupported'] = $data['responseModesSupported'] ?? null; - $this->container['responseTypesSupported'] = $data['responseTypesSupported'] ?? null; - $this->container['revocationEndpoint'] = $data['revocationEndpoint'] ?? null; - $this->container['scopesSupported'] = $data['scopesSupported'] ?? null; - $this->container['subjectTypesSupported'] = $data['subjectTypesSupported'] ?? null; - $this->container['tokenEndpoint'] = $data['tokenEndpoint'] ?? null; - $this->container['tokenEndpointAuthMethodsSupported'] = $data['tokenEndpointAuthMethodsSupported'] ?? null; - $this->container['userinfoEndpoint'] = $data['userinfoEndpoint'] ?? null; - $this->container['userinfoSignedResponseAlg'] = $data['userinfoSignedResponseAlg'] ?? null; - $this->container['userinfoSigningAlgValuesSupported'] = $data['userinfoSigningAlgValuesSupported'] ?? null; + $this->setIfExists('authorizationEndpoint', $data ?? [], null); + $this->setIfExists('backchannelLogoutSessionSupported', $data ?? [], null); + $this->setIfExists('backchannelLogoutSupported', $data ?? [], null); + $this->setIfExists('claimsParameterSupported', $data ?? [], null); + $this->setIfExists('claimsSupported', $data ?? [], null); + $this->setIfExists('codeChallengeMethodsSupported', $data ?? [], null); + $this->setIfExists('credentialsEndpointDraft00', $data ?? [], null); + $this->setIfExists('credentialsSupportedDraft00', $data ?? [], null); + $this->setIfExists('endSessionEndpoint', $data ?? [], null); + $this->setIfExists('frontchannelLogoutSessionSupported', $data ?? [], null); + $this->setIfExists('frontchannelLogoutSupported', $data ?? [], null); + $this->setIfExists('grantTypesSupported', $data ?? [], null); + $this->setIfExists('idTokenSignedResponseAlg', $data ?? [], null); + $this->setIfExists('idTokenSigningAlgValuesSupported', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('jwksUri', $data ?? [], null); + $this->setIfExists('registrationEndpoint', $data ?? [], null); + $this->setIfExists('requestObjectSigningAlgValuesSupported', $data ?? [], null); + $this->setIfExists('requestParameterSupported', $data ?? [], null); + $this->setIfExists('requestUriParameterSupported', $data ?? [], null); + $this->setIfExists('requireRequestUriRegistration', $data ?? [], null); + $this->setIfExists('responseModesSupported', $data ?? [], null); + $this->setIfExists('responseTypesSupported', $data ?? [], null); + $this->setIfExists('revocationEndpoint', $data ?? [], null); + $this->setIfExists('scopesSupported', $data ?? [], null); + $this->setIfExists('subjectTypesSupported', $data ?? [], null); + $this->setIfExists('tokenEndpoint', $data ?? [], null); + $this->setIfExists('tokenEndpointAuthMethodsSupported', $data ?? [], null); + $this->setIfExists('userinfoEndpoint', $data ?? [], null); + $this->setIfExists('userinfoSignedResponseAlg', $data ?? [], null); + $this->setIfExists('userinfoSigningAlgValuesSupported', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -433,6 +547,9 @@ public function getAuthorizationEndpoint() */ public function setAuthorizationEndpoint($authorizationEndpoint) { + if (is_null($authorizationEndpoint)) { + throw new \InvalidArgumentException('non-nullable authorizationEndpoint cannot be null'); + } $this->container['authorizationEndpoint'] = $authorizationEndpoint; return $this; @@ -457,6 +574,9 @@ public function getBackchannelLogoutSessionSupported() */ public function setBackchannelLogoutSessionSupported($backchannelLogoutSessionSupported) { + if (is_null($backchannelLogoutSessionSupported)) { + throw new \InvalidArgumentException('non-nullable backchannelLogoutSessionSupported cannot be null'); + } $this->container['backchannelLogoutSessionSupported'] = $backchannelLogoutSessionSupported; return $this; @@ -481,6 +601,9 @@ public function getBackchannelLogoutSupported() */ public function setBackchannelLogoutSupported($backchannelLogoutSupported) { + if (is_null($backchannelLogoutSupported)) { + throw new \InvalidArgumentException('non-nullable backchannelLogoutSupported cannot be null'); + } $this->container['backchannelLogoutSupported'] = $backchannelLogoutSupported; return $this; @@ -505,6 +628,9 @@ public function getClaimsParameterSupported() */ public function setClaimsParameterSupported($claimsParameterSupported) { + if (is_null($claimsParameterSupported)) { + throw new \InvalidArgumentException('non-nullable claimsParameterSupported cannot be null'); + } $this->container['claimsParameterSupported'] = $claimsParameterSupported; return $this; @@ -529,6 +655,9 @@ public function getClaimsSupported() */ public function setClaimsSupported($claimsSupported) { + if (is_null($claimsSupported)) { + throw new \InvalidArgumentException('non-nullable claimsSupported cannot be null'); + } $this->container['claimsSupported'] = $claimsSupported; return $this; @@ -553,6 +682,9 @@ public function getCodeChallengeMethodsSupported() */ public function setCodeChallengeMethodsSupported($codeChallengeMethodsSupported) { + if (is_null($codeChallengeMethodsSupported)) { + throw new \InvalidArgumentException('non-nullable codeChallengeMethodsSupported cannot be null'); + } $this->container['codeChallengeMethodsSupported'] = $codeChallengeMethodsSupported; return $this; @@ -577,6 +709,9 @@ public function getCredentialsEndpointDraft00() */ public function setCredentialsEndpointDraft00($credentialsEndpointDraft00) { + if (is_null($credentialsEndpointDraft00)) { + throw new \InvalidArgumentException('non-nullable credentialsEndpointDraft00 cannot be null'); + } $this->container['credentialsEndpointDraft00'] = $credentialsEndpointDraft00; return $this; @@ -601,6 +736,9 @@ public function getCredentialsSupportedDraft00() */ public function setCredentialsSupportedDraft00($credentialsSupportedDraft00) { + if (is_null($credentialsSupportedDraft00)) { + throw new \InvalidArgumentException('non-nullable credentialsSupportedDraft00 cannot be null'); + } $this->container['credentialsSupportedDraft00'] = $credentialsSupportedDraft00; return $this; @@ -625,6 +763,9 @@ public function getEndSessionEndpoint() */ public function setEndSessionEndpoint($endSessionEndpoint) { + if (is_null($endSessionEndpoint)) { + throw new \InvalidArgumentException('non-nullable endSessionEndpoint cannot be null'); + } $this->container['endSessionEndpoint'] = $endSessionEndpoint; return $this; @@ -649,6 +790,9 @@ public function getFrontchannelLogoutSessionSupported() */ public function setFrontchannelLogoutSessionSupported($frontchannelLogoutSessionSupported) { + if (is_null($frontchannelLogoutSessionSupported)) { + throw new \InvalidArgumentException('non-nullable frontchannelLogoutSessionSupported cannot be null'); + } $this->container['frontchannelLogoutSessionSupported'] = $frontchannelLogoutSessionSupported; return $this; @@ -673,6 +817,9 @@ public function getFrontchannelLogoutSupported() */ public function setFrontchannelLogoutSupported($frontchannelLogoutSupported) { + if (is_null($frontchannelLogoutSupported)) { + throw new \InvalidArgumentException('non-nullable frontchannelLogoutSupported cannot be null'); + } $this->container['frontchannelLogoutSupported'] = $frontchannelLogoutSupported; return $this; @@ -697,6 +844,9 @@ public function getGrantTypesSupported() */ public function setGrantTypesSupported($grantTypesSupported) { + if (is_null($grantTypesSupported)) { + throw new \InvalidArgumentException('non-nullable grantTypesSupported cannot be null'); + } $this->container['grantTypesSupported'] = $grantTypesSupported; return $this; @@ -721,6 +871,9 @@ public function getIdTokenSignedResponseAlg() */ public function setIdTokenSignedResponseAlg($idTokenSignedResponseAlg) { + if (is_null($idTokenSignedResponseAlg)) { + throw new \InvalidArgumentException('non-nullable idTokenSignedResponseAlg cannot be null'); + } $this->container['idTokenSignedResponseAlg'] = $idTokenSignedResponseAlg; return $this; @@ -745,6 +898,9 @@ public function getIdTokenSigningAlgValuesSupported() */ public function setIdTokenSigningAlgValuesSupported($idTokenSigningAlgValuesSupported) { + if (is_null($idTokenSigningAlgValuesSupported)) { + throw new \InvalidArgumentException('non-nullable idTokenSigningAlgValuesSupported cannot be null'); + } $this->container['idTokenSigningAlgValuesSupported'] = $idTokenSigningAlgValuesSupported; return $this; @@ -769,6 +925,9 @@ public function getIssuer() */ public function setIssuer($issuer) { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } $this->container['issuer'] = $issuer; return $this; @@ -793,6 +952,9 @@ public function getJwksUri() */ public function setJwksUri($jwksUri) { + if (is_null($jwksUri)) { + throw new \InvalidArgumentException('non-nullable jwksUri cannot be null'); + } $this->container['jwksUri'] = $jwksUri; return $this; @@ -817,6 +979,9 @@ public function getRegistrationEndpoint() */ public function setRegistrationEndpoint($registrationEndpoint) { + if (is_null($registrationEndpoint)) { + throw new \InvalidArgumentException('non-nullable registrationEndpoint cannot be null'); + } $this->container['registrationEndpoint'] = $registrationEndpoint; return $this; @@ -841,6 +1006,9 @@ public function getRequestObjectSigningAlgValuesSupported() */ public function setRequestObjectSigningAlgValuesSupported($requestObjectSigningAlgValuesSupported) { + if (is_null($requestObjectSigningAlgValuesSupported)) { + throw new \InvalidArgumentException('non-nullable requestObjectSigningAlgValuesSupported cannot be null'); + } $this->container['requestObjectSigningAlgValuesSupported'] = $requestObjectSigningAlgValuesSupported; return $this; @@ -865,6 +1033,9 @@ public function getRequestParameterSupported() */ public function setRequestParameterSupported($requestParameterSupported) { + if (is_null($requestParameterSupported)) { + throw new \InvalidArgumentException('non-nullable requestParameterSupported cannot be null'); + } $this->container['requestParameterSupported'] = $requestParameterSupported; return $this; @@ -889,6 +1060,9 @@ public function getRequestUriParameterSupported() */ public function setRequestUriParameterSupported($requestUriParameterSupported) { + if (is_null($requestUriParameterSupported)) { + throw new \InvalidArgumentException('non-nullable requestUriParameterSupported cannot be null'); + } $this->container['requestUriParameterSupported'] = $requestUriParameterSupported; return $this; @@ -913,6 +1087,9 @@ public function getRequireRequestUriRegistration() */ public function setRequireRequestUriRegistration($requireRequestUriRegistration) { + if (is_null($requireRequestUriRegistration)) { + throw new \InvalidArgumentException('non-nullable requireRequestUriRegistration cannot be null'); + } $this->container['requireRequestUriRegistration'] = $requireRequestUriRegistration; return $this; @@ -937,6 +1114,9 @@ public function getResponseModesSupported() */ public function setResponseModesSupported($responseModesSupported) { + if (is_null($responseModesSupported)) { + throw new \InvalidArgumentException('non-nullable responseModesSupported cannot be null'); + } $this->container['responseModesSupported'] = $responseModesSupported; return $this; @@ -961,6 +1141,9 @@ public function getResponseTypesSupported() */ public function setResponseTypesSupported($responseTypesSupported) { + if (is_null($responseTypesSupported)) { + throw new \InvalidArgumentException('non-nullable responseTypesSupported cannot be null'); + } $this->container['responseTypesSupported'] = $responseTypesSupported; return $this; @@ -985,6 +1168,9 @@ public function getRevocationEndpoint() */ public function setRevocationEndpoint($revocationEndpoint) { + if (is_null($revocationEndpoint)) { + throw new \InvalidArgumentException('non-nullable revocationEndpoint cannot be null'); + } $this->container['revocationEndpoint'] = $revocationEndpoint; return $this; @@ -1009,6 +1195,9 @@ public function getScopesSupported() */ public function setScopesSupported($scopesSupported) { + if (is_null($scopesSupported)) { + throw new \InvalidArgumentException('non-nullable scopesSupported cannot be null'); + } $this->container['scopesSupported'] = $scopesSupported; return $this; @@ -1033,6 +1222,9 @@ public function getSubjectTypesSupported() */ public function setSubjectTypesSupported($subjectTypesSupported) { + if (is_null($subjectTypesSupported)) { + throw new \InvalidArgumentException('non-nullable subjectTypesSupported cannot be null'); + } $this->container['subjectTypesSupported'] = $subjectTypesSupported; return $this; @@ -1057,6 +1249,9 @@ public function getTokenEndpoint() */ public function setTokenEndpoint($tokenEndpoint) { + if (is_null($tokenEndpoint)) { + throw new \InvalidArgumentException('non-nullable tokenEndpoint cannot be null'); + } $this->container['tokenEndpoint'] = $tokenEndpoint; return $this; @@ -1081,6 +1276,9 @@ public function getTokenEndpointAuthMethodsSupported() */ public function setTokenEndpointAuthMethodsSupported($tokenEndpointAuthMethodsSupported) { + if (is_null($tokenEndpointAuthMethodsSupported)) { + throw new \InvalidArgumentException('non-nullable tokenEndpointAuthMethodsSupported cannot be null'); + } $this->container['tokenEndpointAuthMethodsSupported'] = $tokenEndpointAuthMethodsSupported; return $this; @@ -1105,6 +1303,9 @@ public function getUserinfoEndpoint() */ public function setUserinfoEndpoint($userinfoEndpoint) { + if (is_null($userinfoEndpoint)) { + throw new \InvalidArgumentException('non-nullable userinfoEndpoint cannot be null'); + } $this->container['userinfoEndpoint'] = $userinfoEndpoint; return $this; @@ -1129,6 +1330,9 @@ public function getUserinfoSignedResponseAlg() */ public function setUserinfoSignedResponseAlg($userinfoSignedResponseAlg) { + if (is_null($userinfoSignedResponseAlg)) { + throw new \InvalidArgumentException('non-nullable userinfoSignedResponseAlg cannot be null'); + } $this->container['userinfoSignedResponseAlg'] = $userinfoSignedResponseAlg; return $this; @@ -1153,6 +1357,9 @@ public function getUserinfoSigningAlgValuesSupported() */ public function setUserinfoSigningAlgValuesSupported($userinfoSigningAlgValuesSupported) { + if (is_null($userinfoSigningAlgValuesSupported)) { + throw new \InvalidArgumentException('non-nullable userinfoSigningAlgValuesSupported cannot be null'); + } $this->container['userinfoSigningAlgValuesSupported'] = $userinfoSigningAlgValuesSupported; return $this; @@ -1164,7 +1371,7 @@ public function setUserinfoSigningAlgValuesSupported($userinfoSigningAlgValuesSu * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -1176,6 +1383,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -1189,7 +1397,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -1205,7 +1413,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -1217,6 +1425,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/OidcUserInfo.php b/clients/hydra/php/lib/Model/OidcUserInfo.php index 2f849b549a6..200874ec33f 100644 --- a/clients/hydra/php/lib/Model/OidcUserInfo.php +++ b/clients/hydra/php/lib/Model/OidcUserInfo.php @@ -2,7 +2,7 @@ /** * OidcUserInfo * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class OidcUserInfo implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -111,6 +109,40 @@ class OidcUserInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'zoneinfo' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'birthdate' => false, + 'email' => false, + 'emailVerified' => false, + 'familyName' => false, + 'gender' => false, + 'givenName' => false, + 'locale' => false, + 'middleName' => false, + 'name' => false, + 'nickname' => false, + 'phoneNumber' => false, + 'phoneNumberVerified' => false, + 'picture' => false, + 'preferredUsername' => false, + 'profile' => false, + 'sub' => false, + 'updatedAt' => false, + 'website' => false, + 'zoneinfo' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -131,6 +163,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -270,25 +354,43 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['birthdate'] = $data['birthdate'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['emailVerified'] = $data['emailVerified'] ?? null; - $this->container['familyName'] = $data['familyName'] ?? null; - $this->container['gender'] = $data['gender'] ?? null; - $this->container['givenName'] = $data['givenName'] ?? null; - $this->container['locale'] = $data['locale'] ?? null; - $this->container['middleName'] = $data['middleName'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['nickname'] = $data['nickname'] ?? null; - $this->container['phoneNumber'] = $data['phoneNumber'] ?? null; - $this->container['phoneNumberVerified'] = $data['phoneNumberVerified'] ?? null; - $this->container['picture'] = $data['picture'] ?? null; - $this->container['preferredUsername'] = $data['preferredUsername'] ?? null; - $this->container['profile'] = $data['profile'] ?? null; - $this->container['sub'] = $data['sub'] ?? null; - $this->container['updatedAt'] = $data['updatedAt'] ?? null; - $this->container['website'] = $data['website'] ?? null; - $this->container['zoneinfo'] = $data['zoneinfo'] ?? null; + $this->setIfExists('birthdate', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('emailVerified', $data ?? [], null); + $this->setIfExists('familyName', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('givenName', $data ?? [], null); + $this->setIfExists('locale', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nickname', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); + $this->setIfExists('phoneNumberVerified', $data ?? [], null); + $this->setIfExists('picture', $data ?? [], null); + $this->setIfExists('preferredUsername', $data ?? [], null); + $this->setIfExists('profile', $data ?? [], null); + $this->setIfExists('sub', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('website', $data ?? [], null); + $this->setIfExists('zoneinfo', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -334,6 +436,9 @@ public function getBirthdate() */ public function setBirthdate($birthdate) { + if (is_null($birthdate)) { + throw new \InvalidArgumentException('non-nullable birthdate cannot be null'); + } $this->container['birthdate'] = $birthdate; return $this; @@ -358,6 +463,9 @@ public function getEmail() */ public function setEmail($email) { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } $this->container['email'] = $email; return $this; @@ -382,6 +490,9 @@ public function getEmailVerified() */ public function setEmailVerified($emailVerified) { + if (is_null($emailVerified)) { + throw new \InvalidArgumentException('non-nullable emailVerified cannot be null'); + } $this->container['emailVerified'] = $emailVerified; return $this; @@ -406,6 +517,9 @@ public function getFamilyName() */ public function setFamilyName($familyName) { + if (is_null($familyName)) { + throw new \InvalidArgumentException('non-nullable familyName cannot be null'); + } $this->container['familyName'] = $familyName; return $this; @@ -430,6 +544,9 @@ public function getGender() */ public function setGender($gender) { + if (is_null($gender)) { + throw new \InvalidArgumentException('non-nullable gender cannot be null'); + } $this->container['gender'] = $gender; return $this; @@ -454,6 +571,9 @@ public function getGivenName() */ public function setGivenName($givenName) { + if (is_null($givenName)) { + throw new \InvalidArgumentException('non-nullable givenName cannot be null'); + } $this->container['givenName'] = $givenName; return $this; @@ -478,6 +598,9 @@ public function getLocale() */ public function setLocale($locale) { + if (is_null($locale)) { + throw new \InvalidArgumentException('non-nullable locale cannot be null'); + } $this->container['locale'] = $locale; return $this; @@ -502,6 +625,9 @@ public function getMiddleName() */ public function setMiddleName($middleName) { + if (is_null($middleName)) { + throw new \InvalidArgumentException('non-nullable middleName cannot be null'); + } $this->container['middleName'] = $middleName; return $this; @@ -526,6 +652,9 @@ public function getName() */ public function setName($name) { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } $this->container['name'] = $name; return $this; @@ -550,6 +679,9 @@ public function getNickname() */ public function setNickname($nickname) { + if (is_null($nickname)) { + throw new \InvalidArgumentException('non-nullable nickname cannot be null'); + } $this->container['nickname'] = $nickname; return $this; @@ -574,6 +706,9 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -598,6 +733,9 @@ public function getPhoneNumberVerified() */ public function setPhoneNumberVerified($phoneNumberVerified) { + if (is_null($phoneNumberVerified)) { + throw new \InvalidArgumentException('non-nullable phoneNumberVerified cannot be null'); + } $this->container['phoneNumberVerified'] = $phoneNumberVerified; return $this; @@ -622,6 +760,9 @@ public function getPicture() */ public function setPicture($picture) { + if (is_null($picture)) { + throw new \InvalidArgumentException('non-nullable picture cannot be null'); + } $this->container['picture'] = $picture; return $this; @@ -646,6 +787,9 @@ public function getPreferredUsername() */ public function setPreferredUsername($preferredUsername) { + if (is_null($preferredUsername)) { + throw new \InvalidArgumentException('non-nullable preferredUsername cannot be null'); + } $this->container['preferredUsername'] = $preferredUsername; return $this; @@ -670,6 +814,9 @@ public function getProfile() */ public function setProfile($profile) { + if (is_null($profile)) { + throw new \InvalidArgumentException('non-nullable profile cannot be null'); + } $this->container['profile'] = $profile; return $this; @@ -694,6 +841,9 @@ public function getSub() */ public function setSub($sub) { + if (is_null($sub)) { + throw new \InvalidArgumentException('non-nullable sub cannot be null'); + } $this->container['sub'] = $sub; return $this; @@ -718,6 +868,9 @@ public function getUpdatedAt() */ public function setUpdatedAt($updatedAt) { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } $this->container['updatedAt'] = $updatedAt; return $this; @@ -742,6 +895,9 @@ public function getWebsite() */ public function setWebsite($website) { + if (is_null($website)) { + throw new \InvalidArgumentException('non-nullable website cannot be null'); + } $this->container['website'] = $website; return $this; @@ -766,6 +922,9 @@ public function getZoneinfo() */ public function setZoneinfo($zoneinfo) { + if (is_null($zoneinfo)) { + throw new \InvalidArgumentException('non-nullable zoneinfo cannot be null'); + } $this->container['zoneinfo'] = $zoneinfo; return $this; @@ -777,7 +936,7 @@ public function setZoneinfo($zoneinfo) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -789,6 +948,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -802,7 +962,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -818,7 +978,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -830,6 +990,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/Pagination.php b/clients/hydra/php/lib/Model/Pagination.php index dea697297d5..8f8a5885ed4 100644 --- a/clients/hydra/php/lib/Model/Pagination.php +++ b/clients/hydra/php/lib/Model/Pagination.php @@ -2,7 +2,7 @@ /** * Pagination * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class Pagination implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class Pagination implements ModelInterface, ArrayAccess, \JsonSerializable 'pageToken' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pageSize' => false, + 'pageToken' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['pageSize'] = $data['pageSize'] ?? 250; - $this->container['pageToken'] = $data['pageToken'] ?? '1'; + $this->setIfExists('pageSize', $data ?? [], 250); + $this->setIfExists('pageToken', $data ?? [], '1'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -239,11 +324,14 @@ public function getPageSize() */ public function setPageSize($pageSize) { + if (is_null($pageSize)) { + throw new \InvalidArgumentException('non-nullable pageSize cannot be null'); + } - if (!is_null($pageSize) && ($pageSize > 1000)) { + if (($pageSize > 1000)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling Pagination., must be smaller than or equal to 1000.'); } - if (!is_null($pageSize) && ($pageSize < 1)) { + if (($pageSize < 1)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling Pagination., must be bigger than or equal to 1.'); } @@ -271,6 +359,9 @@ public function getPageToken() */ public function setPageToken($pageToken) { + if (is_null($pageToken)) { + throw new \InvalidArgumentException('non-nullable pageToken cannot be null'); + } $this->container['pageToken'] = $pageToken; @@ -284,7 +375,7 @@ public function setPageToken($pageToken) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -296,6 +387,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -309,7 +401,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -325,7 +417,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -337,6 +429,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/PaginationHeaders.php b/clients/hydra/php/lib/Model/PaginationHeaders.php index c04e20a2ea4..35e89e840e2 100644 --- a/clients/hydra/php/lib/Model/PaginationHeaders.php +++ b/clients/hydra/php/lib/Model/PaginationHeaders.php @@ -2,7 +2,7 @@ /** * PaginationHeaders * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class PaginationHeaders implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class PaginationHeaders implements ModelInterface, ArrayAccess, \JsonSerializabl 'xTotalCount' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'link' => false, + 'xTotalCount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['link'] = $data['link'] ?? null; - $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; + $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('xTotalCount', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -231,6 +316,9 @@ public function getLink() */ public function setLink($link) { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } $this->container['link'] = $link; return $this; @@ -255,6 +343,9 @@ public function getXTotalCount() */ public function setXTotalCount($xTotalCount) { + if (is_null($xTotalCount)) { + throw new \InvalidArgumentException('non-nullable xTotalCount cannot be null'); + } $this->container['xTotalCount'] = $xTotalCount; return $this; @@ -266,7 +357,7 @@ public function setXTotalCount($xTotalCount) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +369,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +383,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +399,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +411,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/RFC6749ErrorJson.php b/clients/hydra/php/lib/Model/RFC6749ErrorJson.php index 96aca1eac5a..e03113734b2 100644 --- a/clients/hydra/php/lib/Model/RFC6749ErrorJson.php +++ b/clients/hydra/php/lib/Model/RFC6749ErrorJson.php @@ -2,7 +2,7 @@ /** * RFC6749ErrorJson * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class RFC6749ErrorJson implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -82,6 +80,26 @@ class RFC6749ErrorJson implements ModelInterface, ArrayAccess, \JsonSerializable 'statusCode' => 'int64' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error' => false, + 'errorDebug' => false, + 'errorDescription' => false, + 'errorHint' => false, + 'statusCode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -102,6 +120,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -199,11 +269,29 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['error'] = $data['error'] ?? null; - $this->container['errorDebug'] = $data['errorDebug'] ?? null; - $this->container['errorDescription'] = $data['errorDescription'] ?? null; - $this->container['errorHint'] = $data['errorHint'] ?? null; - $this->container['statusCode'] = $data['statusCode'] ?? null; + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('errorDebug', $data ?? [], null); + $this->setIfExists('errorDescription', $data ?? [], null); + $this->setIfExists('errorHint', $data ?? [], null); + $this->setIfExists('statusCode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -249,6 +337,9 @@ public function getError() */ public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } $this->container['error'] = $error; return $this; @@ -273,6 +364,9 @@ public function getErrorDebug() */ public function setErrorDebug($errorDebug) { + if (is_null($errorDebug)) { + throw new \InvalidArgumentException('non-nullable errorDebug cannot be null'); + } $this->container['errorDebug'] = $errorDebug; return $this; @@ -297,6 +391,9 @@ public function getErrorDescription() */ public function setErrorDescription($errorDescription) { + if (is_null($errorDescription)) { + throw new \InvalidArgumentException('non-nullable errorDescription cannot be null'); + } $this->container['errorDescription'] = $errorDescription; return $this; @@ -321,6 +418,9 @@ public function getErrorHint() */ public function setErrorHint($errorHint) { + if (is_null($errorHint)) { + throw new \InvalidArgumentException('non-nullable errorHint cannot be null'); + } $this->container['errorHint'] = $errorHint; return $this; @@ -345,6 +445,9 @@ public function getStatusCode() */ public function setStatusCode($statusCode) { + if (is_null($statusCode)) { + throw new \InvalidArgumentException('non-nullable statusCode cannot be null'); + } $this->container['statusCode'] = $statusCode; return $this; @@ -356,7 +459,7 @@ public function setStatusCode($statusCode) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -368,6 +471,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -381,7 +485,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -397,7 +501,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -409,6 +513,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/RejectOAuth2Request.php b/clients/hydra/php/lib/Model/RejectOAuth2Request.php index 4577658f841..173238827e2 100644 --- a/clients/hydra/php/lib/Model/RejectOAuth2Request.php +++ b/clients/hydra/php/lib/Model/RejectOAuth2Request.php @@ -2,7 +2,7 @@ /** * RejectOAuth2Request * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class RejectOAuth2Request implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -82,6 +80,26 @@ class RejectOAuth2Request implements ModelInterface, ArrayAccess, \JsonSerializa 'statusCode' => 'int64' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'error' => false, + 'errorDebug' => false, + 'errorDescription' => false, + 'errorHint' => false, + 'statusCode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -102,6 +120,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -199,11 +269,29 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['error'] = $data['error'] ?? null; - $this->container['errorDebug'] = $data['errorDebug'] ?? null; - $this->container['errorDescription'] = $data['errorDescription'] ?? null; - $this->container['errorHint'] = $data['errorHint'] ?? null; - $this->container['statusCode'] = $data['statusCode'] ?? null; + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('errorDebug', $data ?? [], null); + $this->setIfExists('errorDescription', $data ?? [], null); + $this->setIfExists('errorHint', $data ?? [], null); + $this->setIfExists('statusCode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -249,6 +337,9 @@ public function getError() */ public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } $this->container['error'] = $error; return $this; @@ -273,6 +364,9 @@ public function getErrorDebug() */ public function setErrorDebug($errorDebug) { + if (is_null($errorDebug)) { + throw new \InvalidArgumentException('non-nullable errorDebug cannot be null'); + } $this->container['errorDebug'] = $errorDebug; return $this; @@ -297,6 +391,9 @@ public function getErrorDescription() */ public function setErrorDescription($errorDescription) { + if (is_null($errorDescription)) { + throw new \InvalidArgumentException('non-nullable errorDescription cannot be null'); + } $this->container['errorDescription'] = $errorDescription; return $this; @@ -321,6 +418,9 @@ public function getErrorHint() */ public function setErrorHint($errorHint) { + if (is_null($errorHint)) { + throw new \InvalidArgumentException('non-nullable errorHint cannot be null'); + } $this->container['errorHint'] = $errorHint; return $this; @@ -345,6 +445,9 @@ public function getStatusCode() */ public function setStatusCode($statusCode) { + if (is_null($statusCode)) { + throw new \InvalidArgumentException('non-nullable statusCode cannot be null'); + } $this->container['statusCode'] = $statusCode; return $this; @@ -356,7 +459,7 @@ public function setStatusCode($statusCode) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -368,6 +471,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -381,7 +485,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -397,7 +501,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -409,6 +513,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TokenPagination.php b/clients/hydra/php/lib/Model/TokenPagination.php index 33a58d18fb8..9325f62ed3f 100644 --- a/clients/hydra/php/lib/Model/TokenPagination.php +++ b/clients/hydra/php/lib/Model/TokenPagination.php @@ -2,7 +2,7 @@ /** * TokenPagination * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TokenPagination implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class TokenPagination implements ModelInterface, ArrayAccess, \JsonSerializable 'pageToken' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pageSize' => false, + 'pageToken' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['pageSize'] = $data['pageSize'] ?? 250; - $this->container['pageToken'] = $data['pageToken'] ?? '1'; + $this->setIfExists('pageSize', $data ?? [], 250); + $this->setIfExists('pageToken', $data ?? [], '1'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -239,11 +324,14 @@ public function getPageSize() */ public function setPageSize($pageSize) { + if (is_null($pageSize)) { + throw new \InvalidArgumentException('non-nullable pageSize cannot be null'); + } - if (!is_null($pageSize) && ($pageSize > 1000)) { + if (($pageSize > 1000)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPagination., must be smaller than or equal to 1000.'); } - if (!is_null($pageSize) && ($pageSize < 1)) { + if (($pageSize < 1)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPagination., must be bigger than or equal to 1.'); } @@ -271,6 +359,9 @@ public function getPageToken() */ public function setPageToken($pageToken) { + if (is_null($pageToken)) { + throw new \InvalidArgumentException('non-nullable pageToken cannot be null'); + } $this->container['pageToken'] = $pageToken; @@ -284,7 +375,7 @@ public function setPageToken($pageToken) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -296,6 +387,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -309,7 +401,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -325,7 +417,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -337,6 +429,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TokenPaginationHeaders.php b/clients/hydra/php/lib/Model/TokenPaginationHeaders.php index a96d6888df8..31fde9136c4 100644 --- a/clients/hydra/php/lib/Model/TokenPaginationHeaders.php +++ b/clients/hydra/php/lib/Model/TokenPaginationHeaders.php @@ -2,7 +2,7 @@ /** * TokenPaginationHeaders * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TokenPaginationHeaders implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class TokenPaginationHeaders implements ModelInterface, ArrayAccess, \JsonSerial 'xTotalCount' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'link' => false, + 'xTotalCount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['link'] = $data['link'] ?? null; - $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; + $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('xTotalCount', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -231,6 +316,9 @@ public function getLink() */ public function setLink($link) { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } $this->container['link'] = $link; return $this; @@ -255,6 +343,9 @@ public function getXTotalCount() */ public function setXTotalCount($xTotalCount) { + if (is_null($xTotalCount)) { + throw new \InvalidArgumentException('non-nullable xTotalCount cannot be null'); + } $this->container['xTotalCount'] = $xTotalCount; return $this; @@ -266,7 +357,7 @@ public function setXTotalCount($xTotalCount) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +369,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +383,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +399,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +411,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php b/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php index 68bf8c17096..1b86dba4f7f 100644 --- a/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php +++ b/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php @@ -2,7 +2,7 @@ /** * TokenPaginationRequestParameters * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TokenPaginationRequestParameters implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -77,6 +75,23 @@ class TokenPaginationRequestParameters implements ModelInterface, ArrayAccess, \ 'pageToken' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pageSize' => false, + 'pageToken' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -97,6 +112,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -185,8 +252,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['pageSize'] = $data['pageSize'] ?? 250; - $this->container['pageToken'] = $data['pageToken'] ?? '1'; + $this->setIfExists('pageSize', $data ?? [], 250); + $this->setIfExists('pageToken', $data ?? [], '1'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -240,11 +325,14 @@ public function getPageSize() */ public function setPageSize($pageSize) { + if (is_null($pageSize)) { + throw new \InvalidArgumentException('non-nullable pageSize cannot be null'); + } - if (!is_null($pageSize) && ($pageSize > 500)) { + if (($pageSize > 500)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPaginationRequestParameters., must be smaller than or equal to 500.'); } - if (!is_null($pageSize) && ($pageSize < 1)) { + if (($pageSize < 1)) { throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPaginationRequestParameters., must be bigger than or equal to 1.'); } @@ -272,6 +360,9 @@ public function getPageToken() */ public function setPageToken($pageToken) { + if (is_null($pageToken)) { + throw new \InvalidArgumentException('non-nullable pageToken cannot be null'); + } $this->container['pageToken'] = $pageToken; @@ -285,7 +376,7 @@ public function setPageToken($pageToken) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -297,6 +388,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -310,7 +402,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -326,7 +418,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -338,6 +430,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php b/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php index 9acccdacc2a..19854b4011b 100644 --- a/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php +++ b/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php @@ -2,7 +2,7 @@ /** * TokenPaginationResponseHeaders * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TokenPaginationResponseHeaders implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -77,6 +75,23 @@ class TokenPaginationResponseHeaders implements ModelInterface, ArrayAccess, \Js 'xTotalCount' => 'int64' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'link' => false, + 'xTotalCount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -97,6 +112,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -185,8 +252,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['link'] = $data['link'] ?? null; - $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; + $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('xTotalCount', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -232,6 +317,9 @@ public function getLink() */ public function setLink($link) { + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); + } $this->container['link'] = $link; return $this; @@ -256,6 +344,9 @@ public function getXTotalCount() */ public function setXTotalCount($xTotalCount) { + if (is_null($xTotalCount)) { + throw new \InvalidArgumentException('non-nullable xTotalCount cannot be null'); + } $this->container['xTotalCount'] = $xTotalCount; return $this; @@ -267,7 +358,7 @@ public function setXTotalCount($xTotalCount) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -279,6 +370,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -292,7 +384,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -308,7 +400,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -320,6 +412,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php b/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php index 152bcd7598c..30850a1eae2 100644 --- a/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php +++ b/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php @@ -2,7 +2,7 @@ /** * TrustOAuth2JwtGrantIssuer * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TrustOAuth2JwtGrantIssuer implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -85,6 +83,27 @@ class TrustOAuth2JwtGrantIssuer implements ModelInterface, ArrayAccess, \JsonSer 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'allowAnySubject' => false, + 'expiresAt' => false, + 'issuer' => false, + 'jwk' => false, + 'scope' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -105,6 +124,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -205,12 +276,30 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['allowAnySubject'] = $data['allowAnySubject'] ?? null; - $this->container['expiresAt'] = $data['expiresAt'] ?? null; - $this->container['issuer'] = $data['issuer'] ?? null; - $this->container['jwk'] = $data['jwk'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('allowAnySubject', $data ?? [], null); + $this->setIfExists('expiresAt', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('jwk', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -268,6 +357,9 @@ public function getAllowAnySubject() */ public function setAllowAnySubject($allowAnySubject) { + if (is_null($allowAnySubject)) { + throw new \InvalidArgumentException('non-nullable allowAnySubject cannot be null'); + } $this->container['allowAnySubject'] = $allowAnySubject; return $this; @@ -292,6 +384,9 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { + if (is_null($expiresAt)) { + throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); + } $this->container['expiresAt'] = $expiresAt; return $this; @@ -316,6 +411,9 @@ public function getIssuer() */ public function setIssuer($issuer) { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } $this->container['issuer'] = $issuer; return $this; @@ -340,6 +438,9 @@ public function getJwk() */ public function setJwk($jwk) { + if (is_null($jwk)) { + throw new \InvalidArgumentException('non-nullable jwk cannot be null'); + } $this->container['jwk'] = $jwk; return $this; @@ -364,6 +465,9 @@ public function getScope() */ public function setScope($scope) { + if (is_null($scope)) { + throw new \InvalidArgumentException('non-nullable scope cannot be null'); + } $this->container['scope'] = $scope; return $this; @@ -388,6 +492,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -399,7 +506,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -411,6 +518,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -424,7 +532,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -440,7 +548,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -452,6 +560,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php index e31535a1173..7ce4f4ce33a 100644 --- a/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php +++ b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php @@ -2,7 +2,7 @@ /** * TrustedOAuth2JwtGrantIssuer * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TrustedOAuth2JwtGrantIssuer implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -89,6 +87,29 @@ class TrustedOAuth2JwtGrantIssuer implements ModelInterface, ArrayAccess, \JsonS 'subject' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'allowAnySubject' => false, + 'createdAt' => false, + 'expiresAt' => false, + 'id' => false, + 'issuer' => false, + 'publicKey' => false, + 'scope' => false, + 'subject' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -109,6 +130,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -215,14 +288,32 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['allowAnySubject'] = $data['allowAnySubject'] ?? null; - $this->container['createdAt'] = $data['createdAt'] ?? null; - $this->container['expiresAt'] = $data['expiresAt'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer'] = $data['issuer'] ?? null; - $this->container['publicKey'] = $data['publicKey'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['subject'] = $data['subject'] ?? null; + $this->setIfExists('allowAnySubject', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('expiresAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('publicKey', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -268,6 +359,9 @@ public function getAllowAnySubject() */ public function setAllowAnySubject($allowAnySubject) { + if (is_null($allowAnySubject)) { + throw new \InvalidArgumentException('non-nullable allowAnySubject cannot be null'); + } $this->container['allowAnySubject'] = $allowAnySubject; return $this; @@ -292,6 +386,9 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } $this->container['createdAt'] = $createdAt; return $this; @@ -316,6 +413,9 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { + if (is_null($expiresAt)) { + throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); + } $this->container['expiresAt'] = $expiresAt; return $this; @@ -340,6 +440,9 @@ public function getId() */ public function setId($id) { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } $this->container['id'] = $id; return $this; @@ -364,6 +467,9 @@ public function getIssuer() */ public function setIssuer($issuer) { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } $this->container['issuer'] = $issuer; return $this; @@ -388,6 +494,9 @@ public function getPublicKey() */ public function setPublicKey($publicKey) { + if (is_null($publicKey)) { + throw new \InvalidArgumentException('non-nullable publicKey cannot be null'); + } $this->container['publicKey'] = $publicKey; return $this; @@ -412,6 +521,9 @@ public function getScope() */ public function setScope($scope) { + if (is_null($scope)) { + throw new \InvalidArgumentException('non-nullable scope cannot be null'); + } $this->container['scope'] = $scope; return $this; @@ -436,6 +548,9 @@ public function getSubject() */ public function setSubject($subject) { + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); + } $this->container['subject'] = $subject; return $this; @@ -447,7 +562,7 @@ public function setSubject($subject) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -459,6 +574,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -472,7 +588,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -488,7 +604,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -500,6 +616,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php index b1068417bf6..3853e41d03c 100644 --- a/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php +++ b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php @@ -2,7 +2,7 @@ /** * TrustedOAuth2JwtGrantJsonWebKey * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -40,9 +40,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class TrustedOAuth2JwtGrantJsonWebKey implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -77,6 +75,23 @@ class TrustedOAuth2JwtGrantJsonWebKey implements ModelInterface, ArrayAccess, \J 'set' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'kid' => false, + 'set' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -97,6 +112,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -185,8 +252,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['kid'] = $data['kid'] ?? null; - $this->container['set'] = $data['set'] ?? null; + $this->setIfExists('kid', $data ?? [], null); + $this->setIfExists('set', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -232,6 +317,9 @@ public function getKid() */ public function setKid($kid) { + if (is_null($kid)) { + throw new \InvalidArgumentException('non-nullable kid cannot be null'); + } $this->container['kid'] = $kid; return $this; @@ -256,6 +344,9 @@ public function getSet() */ public function setSet($set) { + if (is_null($set)) { + throw new \InvalidArgumentException('non-nullable set cannot be null'); + } $this->container['set'] = $set; return $this; @@ -267,7 +358,7 @@ public function setSet($set) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -279,6 +370,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -292,7 +384,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -308,7 +400,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -320,6 +412,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/VerifiableCredentialPrimingResponse.php b/clients/hydra/php/lib/Model/VerifiableCredentialPrimingResponse.php index f36fe659b8b..4d612ed232d 100644 --- a/clients/hydra/php/lib/Model/VerifiableCredentialPrimingResponse.php +++ b/clients/hydra/php/lib/Model/VerifiableCredentialPrimingResponse.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialPrimingResponse * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class VerifiableCredentialPrimingResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -88,6 +86,29 @@ class VerifiableCredentialPrimingResponse implements ModelInterface, ArrayAccess 'statusCode' => 'int64' ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'cNonce' => false, + 'cNonceExpiresIn' => false, + 'error' => false, + 'errorDebug' => false, + 'errorDescription' => false, + 'errorHint' => false, + 'format' => false, + 'statusCode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -108,6 +129,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -214,14 +287,32 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['cNonce'] = $data['cNonce'] ?? null; - $this->container['cNonceExpiresIn'] = $data['cNonceExpiresIn'] ?? null; - $this->container['error'] = $data['error'] ?? null; - $this->container['errorDebug'] = $data['errorDebug'] ?? null; - $this->container['errorDescription'] = $data['errorDescription'] ?? null; - $this->container['errorHint'] = $data['errorHint'] ?? null; - $this->container['format'] = $data['format'] ?? null; - $this->container['statusCode'] = $data['statusCode'] ?? null; + $this->setIfExists('cNonce', $data ?? [], null); + $this->setIfExists('cNonceExpiresIn', $data ?? [], null); + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('errorDebug', $data ?? [], null); + $this->setIfExists('errorDescription', $data ?? [], null); + $this->setIfExists('errorHint', $data ?? [], null); + $this->setIfExists('format', $data ?? [], null); + $this->setIfExists('statusCode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -267,6 +358,9 @@ public function getCNonce() */ public function setCNonce($cNonce) { + if (is_null($cNonce)) { + throw new \InvalidArgumentException('non-nullable cNonce cannot be null'); + } $this->container['cNonce'] = $cNonce; return $this; @@ -291,6 +385,9 @@ public function getCNonceExpiresIn() */ public function setCNonceExpiresIn($cNonceExpiresIn) { + if (is_null($cNonceExpiresIn)) { + throw new \InvalidArgumentException('non-nullable cNonceExpiresIn cannot be null'); + } $this->container['cNonceExpiresIn'] = $cNonceExpiresIn; return $this; @@ -315,6 +412,9 @@ public function getError() */ public function setError($error) { + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); + } $this->container['error'] = $error; return $this; @@ -339,6 +439,9 @@ public function getErrorDebug() */ public function setErrorDebug($errorDebug) { + if (is_null($errorDebug)) { + throw new \InvalidArgumentException('non-nullable errorDebug cannot be null'); + } $this->container['errorDebug'] = $errorDebug; return $this; @@ -363,6 +466,9 @@ public function getErrorDescription() */ public function setErrorDescription($errorDescription) { + if (is_null($errorDescription)) { + throw new \InvalidArgumentException('non-nullable errorDescription cannot be null'); + } $this->container['errorDescription'] = $errorDescription; return $this; @@ -387,6 +493,9 @@ public function getErrorHint() */ public function setErrorHint($errorHint) { + if (is_null($errorHint)) { + throw new \InvalidArgumentException('non-nullable errorHint cannot be null'); + } $this->container['errorHint'] = $errorHint; return $this; @@ -411,6 +520,9 @@ public function getFormat() */ public function setFormat($format) { + if (is_null($format)) { + throw new \InvalidArgumentException('non-nullable format cannot be null'); + } $this->container['format'] = $format; return $this; @@ -435,6 +547,9 @@ public function getStatusCode() */ public function setStatusCode($statusCode) { + if (is_null($statusCode)) { + throw new \InvalidArgumentException('non-nullable statusCode cannot be null'); + } $this->container['statusCode'] = $statusCode; return $this; @@ -446,7 +561,7 @@ public function setStatusCode($statusCode) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -458,6 +573,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -471,7 +587,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -487,7 +603,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -499,6 +615,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/VerifiableCredentialProof.php b/clients/hydra/php/lib/Model/VerifiableCredentialProof.php index 78f2ce82a03..eca2c0fe6f6 100644 --- a/clients/hydra/php/lib/Model/VerifiableCredentialProof.php +++ b/clients/hydra/php/lib/Model/VerifiableCredentialProof.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialProof * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class VerifiableCredentialProof implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class VerifiableCredentialProof implements ModelInterface, ArrayAccess, \JsonSer 'proofType' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'jwt' => false, + 'proofType' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['jwt'] = $data['jwt'] ?? null; - $this->container['proofType'] = $data['proofType'] ?? null; + $this->setIfExists('jwt', $data ?? [], null); + $this->setIfExists('proofType', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -231,6 +316,9 @@ public function getJwt() */ public function setJwt($jwt) { + if (is_null($jwt)) { + throw new \InvalidArgumentException('non-nullable jwt cannot be null'); + } $this->container['jwt'] = $jwt; return $this; @@ -255,6 +343,9 @@ public function getProofType() */ public function setProofType($proofType) { + if (is_null($proofType)) { + throw new \InvalidArgumentException('non-nullable proofType cannot be null'); + } $this->container['proofType'] = $proofType; return $this; @@ -266,7 +357,7 @@ public function setProofType($proofType) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +369,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +383,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +399,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +411,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/VerifiableCredentialResponse.php b/clients/hydra/php/lib/Model/VerifiableCredentialResponse.php index 66dd96147f1..06751158c98 100644 --- a/clients/hydra/php/lib/Model/VerifiableCredentialResponse.php +++ b/clients/hydra/php/lib/Model/VerifiableCredentialResponse.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialResponse * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class VerifiableCredentialResponse implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -76,6 +74,23 @@ class VerifiableCredentialResponse implements ModelInterface, ArrayAccess, \Json 'format' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'credentialDraft00' => false, + 'format' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -96,6 +111,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -184,8 +251,26 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['credentialDraft00'] = $data['credentialDraft00'] ?? null; - $this->container['format'] = $data['format'] ?? null; + $this->setIfExists('credentialDraft00', $data ?? [], null); + $this->setIfExists('format', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -231,6 +316,9 @@ public function getCredentialDraft00() */ public function setCredentialDraft00($credentialDraft00) { + if (is_null($credentialDraft00)) { + throw new \InvalidArgumentException('non-nullable credentialDraft00 cannot be null'); + } $this->container['credentialDraft00'] = $credentialDraft00; return $this; @@ -255,6 +343,9 @@ public function getFormat() */ public function setFormat($format) { + if (is_null($format)) { + throw new \InvalidArgumentException('non-nullable format cannot be null'); + } $this->container['format'] = $format; return $this; @@ -266,7 +357,7 @@ public function setFormat($format) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,6 +369,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -291,7 +383,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -307,7 +399,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -319,6 +411,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/Model/Version.php b/clients/hydra/php/lib/Model/Version.php index f5dafef116d..76593d6fc0b 100644 --- a/clients/hydra/php/lib/Model/Version.php +++ b/clients/hydra/php/lib/Model/Version.php @@ -2,7 +2,7 @@ /** * Version * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -39,9 +39,7 @@ * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null + * @implements \ArrayAccess */ class Version implements ModelInterface, ArrayAccess, \JsonSerializable { @@ -74,6 +72,22 @@ class Version implements ModelInterface, ArrayAccess, \JsonSerializable 'version' => null ]; + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'version' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + /** * Array of property to type mappings. Used for (de)serialization * @@ -94,6 +108,58 @@ public static function openAPIFormats() return self::$openAPIFormats; } + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -179,7 +245,25 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['version'] = $data['version'] ?? null; + $this->setIfExists('version', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** @@ -225,6 +309,9 @@ public function getVersion() */ public function setVersion($version) { + if (is_null($version)) { + throw new \InvalidArgumentException('non-nullable version cannot be null'); + } $this->container['version'] = $version; return $this; @@ -236,7 +323,7 @@ public function setVersion($version) * * @return boolean */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -248,6 +335,7 @@ public function offsetExists($offset) * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->container[$offset] ?? null; @@ -261,7 +349,7 @@ public function offsetGet($offset) * * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -277,7 +365,7 @@ public function offsetSet($offset, $value) * * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -289,6 +377,7 @@ public function offsetUnset($offset) * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); diff --git a/clients/hydra/php/lib/ObjectSerializer.php b/clients/hydra/php/lib/ObjectSerializer.php index 8593d54f994..8dbee887f45 100644 --- a/clients/hydra/php/lib/ObjectSerializer.php +++ b/clients/hydra/php/lib/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -29,6 +29,7 @@ namespace Ory\Hydra\Client; +use GuzzleHttp\Psr7\Utils; use Ory\Hydra\Client\Model\ModelInterface; /** @@ -87,7 +88,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -98,7 +99,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } - if ($value !== null) { + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); } } @@ -158,22 +159,141 @@ public static function toPathValue($value) } /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. + * Checks if a value is empty, based on its OpenAPI type. * - * @param string[]|string|\DateTime $object an object to be serialized to a string + * @param mixed $value + * @param string $openApiType * - * @return string the serialized object + * @return bool true if $value is empty */ - public static function toQueryValue($object) + private static function isEmptyValue($value, string $openApiType): bool { - if (is_array($object)) { - return implode(',', $object); - } else { - return self::toString($object); + # If empty() returns false, it is not empty regardless of its type. + if (!empty($value)) { + return false; + } + + # Null is always empty, as we cannot send a real "null" value in a query parameter. + if ($value === null) { + return true; } + + switch ($openApiType) { + # For numeric values, false and '' are considered empty. + # This comparison is safe for floating point values, since the previous call to empty() will + # filter out values that don't match 0. + case 'int': + case 'integer': + return $value !== 0; + + case 'number': + case 'float': + return $value !== 0 && $value !== 0.0; + + # For boolean values, '' is considered empty + case 'bool': + case 'boolean': + return !in_array($value, [false, 0], true); + + # For all the other types, any value at this point can be considered empty. + default: + return true; + } + } + + /** + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. + * + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option + * @param bool $required Whether query param is required or not + * + * @return array + */ + public static function toQueryValue( + $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true, + bool $required = true + ): array { + + # Check if we should omit this parameter from the query. This should only happen when: + # - Parameter is NOT required; AND + # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + # example, 0 as "int" or "boolean" is NOT an empty value. + if (self::isEmptyValue($value, $openApiType)) { + if ($required) { + return ["{$paramName}" => '']; + } else { + return []; + } + } + + # Handle DateTime objects in query + if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; + } + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) return $arr; + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; + } + + if ('boolean' === $openApiType && is_bool($value)) { + $value = self::convertBoolToQueryStringFormat($value); + } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; + } + + /** + * Convert boolean value to format for query string. + * + * @param bool $value Boolean value + * + * @return int|string Boolean value in format + */ + public static function convertBoolToQueryStringFormat(bool $value) + { + if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + return $value ? 'true' : 'false'; + } + + return (int) $value; } /** @@ -219,7 +339,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */ @@ -230,7 +350,7 @@ public static function toString($value) } elseif (is_bool($value)) { return $value ? 'true' : 'false'; } else { - return $value; + return (string) $value; } } @@ -277,7 +397,6 @@ public static function serializeCollection(array $collection, $style, $allowColl * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null a single or an array of $class instances */ @@ -320,13 +439,13 @@ public static function deserialize($data, $class, $httpHeaders = null) if ($class === 'object') { settype($data, 'array'); return $data; - } else if ($class === 'mixed') { + } elseif ($class === 'mixed') { settype($data, gettype($data)); return $data; } if ($class === '\DateTime') { - // Some API's return an invalid, empty string as a + // Some APIs return an invalid, empty string as a // date-time property. DateTime::__construct() will return // the current time for empty input which is probably not // what is meant. The invalid empty string is probably to @@ -336,7 +455,7 @@ public static function deserialize($data, $class, $httpHeaders = null) try { return new \DateTime($data); } catch (\Exception $exception) { - // Some API's return a date-time with too high nanosecond + // Some APIs return a date-time with too high nanosecond // precision for php's DateTime to handle. // With provided regexp 6 digits of microseconds saved return new \DateTime(self::sanitizeTimestamp($data)); @@ -347,6 +466,8 @@ public static function deserialize($data, $class, $httpHeaders = null) } if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name @@ -370,7 +491,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } @@ -384,6 +505,11 @@ public static function deserialize($data, $class, $httpHeaders = null) return $data; } else { $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { @@ -398,7 +524,15 @@ public static function deserialize($data, $class, $httpHeaders = null) foreach ($instance::openAPITypes() as $property => $type) { $propertySetter = $instance::setters()[$property]; - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + continue; } @@ -410,4 +544,66 @@ public static function deserialize($data, $class, $httpHeaders = null) return $instance; } } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() + ? function ($v) { return (int) $v; } + : function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; + } } diff --git a/clients/hydra/php/test/Api/JwkApiTest.php b/clients/hydra/php/test/Api/JwkApiTest.php index 91bb728f8a3..984be5acfb0 100644 --- a/clients/hydra/php/test/Api/JwkApiTest.php +++ b/clients/hydra/php/test/Api/JwkApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -93,7 +93,7 @@ public function testCreateJsonWebKeySet() public function testDeleteJsonWebKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -105,7 +105,7 @@ public function testDeleteJsonWebKey() public function testDeleteJsonWebKeySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -117,7 +117,7 @@ public function testDeleteJsonWebKeySet() public function testGetJsonWebKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -129,7 +129,7 @@ public function testGetJsonWebKey() public function testGetJsonWebKeySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -141,7 +141,7 @@ public function testGetJsonWebKeySet() public function testSetJsonWebKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -153,6 +153,6 @@ public function testSetJsonWebKey() public function testSetJsonWebKeySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Api/MetadataApiTest.php b/clients/hydra/php/test/Api/MetadataApiTest.php index 861d1b9a02e..08574544edb 100644 --- a/clients/hydra/php/test/Api/MetadataApiTest.php +++ b/clients/hydra/php/test/Api/MetadataApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -93,7 +93,7 @@ public function testGetVersion() public function testIsAlive() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -105,6 +105,6 @@ public function testIsAlive() public function testIsReady() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Api/OAuth2ApiTest.php b/clients/hydra/php/test/Api/OAuth2ApiTest.php index 8cb8bd7037d..e25602f8e99 100644 --- a/clients/hydra/php/test/Api/OAuth2ApiTest.php +++ b/clients/hydra/php/test/Api/OAuth2ApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -93,7 +93,7 @@ public function testAcceptOAuth2ConsentRequest() public function testAcceptOAuth2LoginRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -105,7 +105,7 @@ public function testAcceptOAuth2LoginRequest() public function testAcceptOAuth2LogoutRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -117,7 +117,7 @@ public function testAcceptOAuth2LogoutRequest() public function testCreateOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -129,7 +129,7 @@ public function testCreateOAuth2Client() public function testDeleteOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -141,7 +141,7 @@ public function testDeleteOAuth2Client() public function testDeleteOAuth2Token() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -153,7 +153,7 @@ public function testDeleteOAuth2Token() public function testDeleteTrustedOAuth2JwtGrantIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -165,7 +165,7 @@ public function testDeleteTrustedOAuth2JwtGrantIssuer() public function testGetOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -177,7 +177,7 @@ public function testGetOAuth2Client() public function testGetOAuth2ConsentRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -189,7 +189,7 @@ public function testGetOAuth2ConsentRequest() public function testGetOAuth2LoginRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -201,7 +201,7 @@ public function testGetOAuth2LoginRequest() public function testGetOAuth2LogoutRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -213,7 +213,7 @@ public function testGetOAuth2LogoutRequest() public function testGetTrustedOAuth2JwtGrantIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -225,7 +225,7 @@ public function testGetTrustedOAuth2JwtGrantIssuer() public function testIntrospectOAuth2Token() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -237,7 +237,7 @@ public function testIntrospectOAuth2Token() public function testListOAuth2Clients() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -249,7 +249,7 @@ public function testListOAuth2Clients() public function testListOAuth2ConsentSessions() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -261,7 +261,7 @@ public function testListOAuth2ConsentSessions() public function testListTrustedOAuth2JwtGrantIssuers() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -273,7 +273,7 @@ public function testListTrustedOAuth2JwtGrantIssuers() public function testOAuth2Authorize() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -285,7 +285,7 @@ public function testOAuth2Authorize() public function testOauth2TokenExchange() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -297,7 +297,7 @@ public function testOauth2TokenExchange() public function testPatchOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -309,7 +309,7 @@ public function testPatchOAuth2Client() public function testRejectOAuth2ConsentRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -321,7 +321,7 @@ public function testRejectOAuth2ConsentRequest() public function testRejectOAuth2LoginRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -333,7 +333,7 @@ public function testRejectOAuth2LoginRequest() public function testRejectOAuth2LogoutRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -345,7 +345,7 @@ public function testRejectOAuth2LogoutRequest() public function testRevokeOAuth2ConsentSessions() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -357,7 +357,7 @@ public function testRevokeOAuth2ConsentSessions() public function testRevokeOAuth2LoginSessions() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -369,7 +369,7 @@ public function testRevokeOAuth2LoginSessions() public function testRevokeOAuth2Token() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -381,7 +381,7 @@ public function testRevokeOAuth2Token() public function testSetOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -393,7 +393,7 @@ public function testSetOAuth2Client() public function testSetOAuth2ClientLifespans() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -405,6 +405,6 @@ public function testSetOAuth2ClientLifespans() public function testTrustOAuth2JwtGrantIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Api/OidcApiTest.php b/clients/hydra/php/test/Api/OidcApiTest.php index 6e5d9fa1b49..27e3b3c2e3c 100644 --- a/clients/hydra/php/test/Api/OidcApiTest.php +++ b/clients/hydra/php/test/Api/OidcApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -93,7 +93,7 @@ public function testCreateOidcDynamicClient() public function testCreateVerifiableCredential() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -105,7 +105,7 @@ public function testCreateVerifiableCredential() public function testDeleteOidcDynamicClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -117,7 +117,7 @@ public function testDeleteOidcDynamicClient() public function testDiscoverOidcConfiguration() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -129,7 +129,7 @@ public function testDiscoverOidcConfiguration() public function testGetOidcDynamicClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -141,7 +141,7 @@ public function testGetOidcDynamicClient() public function testGetOidcUserInfo() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -153,7 +153,7 @@ public function testGetOidcUserInfo() public function testRevokeOidcSession() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -165,6 +165,6 @@ public function testRevokeOidcSession() public function testSetOidcDynamicClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Api/WellknownApiTest.php b/clients/hydra/php/test/Api/WellknownApiTest.php index cac6f0ef786..2c0b08dfd28 100644 --- a/clients/hydra/php/test/Api/WellknownApiTest.php +++ b/clients/hydra/php/test/Api/WellknownApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php index cf4881f617f..8dd7539a5a4 100644 --- a/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2ConsentRequestSessionTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testAcceptOAuth2ConsentRequestSession() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testAcceptOAuth2ConsentRequestSession() public function testPropertyAccessToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyAccessToken() public function testPropertyIdToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php index 7c2afd71d0a..3376dc7f433 100644 --- a/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2ConsentRequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testAcceptOAuth2ConsentRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testAcceptOAuth2ConsentRequest() public function testPropertyContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyContext() public function testPropertyGrantAccessTokenAudience() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyGrantAccessTokenAudience() public function testPropertyGrantScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyGrantScope() public function testPropertyHandledAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyHandledAt() public function testPropertyRemember() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyRemember() public function testPropertyRememberFor() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,6 +140,6 @@ public function testPropertyRememberFor() public function testPropertySession() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php b/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php index 28115e0afca..df0dce42312 100644 --- a/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php @@ -2,7 +2,7 @@ /** * AcceptOAuth2LoginRequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testAcceptOAuth2LoginRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testAcceptOAuth2LoginRequest() public function testPropertyAcr() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAcr() public function testPropertyAmr() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAmr() public function testPropertyContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyContext() public function testPropertyExtendSessionLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyExtendSessionLifespan() public function testPropertyForceSubjectIdentifier() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyForceSubjectIdentifier() public function testPropertyIdentityProviderSessionId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyIdentityProviderSessionId() public function testPropertyRemember() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyRemember() public function testPropertyRememberFor() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,6 +158,6 @@ public function testPropertyRememberFor() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php b/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php index 26146380626..862d84b65b5 100644 --- a/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php +++ b/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php @@ -2,7 +2,7 @@ /** * CreateJsonWebKeySetTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testCreateJsonWebKeySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testCreateJsonWebKeySet() public function testPropertyAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAlg() public function testPropertyKid() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,6 +104,6 @@ public function testPropertyKid() public function testPropertyUse() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/CreateVerifiableCredentialRequestBodyTest.php b/clients/hydra/php/test/Model/CreateVerifiableCredentialRequestBodyTest.php index f8d5d1eb9bd..d54a0262be8 100644 --- a/clients/hydra/php/test/Model/CreateVerifiableCredentialRequestBodyTest.php +++ b/clients/hydra/php/test/Model/CreateVerifiableCredentialRequestBodyTest.php @@ -2,7 +2,7 @@ /** * CreateVerifiableCredentialRequestBodyTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testCreateVerifiableCredentialRequestBody() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testCreateVerifiableCredentialRequestBody() public function testPropertyFormat() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyFormat() public function testPropertyProof() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,6 +104,6 @@ public function testPropertyProof() public function testPropertyTypes() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/CredentialSupportedDraft00Test.php b/clients/hydra/php/test/Model/CredentialSupportedDraft00Test.php index f5e2761dc0e..6130a454d3b 100644 --- a/clients/hydra/php/test/Model/CredentialSupportedDraft00Test.php +++ b/clients/hydra/php/test/Model/CredentialSupportedDraft00Test.php @@ -2,7 +2,7 @@ /** * CredentialSupportedDraft00Test * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testCredentialSupportedDraft00() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testCredentialSupportedDraft00() public function testPropertyCryptographicBindingMethodsSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyCryptographicBindingMethodsSupported() public function testPropertyCryptographicSuitesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyCryptographicSuitesSupported() public function testPropertyFormat() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,6 +113,6 @@ public function testPropertyFormat() public function testPropertyTypes() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/ErrorOAuth2Test.php b/clients/hydra/php/test/Model/ErrorOAuth2Test.php index a10c97eee03..30eb2c63185 100644 --- a/clients/hydra/php/test/Model/ErrorOAuth2Test.php +++ b/clients/hydra/php/test/Model/ErrorOAuth2Test.php @@ -2,7 +2,7 @@ /** * ErrorOAuth2Test * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testErrorOAuth2() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testErrorOAuth2() public function testPropertyError() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyError() public function testPropertyErrorDebug() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyErrorDebug() public function testPropertyErrorDescription() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyErrorDescription() public function testPropertyErrorHint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,6 +122,6 @@ public function testPropertyErrorHint() public function testPropertyStatusCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/GenericErrorTest.php b/clients/hydra/php/test/Model/GenericErrorTest.php index 6ad87653dff..074c44eec80 100644 --- a/clients/hydra/php/test/Model/GenericErrorTest.php +++ b/clients/hydra/php/test/Model/GenericErrorTest.php @@ -2,7 +2,7 @@ /** * GenericErrorTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testGenericError() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testGenericError() public function testPropertyCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyCode() public function testPropertyDebug() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyDebug() public function testPropertyDetails() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyDetails() public function testPropertyId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyId() public function testPropertyMessage() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyMessage() public function testPropertyReason() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyReason() public function testPropertyRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,6 +149,6 @@ public function testPropertyRequest() public function testPropertyStatus() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/InlineResponse2001Test.php b/clients/hydra/php/test/Model/GetVersion200ResponseTest.php similarity index 75% rename from clients/hydra/php/test/Model/InlineResponse2001Test.php rename to clients/hydra/php/test/Model/GetVersion200ResponseTest.php index f6c156f72d9..16239ea1786 100644 --- a/clients/hydra/php/test/Model/InlineResponse2001Test.php +++ b/clients/hydra/php/test/Model/GetVersion200ResponseTest.php @@ -1,8 +1,8 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testInlineResponse2001() public function testPropertyVersion() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php b/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php index 1eb84ccc483..7e6bf48050c 100644 --- a/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php +++ b/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php @@ -2,7 +2,7 @@ /** * HealthNotReadyStatusTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testHealthNotReadyStatus() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testHealthNotReadyStatus() public function testPropertyErrors() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/HealthStatusTest.php b/clients/hydra/php/test/Model/HealthStatusTest.php index 8d1dd6fab10..6472cf61cf2 100644 --- a/clients/hydra/php/test/Model/HealthStatusTest.php +++ b/clients/hydra/php/test/Model/HealthStatusTest.php @@ -2,7 +2,7 @@ /** * HealthStatusTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testHealthStatus() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testHealthStatus() public function testPropertyStatus() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php b/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php index 0b82fa1bbf7..7e328ab738e 100644 --- a/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php +++ b/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php @@ -2,7 +2,7 @@ /** * IntrospectedOAuth2TokenTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testIntrospectedOAuth2Token() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testIntrospectedOAuth2Token() public function testPropertyActive() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyActive() public function testPropertyAud() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAud() public function testPropertyClientId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyClientId() public function testPropertyExp() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyExp() public function testPropertyExt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyExt() public function testPropertyIat() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyIat() public function testPropertyIss() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyIss() public function testPropertyNbf() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyNbf() public function testPropertyObfuscatedSubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyObfuscatedSubject() public function testPropertyScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyScope() public function testPropertySub() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertySub() public function testPropertyTokenType() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,7 +194,7 @@ public function testPropertyTokenType() public function testPropertyTokenUse() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -203,6 +203,6 @@ public function testPropertyTokenUse() public function testPropertyUsername() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/InlineResponse200Test.php b/clients/hydra/php/test/Model/IsReady200ResponseTest.php similarity index 75% rename from clients/hydra/php/test/Model/InlineResponse200Test.php rename to clients/hydra/php/test/Model/IsReady200ResponseTest.php index 6be7041259d..c7183858121 100644 --- a/clients/hydra/php/test/Model/InlineResponse200Test.php +++ b/clients/hydra/php/test/Model/IsReady200ResponseTest.php @@ -1,8 +1,8 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testInlineResponse200() public function testPropertyStatus() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/InlineResponse503Test.php b/clients/hydra/php/test/Model/IsReady503ResponseTest.php similarity index 75% rename from clients/hydra/php/test/Model/InlineResponse503Test.php rename to clients/hydra/php/test/Model/IsReady503ResponseTest.php index 83309a7b455..855ba3d6540 100644 --- a/clients/hydra/php/test/Model/InlineResponse503Test.php +++ b/clients/hydra/php/test/Model/IsReady503ResponseTest.php @@ -1,8 +1,8 @@ markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testInlineResponse503() public function testPropertyErrors() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/JsonPatchTest.php b/clients/hydra/php/test/Model/JsonPatchTest.php index 3e3dd8a6ff5..7f2e43f2c1e 100644 --- a/clients/hydra/php/test/Model/JsonPatchTest.php +++ b/clients/hydra/php/test/Model/JsonPatchTest.php @@ -2,7 +2,7 @@ /** * JsonPatchTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testJsonPatch() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testJsonPatch() public function testPropertyFrom() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyFrom() public function testPropertyOp() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyOp() public function testPropertyPath() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,6 +113,6 @@ public function testPropertyPath() public function testPropertyValue() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/JsonWebKeySetTest.php b/clients/hydra/php/test/Model/JsonWebKeySetTest.php index 4e68341356a..f090e5a7c9a 100644 --- a/clients/hydra/php/test/Model/JsonWebKeySetTest.php +++ b/clients/hydra/php/test/Model/JsonWebKeySetTest.php @@ -2,7 +2,7 @@ /** * JsonWebKeySetTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testJsonWebKeySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testJsonWebKeySet() public function testPropertyKeys() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/JsonWebKeyTest.php b/clients/hydra/php/test/Model/JsonWebKeyTest.php index d8906deecf3..ae78e264c48 100644 --- a/clients/hydra/php/test/Model/JsonWebKeyTest.php +++ b/clients/hydra/php/test/Model/JsonWebKeyTest.php @@ -2,7 +2,7 @@ /** * JsonWebKeyTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testJsonWebKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testJsonWebKey() public function testPropertyAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAlg() public function testPropertyCrv() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyCrv() public function testPropertyD() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyD() public function testPropertyDp() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyDp() public function testPropertyDq() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyDq() public function testPropertyE() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyE() public function testPropertyK() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyK() public function testPropertyKid() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyKid() public function testPropertyKty() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyKty() public function testPropertyN() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyN() public function testPropertyP() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertyP() public function testPropertyQ() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,7 +194,7 @@ public function testPropertyQ() public function testPropertyQi() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -203,7 +203,7 @@ public function testPropertyQi() public function testPropertyUse() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -212,7 +212,7 @@ public function testPropertyUse() public function testPropertyX() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -221,7 +221,7 @@ public function testPropertyX() public function testPropertyX5c() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -230,6 +230,6 @@ public function testPropertyX5c() public function testPropertyY() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ClientTest.php b/clients/hydra/php/test/Model/OAuth2ClientTest.php index 43e8e36cf73..b28b42a96ae 100644 --- a/clients/hydra/php/test/Model/OAuth2ClientTest.php +++ b/clients/hydra/php/test/Model/OAuth2ClientTest.php @@ -2,7 +2,7 @@ /** * OAuth2ClientTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2Client() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2Client() public function testPropertyAccessTokenStrategy() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAccessTokenStrategy() public function testPropertyAllowedCorsOrigins() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAllowedCorsOrigins() public function testPropertyAudience() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyAudience() public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() public function testPropertyAuthorizationCodeGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyAuthorizationCodeGrantIdTokenLifespan() public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() public function testPropertyBackchannelLogoutSessionRequired() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyBackchannelLogoutSessionRequired() public function testPropertyBackchannelLogoutUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyBackchannelLogoutUri() public function testPropertyClientCredentialsGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyClientCredentialsGrantAccessTokenLifespan() public function testPropertyClientId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyClientId() public function testPropertyClientName() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertyClientName() public function testPropertyClientSecret() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,7 +194,7 @@ public function testPropertyClientSecret() public function testPropertyClientSecretExpiresAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -203,7 +203,7 @@ public function testPropertyClientSecretExpiresAt() public function testPropertyClientUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -212,7 +212,7 @@ public function testPropertyClientUri() public function testPropertyContacts() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -221,7 +221,7 @@ public function testPropertyContacts() public function testPropertyCreatedAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -230,7 +230,7 @@ public function testPropertyCreatedAt() public function testPropertyFrontchannelLogoutSessionRequired() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -239,7 +239,7 @@ public function testPropertyFrontchannelLogoutSessionRequired() public function testPropertyFrontchannelLogoutUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -248,7 +248,7 @@ public function testPropertyFrontchannelLogoutUri() public function testPropertyGrantTypes() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -257,7 +257,7 @@ public function testPropertyGrantTypes() public function testPropertyImplicitGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -266,7 +266,7 @@ public function testPropertyImplicitGrantAccessTokenLifespan() public function testPropertyImplicitGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -275,7 +275,7 @@ public function testPropertyImplicitGrantIdTokenLifespan() public function testPropertyJwks() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -284,7 +284,7 @@ public function testPropertyJwks() public function testPropertyJwksUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -293,7 +293,7 @@ public function testPropertyJwksUri() public function testPropertyJwtBearerGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -302,7 +302,7 @@ public function testPropertyJwtBearerGrantAccessTokenLifespan() public function testPropertyLogoUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -311,7 +311,7 @@ public function testPropertyLogoUri() public function testPropertyMetadata() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -320,7 +320,7 @@ public function testPropertyMetadata() public function testPropertyOwner() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -329,7 +329,7 @@ public function testPropertyOwner() public function testPropertyPolicyUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -338,7 +338,7 @@ public function testPropertyPolicyUri() public function testPropertyPostLogoutRedirectUris() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -347,7 +347,7 @@ public function testPropertyPostLogoutRedirectUris() public function testPropertyRedirectUris() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -356,7 +356,7 @@ public function testPropertyRedirectUris() public function testPropertyRefreshTokenGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -365,7 +365,7 @@ public function testPropertyRefreshTokenGrantAccessTokenLifespan() public function testPropertyRefreshTokenGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -374,7 +374,7 @@ public function testPropertyRefreshTokenGrantIdTokenLifespan() public function testPropertyRefreshTokenGrantRefreshTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -383,7 +383,7 @@ public function testPropertyRefreshTokenGrantRefreshTokenLifespan() public function testPropertyRegistrationAccessToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -392,7 +392,7 @@ public function testPropertyRegistrationAccessToken() public function testPropertyRegistrationClientUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -401,7 +401,7 @@ public function testPropertyRegistrationClientUri() public function testPropertyRequestObjectSigningAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -410,7 +410,7 @@ public function testPropertyRequestObjectSigningAlg() public function testPropertyRequestUris() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -419,7 +419,7 @@ public function testPropertyRequestUris() public function testPropertyResponseTypes() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -428,7 +428,7 @@ public function testPropertyResponseTypes() public function testPropertyScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -437,7 +437,7 @@ public function testPropertyScope() public function testPropertySectorIdentifierUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -446,7 +446,7 @@ public function testPropertySectorIdentifierUri() public function testPropertySkipConsent() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -455,7 +455,7 @@ public function testPropertySkipConsent() public function testPropertySkipLogoutConsent() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -464,7 +464,7 @@ public function testPropertySkipLogoutConsent() public function testPropertySubjectType() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -473,7 +473,7 @@ public function testPropertySubjectType() public function testPropertyTokenEndpointAuthMethod() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -482,7 +482,7 @@ public function testPropertyTokenEndpointAuthMethod() public function testPropertyTokenEndpointAuthSigningAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -491,7 +491,7 @@ public function testPropertyTokenEndpointAuthSigningAlg() public function testPropertyTosUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -500,7 +500,7 @@ public function testPropertyTosUri() public function testPropertyUpdatedAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -509,6 +509,6 @@ public function testPropertyUpdatedAt() public function testPropertyUserinfoSignedResponseAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php b/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php index dd72f2ad7a9..45623e63094 100644 --- a/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php +++ b/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php @@ -2,7 +2,7 @@ /** * OAuth2ClientTokenLifespansTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2ClientTokenLifespans() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2ClientTokenLifespans() public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() public function testPropertyAuthorizationCodeGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAuthorizationCodeGrantIdTokenLifespan() public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() public function testPropertyClientCredentialsGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyClientCredentialsGrantAccessTokenLifespan() public function testPropertyImplicitGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyImplicitGrantAccessTokenLifespan() public function testPropertyImplicitGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyImplicitGrantIdTokenLifespan() public function testPropertyJwtBearerGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyJwtBearerGrantAccessTokenLifespan() public function testPropertyRefreshTokenGrantAccessTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyRefreshTokenGrantAccessTokenLifespan() public function testPropertyRefreshTokenGrantIdTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,6 +167,6 @@ public function testPropertyRefreshTokenGrantIdTokenLifespan() public function testPropertyRefreshTokenGrantRefreshTokenLifespan() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php b/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php index 8de19d6054a..62fcd3de556 100644 --- a/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentRequestOpenIDConnectContextTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2ConsentRequestOpenIDConnectContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2ConsentRequestOpenIDConnectContext() public function testPropertyAcrValues() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAcrValues() public function testPropertyDisplay() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyDisplay() public function testPropertyIdTokenHintClaims() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyIdTokenHintClaims() public function testPropertyLoginHint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,6 +122,6 @@ public function testPropertyLoginHint() public function testPropertyUiLocales() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php b/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php index ae60d311c6f..2ce42c22c3e 100644 --- a/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentRequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2ConsentRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2ConsentRequest() public function testPropertyAcr() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAcr() public function testPropertyAmr() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAmr() public function testPropertyChallenge() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyChallenge() public function testPropertyClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyClient() public function testPropertyContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyContext() public function testPropertyLoginChallenge() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyLoginChallenge() public function testPropertyLoginSessionId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyLoginSessionId() public function testPropertyOidcContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyOidcContext() public function testPropertyRequestUrl() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyRequestUrl() public function testPropertyRequestedAccessTokenAudience() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyRequestedAccessTokenAudience() public function testPropertyRequestedScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertyRequestedScope() public function testPropertySkip() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,6 +194,6 @@ public function testPropertySkip() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php b/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php index dc04d9d64fa..c281e840325 100644 --- a/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentSessionExpiresAtTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2ConsentSessionExpiresAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2ConsentSessionExpiresAt() public function testPropertyAccessToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAccessToken() public function testPropertyAuthorizeCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyAuthorizeCode() public function testPropertyIdToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyIdToken() public function testPropertyParContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,6 +122,6 @@ public function testPropertyParContext() public function testPropertyRefreshToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php b/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php index 4d97ccd9074..3cc2ec68490 100644 --- a/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php @@ -2,7 +2,7 @@ /** * OAuth2ConsentSessionTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2ConsentSession() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2ConsentSession() public function testPropertyConsentRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyConsentRequest() public function testPropertyContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyContext() public function testPropertyExpiresAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyExpiresAt() public function testPropertyGrantAccessTokenAudience() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyGrantAccessTokenAudience() public function testPropertyGrantScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyGrantScope() public function testPropertyHandledAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyHandledAt() public function testPropertyRemember() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyRemember() public function testPropertyRememberFor() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,6 +158,6 @@ public function testPropertyRememberFor() public function testPropertySession() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php b/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php index ae23d75a832..d0a29ee35b4 100644 --- a/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php @@ -2,7 +2,7 @@ /** * OAuth2LoginRequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2LoginRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2LoginRequest() public function testPropertyChallenge() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyChallenge() public function testPropertyClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyClient() public function testPropertyOidcContext() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyOidcContext() public function testPropertyRequestUrl() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyRequestUrl() public function testPropertyRequestedAccessTokenAudience() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyRequestedAccessTokenAudience() public function testPropertyRequestedScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyRequestedScope() public function testPropertySessionId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertySessionId() public function testPropertySkip() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,6 +158,6 @@ public function testPropertySkip() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php b/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php index 74acf4312af..c7c8041eaa8 100644 --- a/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php @@ -2,7 +2,7 @@ /** * OAuth2LogoutRequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2LogoutRequest() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2LogoutRequest() public function testPropertyChallenge() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyChallenge() public function testPropertyClient() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyClient() public function testPropertyRequestUrl() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyRequestUrl() public function testPropertyRpInitiated() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyRpInitiated() public function testPropertySid() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,6 +131,6 @@ public function testPropertySid() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2RedirectToTest.php b/clients/hydra/php/test/Model/OAuth2RedirectToTest.php index c34c144ff0a..4327dda4dd3 100644 --- a/clients/hydra/php/test/Model/OAuth2RedirectToTest.php +++ b/clients/hydra/php/test/Model/OAuth2RedirectToTest.php @@ -2,7 +2,7 @@ /** * OAuth2RedirectToTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2RedirectTo() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testOAuth2RedirectTo() public function testPropertyRedirectTo() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php b/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php index 3264bbce0a8..d26eb5413fb 100644 --- a/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php +++ b/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php @@ -2,7 +2,7 @@ /** * OAuth2TokenExchangeTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOAuth2TokenExchange() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOAuth2TokenExchange() public function testPropertyAccessToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAccessToken() public function testPropertyExpiresIn() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyExpiresIn() public function testPropertyIdToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyIdToken() public function testPropertyRefreshToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyRefreshToken() public function testPropertyScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,6 +131,6 @@ public function testPropertyScope() public function testPropertyTokenType() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OidcConfigurationTest.php b/clients/hydra/php/test/Model/OidcConfigurationTest.php index 2ace7846745..e6593632910 100644 --- a/clients/hydra/php/test/Model/OidcConfigurationTest.php +++ b/clients/hydra/php/test/Model/OidcConfigurationTest.php @@ -2,7 +2,7 @@ /** * OidcConfigurationTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOidcConfiguration() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOidcConfiguration() public function testPropertyAuthorizationEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAuthorizationEndpoint() public function testPropertyBackchannelLogoutSessionSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyBackchannelLogoutSessionSupported() public function testPropertyBackchannelLogoutSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyBackchannelLogoutSupported() public function testPropertyClaimsParameterSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyClaimsParameterSupported() public function testPropertyClaimsSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyClaimsSupported() public function testPropertyCodeChallengeMethodsSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyCodeChallengeMethodsSupported() public function testPropertyCredentialsEndpointDraft00() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyCredentialsEndpointDraft00() public function testPropertyCredentialsSupportedDraft00() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyCredentialsSupportedDraft00() public function testPropertyEndSessionEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyEndSessionEndpoint() public function testPropertyFrontchannelLogoutSessionSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyFrontchannelLogoutSessionSupported() public function testPropertyFrontchannelLogoutSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertyFrontchannelLogoutSupported() public function testPropertyGrantTypesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,7 +194,7 @@ public function testPropertyGrantTypesSupported() public function testPropertyIdTokenSignedResponseAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -203,7 +203,7 @@ public function testPropertyIdTokenSignedResponseAlg() public function testPropertyIdTokenSigningAlgValuesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -212,7 +212,7 @@ public function testPropertyIdTokenSigningAlgValuesSupported() public function testPropertyIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -221,7 +221,7 @@ public function testPropertyIssuer() public function testPropertyJwksUri() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -230,7 +230,7 @@ public function testPropertyJwksUri() public function testPropertyRegistrationEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -239,7 +239,7 @@ public function testPropertyRegistrationEndpoint() public function testPropertyRequestObjectSigningAlgValuesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -248,7 +248,7 @@ public function testPropertyRequestObjectSigningAlgValuesSupported() public function testPropertyRequestParameterSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -257,7 +257,7 @@ public function testPropertyRequestParameterSupported() public function testPropertyRequestUriParameterSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -266,7 +266,7 @@ public function testPropertyRequestUriParameterSupported() public function testPropertyRequireRequestUriRegistration() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -275,7 +275,7 @@ public function testPropertyRequireRequestUriRegistration() public function testPropertyResponseModesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -284,7 +284,7 @@ public function testPropertyResponseModesSupported() public function testPropertyResponseTypesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -293,7 +293,7 @@ public function testPropertyResponseTypesSupported() public function testPropertyRevocationEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -302,7 +302,7 @@ public function testPropertyRevocationEndpoint() public function testPropertyScopesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -311,7 +311,7 @@ public function testPropertyScopesSupported() public function testPropertySubjectTypesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -320,7 +320,7 @@ public function testPropertySubjectTypesSupported() public function testPropertyTokenEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -329,7 +329,7 @@ public function testPropertyTokenEndpoint() public function testPropertyTokenEndpointAuthMethodsSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -338,7 +338,7 @@ public function testPropertyTokenEndpointAuthMethodsSupported() public function testPropertyUserinfoEndpoint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -347,7 +347,7 @@ public function testPropertyUserinfoEndpoint() public function testPropertyUserinfoSignedResponseAlg() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -356,6 +356,6 @@ public function testPropertyUserinfoSignedResponseAlg() public function testPropertyUserinfoSigningAlgValuesSupported() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/OidcUserInfoTest.php b/clients/hydra/php/test/Model/OidcUserInfoTest.php index aaba7a502ba..7f2f4d536a2 100644 --- a/clients/hydra/php/test/Model/OidcUserInfoTest.php +++ b/clients/hydra/php/test/Model/OidcUserInfoTest.php @@ -2,7 +2,7 @@ /** * OidcUserInfoTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testOidcUserInfo() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testOidcUserInfo() public function testPropertyBirthdate() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyBirthdate() public function testPropertyEmail() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyEmail() public function testPropertyEmailVerified() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyEmailVerified() public function testPropertyFamilyName() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyFamilyName() public function testPropertyGender() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyGender() public function testPropertyGivenName() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyGivenName() public function testPropertyLocale() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,7 +149,7 @@ public function testPropertyLocale() public function testPropertyMiddleName() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -158,7 +158,7 @@ public function testPropertyMiddleName() public function testPropertyName() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -167,7 +167,7 @@ public function testPropertyName() public function testPropertyNickname() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -176,7 +176,7 @@ public function testPropertyNickname() public function testPropertyPhoneNumber() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -185,7 +185,7 @@ public function testPropertyPhoneNumber() public function testPropertyPhoneNumberVerified() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -194,7 +194,7 @@ public function testPropertyPhoneNumberVerified() public function testPropertyPicture() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -203,7 +203,7 @@ public function testPropertyPicture() public function testPropertyPreferredUsername() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -212,7 +212,7 @@ public function testPropertyPreferredUsername() public function testPropertyProfile() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -221,7 +221,7 @@ public function testPropertyProfile() public function testPropertySub() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -230,7 +230,7 @@ public function testPropertySub() public function testPropertyUpdatedAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -239,7 +239,7 @@ public function testPropertyUpdatedAt() public function testPropertyWebsite() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -248,6 +248,6 @@ public function testPropertyWebsite() public function testPropertyZoneinfo() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/PaginationHeadersTest.php b/clients/hydra/php/test/Model/PaginationHeadersTest.php index 17cfbcb87a2..7127dec724d 100644 --- a/clients/hydra/php/test/Model/PaginationHeadersTest.php +++ b/clients/hydra/php/test/Model/PaginationHeadersTest.php @@ -2,7 +2,7 @@ /** * PaginationHeadersTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testPaginationHeaders() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testPaginationHeaders() public function testPropertyLink() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyLink() public function testPropertyXTotalCount() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/PaginationTest.php b/clients/hydra/php/test/Model/PaginationTest.php index 91f816f6614..433e70e552a 100644 --- a/clients/hydra/php/test/Model/PaginationTest.php +++ b/clients/hydra/php/test/Model/PaginationTest.php @@ -2,7 +2,7 @@ /** * PaginationTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testPagination() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testPagination() public function testPropertyPageSize() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyPageSize() public function testPropertyPageToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/RFC6749ErrorJsonTest.php b/clients/hydra/php/test/Model/RFC6749ErrorJsonTest.php index faaf583b60b..d2bc8d1fc76 100644 --- a/clients/hydra/php/test/Model/RFC6749ErrorJsonTest.php +++ b/clients/hydra/php/test/Model/RFC6749ErrorJsonTest.php @@ -2,7 +2,7 @@ /** * RFC6749ErrorJsonTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testRFC6749ErrorJson() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testRFC6749ErrorJson() public function testPropertyError() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyError() public function testPropertyErrorDebug() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyErrorDebug() public function testPropertyErrorDescription() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyErrorDescription() public function testPropertyErrorHint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,6 +122,6 @@ public function testPropertyErrorHint() public function testPropertyStatusCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php b/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php index febe3487458..e5b142ebc63 100644 --- a/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php +++ b/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php @@ -2,7 +2,7 @@ /** * RejectOAuth2RequestTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testRejectOAuth2Request() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testRejectOAuth2Request() public function testPropertyError() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyError() public function testPropertyErrorDebug() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyErrorDebug() public function testPropertyErrorDescription() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyErrorDescription() public function testPropertyErrorHint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,6 +122,6 @@ public function testPropertyErrorHint() public function testPropertyStatusCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php b/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php index 5e749eac359..93158eac7fe 100644 --- a/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php +++ b/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php @@ -2,7 +2,7 @@ /** * TokenPaginationHeadersTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTokenPaginationHeaders() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTokenPaginationHeaders() public function testPropertyLink() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyLink() public function testPropertyXTotalCount() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php b/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php index dda63a6ccbc..633524cf2e2 100644 --- a/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php +++ b/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php @@ -2,7 +2,7 @@ /** * TokenPaginationRequestParametersTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTokenPaginationRequestParameters() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTokenPaginationRequestParameters() public function testPropertyPageSize() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyPageSize() public function testPropertyPageToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php b/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php index dc84042b67e..d15de9b4220 100644 --- a/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php +++ b/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php @@ -2,7 +2,7 @@ /** * TokenPaginationResponseHeadersTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTokenPaginationResponseHeaders() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTokenPaginationResponseHeaders() public function testPropertyLink() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyLink() public function testPropertyXTotalCount() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TokenPaginationTest.php b/clients/hydra/php/test/Model/TokenPaginationTest.php index 62dc7832f1e..b54f6caf5b6 100644 --- a/clients/hydra/php/test/Model/TokenPaginationTest.php +++ b/clients/hydra/php/test/Model/TokenPaginationTest.php @@ -2,7 +2,7 @@ /** * TokenPaginationTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTokenPagination() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTokenPagination() public function testPropertyPageSize() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyPageSize() public function testPropertyPageToken() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php b/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php index f8e976972a3..d99a94c3752 100644 --- a/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php +++ b/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php @@ -2,7 +2,7 @@ /** * TrustOAuth2JwtGrantIssuerTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTrustOAuth2JwtGrantIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTrustOAuth2JwtGrantIssuer() public function testPropertyAllowAnySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAllowAnySubject() public function testPropertyExpiresAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyExpiresAt() public function testPropertyIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyIssuer() public function testPropertyJwk() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyJwk() public function testPropertyScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,6 +131,6 @@ public function testPropertyScope() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php index 3b461ece062..f2f5246ee92 100644 --- a/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php +++ b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php @@ -2,7 +2,7 @@ /** * TrustedOAuth2JwtGrantIssuerTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTrustedOAuth2JwtGrantIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTrustedOAuth2JwtGrantIssuer() public function testPropertyAllowAnySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyAllowAnySubject() public function testPropertyCreatedAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyCreatedAt() public function testPropertyExpiresAt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyExpiresAt() public function testPropertyId() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyId() public function testPropertyIssuer() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyIssuer() public function testPropertyPublicKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyPublicKey() public function testPropertyScope() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,6 +149,6 @@ public function testPropertyScope() public function testPropertySubject() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php index a5ecc788604..dfec8ed6809 100644 --- a/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php +++ b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php @@ -2,7 +2,7 @@ /** * TrustedOAuth2JwtGrantJsonWebKeyTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testTrustedOAuth2JwtGrantJsonWebKey() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testTrustedOAuth2JwtGrantJsonWebKey() public function testPropertyKid() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyKid() public function testPropertySet() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/VerifiableCredentialPrimingResponseTest.php b/clients/hydra/php/test/Model/VerifiableCredentialPrimingResponseTest.php index b120051fcf5..66a80dac1e7 100644 --- a/clients/hydra/php/test/Model/VerifiableCredentialPrimingResponseTest.php +++ b/clients/hydra/php/test/Model/VerifiableCredentialPrimingResponseTest.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialPrimingResponseTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testVerifiableCredentialPrimingResponse() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testVerifiableCredentialPrimingResponse() public function testPropertyCNonce() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,7 +95,7 @@ public function testPropertyCNonce() public function testPropertyCNonceExpiresIn() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -104,7 +104,7 @@ public function testPropertyCNonceExpiresIn() public function testPropertyError() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -113,7 +113,7 @@ public function testPropertyError() public function testPropertyErrorDebug() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -122,7 +122,7 @@ public function testPropertyErrorDebug() public function testPropertyErrorDescription() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -131,7 +131,7 @@ public function testPropertyErrorDescription() public function testPropertyErrorHint() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -140,7 +140,7 @@ public function testPropertyErrorHint() public function testPropertyFormat() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -149,6 +149,6 @@ public function testPropertyFormat() public function testPropertyStatusCode() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/VerifiableCredentialProofTest.php b/clients/hydra/php/test/Model/VerifiableCredentialProofTest.php index 9c23dd4002a..3aeb00447a8 100644 --- a/clients/hydra/php/test/Model/VerifiableCredentialProofTest.php +++ b/clients/hydra/php/test/Model/VerifiableCredentialProofTest.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialProofTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testVerifiableCredentialProof() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testVerifiableCredentialProof() public function testPropertyJwt() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyJwt() public function testPropertyProofType() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/VerifiableCredentialResponseTest.php b/clients/hydra/php/test/Model/VerifiableCredentialResponseTest.php index 02e7e7fe16d..ac29f5f6214 100644 --- a/clients/hydra/php/test/Model/VerifiableCredentialResponseTest.php +++ b/clients/hydra/php/test/Model/VerifiableCredentialResponseTest.php @@ -2,7 +2,7 @@ /** * VerifiableCredentialResponseTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testVerifiableCredentialResponse() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,7 +86,7 @@ public function testVerifiableCredentialResponse() public function testPropertyCredentialDraft00() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -95,6 +95,6 @@ public function testPropertyCredentialDraft00() public function testPropertyFormat() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/php/test/Model/VersionTest.php b/clients/hydra/php/test/Model/VersionTest.php index cbbf8993c9d..8b7f036704d 100644 --- a/clients/hydra/php/test/Model/VersionTest.php +++ b/clients/hydra/php/test/Model/VersionTest.php @@ -2,7 +2,7 @@ /** * VersionTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package Ory\Hydra\Client @@ -15,10 +15,10 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.4.0 + * Generator version: 7.7.0 */ /** @@ -77,7 +77,7 @@ public static function tearDownAfterClass(): void public function testVersion() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } /** @@ -86,6 +86,6 @@ public function testVersion() public function testPropertyVersion() { // TODO: implement - $this->markTestIncomplete('Not implemented'); + self::markTestIncomplete('Not implemented'); } } diff --git a/clients/hydra/python/.github/workflows/python.yml b/clients/hydra/python/.github/workflows/python.yml new file mode 100644 index 00000000000..49d1c6139f4 --- /dev/null +++ b/clients/hydra/python/.github/workflows/python.yml @@ -0,0 +1,38 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: ory_hydra_client Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/clients/hydra/python/.gitlab-ci.yml b/clients/hydra/python/.gitlab-ci.yml index 8ff39418c63..3d15c87d8e6 100644 --- a/clients/hydra/python/.gitlab-ci.yml +++ b/clients/hydra/python/.gitlab-ci.yml @@ -1,24 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# # ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.tests: +.pytest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=ory_hydra_client -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests +pytest-3.7: + extends: .pytest image: python:3.7-alpine -test-3.8: - extends: .tests +pytest-3.8: + extends: .pytest image: python:3.8-alpine -test-3.9: - extends: .tests +pytest-3.9: + extends: .pytest image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/clients/hydra/python/.openapi-generator/FILES b/clients/hydra/python/.openapi-generator/FILES index 1b9cbd552af..0c195ab0a02 100644 --- a/clients/hydra/python/.openapi-generator/FILES +++ b/clients/hydra/python/.openapi-generator/FILES @@ -1,3 +1,4 @@ +.github/workflows/python.yml .gitignore .gitlab-ci.yml .openapi-generator-ignore @@ -18,12 +19,10 @@ docs/IntrospectedOAuth2Token.md docs/IsReady200Response.md docs/IsReady503Response.md docs/JsonPatch.md -docs/JsonPatchDocument.md docs/JsonWebKey.md docs/JsonWebKeySet.md docs/JwkApi.md docs/MetadataApi.md -docs/NullDuration.md docs/OAuth2Api.md docs/OAuth2Client.md docs/OAuth2ClientTokenLifespans.md @@ -31,7 +30,6 @@ docs/OAuth2ConsentRequest.md docs/OAuth2ConsentRequestOpenIDConnectContext.md docs/OAuth2ConsentSession.md docs/OAuth2ConsentSessionExpiresAt.md -docs/OAuth2ConsentSessions.md docs/OAuth2LoginRequest.md docs/OAuth2LogoutRequest.md docs/OAuth2RedirectTo.md @@ -43,14 +41,12 @@ docs/Pagination.md docs/PaginationHeaders.md docs/RFC6749ErrorJson.md docs/RejectOAuth2Request.md -docs/StringSliceJSONFormat.md docs/TokenPagination.md docs/TokenPaginationHeaders.md docs/TokenPaginationRequestParameters.md docs/TokenPaginationResponseHeaders.md docs/TrustOAuth2JwtGrantIssuer.md docs/TrustedOAuth2JwtGrantIssuer.md -docs/TrustedOAuth2JwtGrantIssuers.md docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/VerifiableCredentialPrimingResponse.md docs/VerifiableCredentialProof.md @@ -66,62 +62,57 @@ ory_hydra_client/api/o_auth2_api.py ory_hydra_client/api/oidc_api.py ory_hydra_client/api/wellknown_api.py ory_hydra_client/api_client.py -ory_hydra_client/apis/__init__.py +ory_hydra_client/api_response.py ory_hydra_client/configuration.py ory_hydra_client/exceptions.py -ory_hydra_client/model/__init__.py -ory_hydra_client/model/accept_o_auth2_consent_request.py -ory_hydra_client/model/accept_o_auth2_consent_request_session.py -ory_hydra_client/model/accept_o_auth2_login_request.py -ory_hydra_client/model/create_json_web_key_set.py -ory_hydra_client/model/create_verifiable_credential_request_body.py -ory_hydra_client/model/credential_supported_draft00.py -ory_hydra_client/model/error_o_auth2.py -ory_hydra_client/model/generic_error.py -ory_hydra_client/model/get_version200_response.py -ory_hydra_client/model/health_not_ready_status.py -ory_hydra_client/model/health_status.py -ory_hydra_client/model/introspected_o_auth2_token.py -ory_hydra_client/model/is_ready200_response.py -ory_hydra_client/model/is_ready503_response.py -ory_hydra_client/model/json_patch.py -ory_hydra_client/model/json_patch_document.py -ory_hydra_client/model/json_web_key.py -ory_hydra_client/model/json_web_key_set.py -ory_hydra_client/model/null_duration.py -ory_hydra_client/model/o_auth2_client.py -ory_hydra_client/model/o_auth2_client_token_lifespans.py -ory_hydra_client/model/o_auth2_consent_request.py -ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py -ory_hydra_client/model/o_auth2_consent_session.py -ory_hydra_client/model/o_auth2_consent_session_expires_at.py -ory_hydra_client/model/o_auth2_consent_sessions.py -ory_hydra_client/model/o_auth2_login_request.py -ory_hydra_client/model/o_auth2_logout_request.py -ory_hydra_client/model/o_auth2_redirect_to.py -ory_hydra_client/model/o_auth2_token_exchange.py -ory_hydra_client/model/oidc_configuration.py -ory_hydra_client/model/oidc_user_info.py -ory_hydra_client/model/pagination.py -ory_hydra_client/model/pagination_headers.py -ory_hydra_client/model/reject_o_auth2_request.py -ory_hydra_client/model/rfc6749_error_json.py -ory_hydra_client/model/string_slice_json_format.py -ory_hydra_client/model/token_pagination.py -ory_hydra_client/model/token_pagination_headers.py -ory_hydra_client/model/token_pagination_request_parameters.py -ory_hydra_client/model/token_pagination_response_headers.py -ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py -ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py -ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py -ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py -ory_hydra_client/model/verifiable_credential_priming_response.py -ory_hydra_client/model/verifiable_credential_proof.py -ory_hydra_client/model/verifiable_credential_response.py -ory_hydra_client/model/version.py -ory_hydra_client/model_utils.py ory_hydra_client/models/__init__.py +ory_hydra_client/models/accept_o_auth2_consent_request.py +ory_hydra_client/models/accept_o_auth2_consent_request_session.py +ory_hydra_client/models/accept_o_auth2_login_request.py +ory_hydra_client/models/create_json_web_key_set.py +ory_hydra_client/models/create_verifiable_credential_request_body.py +ory_hydra_client/models/credential_supported_draft00.py +ory_hydra_client/models/error_o_auth2.py +ory_hydra_client/models/generic_error.py +ory_hydra_client/models/get_version200_response.py +ory_hydra_client/models/health_not_ready_status.py +ory_hydra_client/models/health_status.py +ory_hydra_client/models/introspected_o_auth2_token.py +ory_hydra_client/models/is_ready200_response.py +ory_hydra_client/models/is_ready503_response.py +ory_hydra_client/models/json_patch.py +ory_hydra_client/models/json_web_key.py +ory_hydra_client/models/json_web_key_set.py +ory_hydra_client/models/o_auth2_client.py +ory_hydra_client/models/o_auth2_client_token_lifespans.py +ory_hydra_client/models/o_auth2_consent_request.py +ory_hydra_client/models/o_auth2_consent_request_open_id_connect_context.py +ory_hydra_client/models/o_auth2_consent_session.py +ory_hydra_client/models/o_auth2_consent_session_expires_at.py +ory_hydra_client/models/o_auth2_login_request.py +ory_hydra_client/models/o_auth2_logout_request.py +ory_hydra_client/models/o_auth2_redirect_to.py +ory_hydra_client/models/o_auth2_token_exchange.py +ory_hydra_client/models/oidc_configuration.py +ory_hydra_client/models/oidc_user_info.py +ory_hydra_client/models/pagination.py +ory_hydra_client/models/pagination_headers.py +ory_hydra_client/models/reject_o_auth2_request.py +ory_hydra_client/models/rfc6749_error_json.py +ory_hydra_client/models/token_pagination.py +ory_hydra_client/models/token_pagination_headers.py +ory_hydra_client/models/token_pagination_request_parameters.py +ory_hydra_client/models/token_pagination_response_headers.py +ory_hydra_client/models/trust_o_auth2_jwt_grant_issuer.py +ory_hydra_client/models/trusted_o_auth2_jwt_grant_issuer.py +ory_hydra_client/models/trusted_o_auth2_jwt_grant_json_web_key.py +ory_hydra_client/models/verifiable_credential_priming_response.py +ory_hydra_client/models/verifiable_credential_proof.py +ory_hydra_client/models/verifiable_credential_response.py +ory_hydra_client/models/version.py +ory_hydra_client/py.typed ory_hydra_client/rest.py +pyproject.toml requirements.txt setup.cfg setup.py @@ -142,12 +133,10 @@ test/test_introspected_o_auth2_token.py test/test_is_ready200_response.py test/test_is_ready503_response.py test/test_json_patch.py -test/test_json_patch_document.py test/test_json_web_key.py test/test_json_web_key_set.py test/test_jwk_api.py test/test_metadata_api.py -test/test_null_duration.py test/test_o_auth2_api.py test/test_o_auth2_client.py test/test_o_auth2_client_token_lifespans.py @@ -155,7 +144,6 @@ test/test_o_auth2_consent_request.py test/test_o_auth2_consent_request_open_id_connect_context.py test/test_o_auth2_consent_session.py test/test_o_auth2_consent_session_expires_at.py -test/test_o_auth2_consent_sessions.py test/test_o_auth2_login_request.py test/test_o_auth2_logout_request.py test/test_o_auth2_redirect_to.py @@ -167,14 +155,12 @@ test/test_pagination.py test/test_pagination_headers.py test/test_reject_o_auth2_request.py test/test_rfc6749_error_json.py -test/test_string_slice_json_format.py test/test_token_pagination.py test/test_token_pagination_headers.py test/test_token_pagination_request_parameters.py test/test_token_pagination_response_headers.py test/test_trust_o_auth2_jwt_grant_issuer.py test/test_trusted_o_auth2_jwt_grant_issuer.py -test/test_trusted_o_auth2_jwt_grant_issuers.py test/test_trusted_o_auth2_jwt_grant_json_web_key.py test/test_verifiable_credential_priming_response.py test/test_verifiable_credential_proof.py diff --git a/clients/hydra/python/.openapi-generator/VERSION b/clients/hydra/python/.openapi-generator/VERSION index 6d54bbd7751..1985849fb58 100644 --- a/clients/hydra/python/.openapi-generator/VERSION +++ b/clients/hydra/python/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/python/README.md b/clients/hydra/python/README.md index 81afe893b44..8d3c3887f40 100644 --- a/clients/hydra/python/README.md +++ b/clients/hydra/python/README.md @@ -4,13 +4,14 @@ Documentation for all of Ory Hydra's APIs. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v2.2.0 -- Package version: v2.2.0 +- API version: v2.2.1 +- Package version: v2.2.1 +- Generator version: 7.7.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python >=3.6 +Python 3.7+ ## Installation & Usage ### pip install @@ -41,20 +42,20 @@ Then import the package: import ory_hydra_client ``` +### Tests + +Execute `pytest` to run the tests. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```python -import time import ory_hydra_client +from ory_hydra_client.rest import ApiException from pprint import pprint -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.json_web_key import JsonWebKey -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -66,20 +67,18 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set ID - create_json_web_key_set = CreateJsonWebKeySet( - alg="alg_example", - kid="kid_example", - use="use_example", - ) # CreateJsonWebKeySet | + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set ID + create_json_web_key_set = ory_hydra_client.CreateJsonWebKeySet() # CreateJsonWebKeySet | try: # Create JSON Web Key api_response = api_instance.create_json_web_key_set(set, create_json_web_key_set) + print("The response of JwkApi->create_json_web_key_set:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except ApiException as e: print("Exception when calling JwkApi->create_json_web_key_set: %s\n" % e) + ``` ## Documentation for API Endpoints @@ -154,17 +153,14 @@ Class | Method | HTTP request | Description - [IsReady200Response](docs/IsReady200Response.md) - [IsReady503Response](docs/IsReady503Response.md) - [JsonPatch](docs/JsonPatch.md) - - [JsonPatchDocument](docs/JsonPatchDocument.md) - [JsonWebKey](docs/JsonWebKey.md) - [JsonWebKeySet](docs/JsonWebKeySet.md) - - [NullDuration](docs/NullDuration.md) - [OAuth2Client](docs/OAuth2Client.md) - [OAuth2ClientTokenLifespans](docs/OAuth2ClientTokenLifespans.md) - [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) - [OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md) - [OAuth2ConsentSession](docs/OAuth2ConsentSession.md) - [OAuth2ConsentSessionExpiresAt](docs/OAuth2ConsentSessionExpiresAt.md) - - [OAuth2ConsentSessions](docs/OAuth2ConsentSessions.md) - [OAuth2LoginRequest](docs/OAuth2LoginRequest.md) - [OAuth2LogoutRequest](docs/OAuth2LogoutRequest.md) - [OAuth2RedirectTo](docs/OAuth2RedirectTo.md) @@ -175,14 +171,12 @@ Class | Method | HTTP request | Description - [PaginationHeaders](docs/PaginationHeaders.md) - [RFC6749ErrorJson](docs/RFC6749ErrorJson.md) - [RejectOAuth2Request](docs/RejectOAuth2Request.md) - - [StringSliceJSONFormat](docs/StringSliceJSONFormat.md) - [TokenPagination](docs/TokenPagination.md) - [TokenPaginationHeaders](docs/TokenPaginationHeaders.md) - [TokenPaginationRequestParameters](docs/TokenPaginationRequestParameters.md) - [TokenPaginationResponseHeaders](docs/TokenPaginationResponseHeaders.md) - [TrustOAuth2JwtGrantIssuer](docs/TrustOAuth2JwtGrantIssuer.md) - [TrustedOAuth2JwtGrantIssuer](docs/TrustedOAuth2JwtGrantIssuer.md) - - [TrustedOAuth2JwtGrantIssuers](docs/TrustedOAuth2JwtGrantIssuers.md) - [TrustedOAuth2JwtGrantJsonWebKey](docs/TrustedOAuth2JwtGrantJsonWebKey.md) - [VerifiableCredentialPrimingResponse](docs/VerifiableCredentialPrimingResponse.md) - [VerifiableCredentialProof](docs/VerifiableCredentialProof.md) @@ -190,20 +184,23 @@ Class | Method | HTTP request | Description - [Version](docs/Version.md) +
## Documentation For Authorization -## basic +Authentication schemes defined for the API: + +### basic - **Type**: HTTP basic authentication - -## bearer + +### bearer - **Type**: Bearer authentication - -## oauth2 + +### oauth2 - **Type**: OAuth - **Flow**: accessCode @@ -219,22 +216,3 @@ Class | Method | HTTP request | Description hi@ory.sh -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in ory_hydra_client.apis and ory_hydra_client.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from ory_hydra_client.api.default_api import DefaultApi` -- `from ory_hydra_client.model.pet import Pet` - -Solution 2: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import ory_hydra_client -from ory_hydra_client.apis import * -from ory_hydra_client.models import * -``` - diff --git a/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md b/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md index 9ee5fc58778..74c1b30d92f 100644 --- a/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md +++ b/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md @@ -2,17 +2,34 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**grant_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**grant_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**context** | **object** | | [optional] +**grant_access_token_audience** | **List[str]** | | [optional] +**grant_scope** | **List[str]** | | [optional] **handled_at** | **datetime** | | [optional] **remember** | **bool** | Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. | [optional] **remember_for** | **int** | RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. | [optional] **session** | [**AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AcceptOAuth2ConsentRequest from a JSON string +accept_o_auth2_consent_request_instance = AcceptOAuth2ConsentRequest.from_json(json) +# print the JSON string representation of the object +print(AcceptOAuth2ConsentRequest.to_json()) + +# convert the object into a dict +accept_o_auth2_consent_request_dict = accept_o_auth2_consent_request_instance.to_dict() +# create an instance of AcceptOAuth2ConsentRequest from a dict +accept_o_auth2_consent_request_from_dict = AcceptOAuth2ConsentRequest.from_dict(accept_o_auth2_consent_request_dict) +``` [[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/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md b/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md index 67e73148d34..26992689dc2 100644 --- a/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md +++ b/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**access_token** | **bool, date, datetime, dict, float, int, list, str, none_type** | AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! | [optional] -**id_token** | **bool, date, datetime, dict, float, int, list, str, none_type** | IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**access_token** | **object** | AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! | [optional] +**id_token** | **object** | IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! | [optional] + +## Example + +```python +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession + +# TODO update the JSON string below +json = "{}" +# create an instance of AcceptOAuth2ConsentRequestSession from a JSON string +accept_o_auth2_consent_request_session_instance = AcceptOAuth2ConsentRequestSession.from_json(json) +# print the JSON string representation of the object +print(AcceptOAuth2ConsentRequestSession.to_json()) +# convert the object into a dict +accept_o_auth2_consent_request_session_dict = accept_o_auth2_consent_request_session_instance.to_dict() +# create an instance of AcceptOAuth2ConsentRequestSession from a dict +accept_o_auth2_consent_request_session_from_dict = AcceptOAuth2ConsentRequestSession.from_dict(accept_o_auth2_consent_request_session_dict) +``` [[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/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md b/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md index d045f240441..81d2e2b0b18 100644 --- a/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md +++ b/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md @@ -2,19 +2,36 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**subject** | **str** | Subject is the user ID of the end-user that authenticated. | **acr** | **str** | ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. | [optional] -**amr** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**amr** | **List[str]** | | [optional] +**context** | **object** | | [optional] **extend_session_lifespan** | **bool** | Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. | [optional] **force_subject_identifier** | **str** | ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. | [optional] **identity_provider_session_id** | **str** | IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout. | [optional] **remember** | **bool** | Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again. | [optional] **remember_for** | **int** | RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie). | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**subject** | **str** | Subject is the user ID of the end-user that authenticated. | + +## Example + +```python +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AcceptOAuth2LoginRequest from a JSON string +accept_o_auth2_login_request_instance = AcceptOAuth2LoginRequest.from_json(json) +# print the JSON string representation of the object +print(AcceptOAuth2LoginRequest.to_json()) +# convert the object into a dict +accept_o_auth2_login_request_dict = accept_o_auth2_login_request_instance.to_dict() +# create an instance of AcceptOAuth2LoginRequest from a dict +accept_o_auth2_login_request_from_dict = AcceptOAuth2LoginRequest.from_dict(accept_o_auth2_login_request_dict) +``` [[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/clients/hydra/python/docs/CreateJsonWebKeySet.md b/clients/hydra/python/docs/CreateJsonWebKeySet.md index ca6b5924ac7..c5a06c02c66 100644 --- a/clients/hydra/python/docs/CreateJsonWebKeySet.md +++ b/clients/hydra/python/docs/CreateJsonWebKeySet.md @@ -3,13 +3,30 @@ Create JSON Web Key Set Request Body ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alg** | **str** | JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. | **kid** | **str** | JSON Web Key ID The Key ID of the key to be created. | **use** | **str** | JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateJsonWebKeySet from a JSON string +create_json_web_key_set_instance = CreateJsonWebKeySet.from_json(json) +# print the JSON string representation of the object +print(CreateJsonWebKeySet.to_json()) + +# convert the object into a dict +create_json_web_key_set_dict = create_json_web_key_set_instance.to_dict() +# create an instance of CreateJsonWebKeySet from a dict +create_json_web_key_set_from_dict = CreateJsonWebKeySet.from_dict(create_json_web_key_set_dict) +``` [[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/clients/hydra/python/docs/CreateVerifiableCredentialRequestBody.md b/clients/hydra/python/docs/CreateVerifiableCredentialRequestBody.md index 1a8049adfca..99434694013 100644 --- a/clients/hydra/python/docs/CreateVerifiableCredentialRequestBody.md +++ b/clients/hydra/python/docs/CreateVerifiableCredentialRequestBody.md @@ -2,13 +2,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **format** | **str** | | [optional] **proof** | [**VerifiableCredentialProof**](VerifiableCredentialProof.md) | | [optional] -**types** | **[str]** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**types** | **List[str]** | | [optional] + +## Example + +```python +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVerifiableCredentialRequestBody from a JSON string +create_verifiable_credential_request_body_instance = CreateVerifiableCredentialRequestBody.from_json(json) +# print the JSON string representation of the object +print(CreateVerifiableCredentialRequestBody.to_json()) +# convert the object into a dict +create_verifiable_credential_request_body_dict = create_verifiable_credential_request_body_instance.to_dict() +# create an instance of CreateVerifiableCredentialRequestBody from a dict +create_verifiable_credential_request_body_from_dict = CreateVerifiableCredentialRequestBody.from_dict(create_verifiable_credential_request_body_dict) +``` [[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/clients/hydra/python/docs/CredentialSupportedDraft00.md b/clients/hydra/python/docs/CredentialSupportedDraft00.md index 6b82f858b6a..2627e2aec6a 100644 --- a/clients/hydra/python/docs/CredentialSupportedDraft00.md +++ b/clients/hydra/python/docs/CredentialSupportedDraft00.md @@ -3,14 +3,31 @@ Includes information about the supported verifiable credentials. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cryptographic_binding_methods_supported** | **[str]** | OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. | [optional] -**cryptographic_suites_supported** | **[str]** | OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof. | [optional] +**cryptographic_binding_methods_supported** | **List[str]** | OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. | [optional] +**cryptographic_suites_supported** | **List[str]** | OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof. | [optional] **format** | **str** | OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server. | [optional] -**types** | **[str]** | OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**types** | **List[str]** | OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported. | [optional] + +## Example + +```python +from ory_hydra_client.models.credential_supported_draft00 import CredentialSupportedDraft00 + +# TODO update the JSON string below +json = "{}" +# create an instance of CredentialSupportedDraft00 from a JSON string +credential_supported_draft00_instance = CredentialSupportedDraft00.from_json(json) +# print the JSON string representation of the object +print(CredentialSupportedDraft00.to_json()) +# convert the object into a dict +credential_supported_draft00_dict = credential_supported_draft00_instance.to_dict() +# create an instance of CredentialSupportedDraft00 from a dict +credential_supported_draft00_from_dict = CredentialSupportedDraft00.from_dict(credential_supported_draft00_dict) +``` [[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/clients/hydra/python/docs/ErrorOAuth2.md b/clients/hydra/python/docs/ErrorOAuth2.md index bb033ec96cf..4ed053165d3 100644 --- a/clients/hydra/python/docs/ErrorOAuth2.md +++ b/clients/hydra/python/docs/ErrorOAuth2.md @@ -3,6 +3,7 @@ Error ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **str** | Error | [optional] @@ -10,8 +11,24 @@ Name | Type | Description | Notes **error_description** | **str** | Error Description | [optional] **error_hint** | **str** | Error Hint Helps the user identify the error cause. | [optional] **status_code** | **int** | HTTP Status Code | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 + +# TODO update the JSON string below +json = "{}" +# create an instance of ErrorOAuth2 from a JSON string +error_o_auth2_instance = ErrorOAuth2.from_json(json) +# print the JSON string representation of the object +print(ErrorOAuth2.to_json()) + +# convert the object into a dict +error_o_auth2_dict = error_o_auth2_instance.to_dict() +# create an instance of ErrorOAuth2 from a dict +error_o_auth2_from_dict = ErrorOAuth2.from_dict(error_o_auth2_dict) +``` [[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/clients/hydra/python/docs/GenericError.md b/clients/hydra/python/docs/GenericError.md index a19b4a53c54..a409cc2ccc2 100644 --- a/clients/hydra/python/docs/GenericError.md +++ b/clients/hydra/python/docs/GenericError.md @@ -2,18 +2,35 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | Error message The error's message. | **code** | **int** | The status code | [optional] **debug** | **str** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] -**details** | **bool, date, datetime, dict, float, int, list, str, none_type** | Further error details | [optional] +**details** | **object** | Further error details | [optional] **id** | **str** | The error ID Useful when trying to identify various errors in application logic. | [optional] +**message** | **str** | Error message The error's message. | **reason** | **str** | A human-readable reason for the error | [optional] **request** | **str** | The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional] **status** | **str** | The status description | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.generic_error import GenericError + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericError from a JSON string +generic_error_instance = GenericError.from_json(json) +# print the JSON string representation of the object +print(GenericError.to_json()) + +# convert the object into a dict +generic_error_dict = generic_error_instance.to_dict() +# create an instance of GenericError from a dict +generic_error_from_dict = GenericError.from_dict(generic_error_dict) +``` [[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/clients/hydra/python/docs/GetVersion200Response.md b/clients/hydra/python/docs/GetVersion200Response.md index c9374458a6e..a329ab00768 100644 --- a/clients/hydra/python/docs/GetVersion200Response.md +++ b/clients/hydra/python/docs/GetVersion200Response.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **version** | **str** | The version of Ory Hydra. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.get_version200_response import GetVersion200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetVersion200Response from a JSON string +get_version200_response_instance = GetVersion200Response.from_json(json) +# print the JSON string representation of the object +print(GetVersion200Response.to_json()) + +# convert the object into a dict +get_version200_response_dict = get_version200_response_instance.to_dict() +# create an instance of GetVersion200Response from a dict +get_version200_response_from_dict = GetVersion200Response.from_dict(get_version200_response_dict) +``` [[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/clients/hydra/python/docs/HealthNotReadyStatus.md b/clients/hydra/python/docs/HealthNotReadyStatus.md index aa07355f725..ff6942aed3f 100644 --- a/clients/hydra/python/docs/HealthNotReadyStatus.md +++ b/clients/hydra/python/docs/HealthNotReadyStatus.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | **{str: (str,)}** | Errors contains a list of errors that caused the not ready status. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**errors** | **Dict[str, str]** | Errors contains a list of errors that caused the not ready status. | [optional] + +## Example + +```python +from ory_hydra_client.models.health_not_ready_status import HealthNotReadyStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of HealthNotReadyStatus from a JSON string +health_not_ready_status_instance = HealthNotReadyStatus.from_json(json) +# print the JSON string representation of the object +print(HealthNotReadyStatus.to_json()) +# convert the object into a dict +health_not_ready_status_dict = health_not_ready_status_instance.to_dict() +# create an instance of HealthNotReadyStatus from a dict +health_not_ready_status_from_dict = HealthNotReadyStatus.from_dict(health_not_ready_status_dict) +``` [[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/clients/hydra/python/docs/HealthStatus.md b/clients/hydra/python/docs/HealthStatus.md index 384cb15f2e5..5dd59cc892a 100644 --- a/clients/hydra/python/docs/HealthStatus.md +++ b/clients/hydra/python/docs/HealthStatus.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **str** | Status always contains \"ok\". | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.health_status import HealthStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of HealthStatus from a JSON string +health_status_instance = HealthStatus.from_json(json) +# print the JSON string representation of the object +print(HealthStatus.to_json()) + +# convert the object into a dict +health_status_dict = health_status_instance.to_dict() +# create an instance of HealthStatus from a dict +health_status_from_dict = HealthStatus.from_dict(health_status_dict) +``` [[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/clients/hydra/python/docs/IntrospectedOAuth2Token.md b/clients/hydra/python/docs/IntrospectedOAuth2Token.md index 7ddf6dd81f2..8dba6f39bca 100644 --- a/clients/hydra/python/docs/IntrospectedOAuth2Token.md +++ b/clients/hydra/python/docs/IntrospectedOAuth2Token.md @@ -3,13 +3,14 @@ Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). | -**aud** | **[str]** | Audience contains a list of the token's intended audiences. | [optional] +**aud** | **List[str]** | Audience contains a list of the token's intended audiences. | [optional] **client_id** | **str** | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] **exp** | **int** | Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. | [optional] -**ext** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Extra is arbitrary data set by the session. | [optional] +**ext** | **Dict[str, object]** | Extra is arbitrary data set by the session. | [optional] **iat** | **int** | Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. | [optional] **iss** | **str** | IssuerURL is a string representing the issuer of this token | [optional] **nbf** | **int** | NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before. | [optional] @@ -19,8 +20,24 @@ Name | Type | Description | Notes **token_type** | **str** | TokenType is the introspected token's type, typically `Bearer`. | [optional] **token_use** | **str** | TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. | [optional] **username** | **str** | Username is a human-readable identifier for the resource owner who authorized this token. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token + +# TODO update the JSON string below +json = "{}" +# create an instance of IntrospectedOAuth2Token from a JSON string +introspected_o_auth2_token_instance = IntrospectedOAuth2Token.from_json(json) +# print the JSON string representation of the object +print(IntrospectedOAuth2Token.to_json()) + +# convert the object into a dict +introspected_o_auth2_token_dict = introspected_o_auth2_token_instance.to_dict() +# create an instance of IntrospectedOAuth2Token from a dict +introspected_o_auth2_token_from_dict = IntrospectedOAuth2Token.from_dict(introspected_o_auth2_token_dict) +``` [[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/clients/hydra/python/docs/IsReady200Response.md b/clients/hydra/python/docs/IsReady200Response.md index 6779f16c8f0..85d9204cd9a 100644 --- a/clients/hydra/python/docs/IsReady200Response.md +++ b/clients/hydra/python/docs/IsReady200Response.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **str** | Always \"ok\". | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.is_ready200_response import IsReady200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of IsReady200Response from a JSON string +is_ready200_response_instance = IsReady200Response.from_json(json) +# print the JSON string representation of the object +print(IsReady200Response.to_json()) + +# convert the object into a dict +is_ready200_response_dict = is_ready200_response_instance.to_dict() +# create an instance of IsReady200Response from a dict +is_ready200_response_from_dict = IsReady200Response.from_dict(is_ready200_response_dict) +``` [[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/clients/hydra/python/docs/IsReady503Response.md b/clients/hydra/python/docs/IsReady503Response.md index 14da832c2f2..8500edad7d0 100644 --- a/clients/hydra/python/docs/IsReady503Response.md +++ b/clients/hydra/python/docs/IsReady503Response.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | **{str: (str,)}** | Errors contains a list of errors that caused the not ready status. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**errors** | **Dict[str, str]** | Errors contains a list of errors that caused the not ready status. | [optional] + +## Example + +```python +from ory_hydra_client.models.is_ready503_response import IsReady503Response + +# TODO update the JSON string below +json = "{}" +# create an instance of IsReady503Response from a JSON string +is_ready503_response_instance = IsReady503Response.from_json(json) +# print the JSON string representation of the object +print(IsReady503Response.to_json()) +# convert the object into a dict +is_ready503_response_dict = is_ready503_response_instance.to_dict() +# create an instance of IsReady503Response from a dict +is_ready503_response_from_dict = IsReady503Response.from_dict(is_ready503_response_dict) +``` [[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/clients/hydra/python/docs/JsonPatch.md b/clients/hydra/python/docs/JsonPatch.md index 124571848e6..5467ce2d21d 100644 --- a/clients/hydra/python/docs/JsonPatch.md +++ b/clients/hydra/python/docs/JsonPatch.md @@ -3,14 +3,31 @@ A JSONPatch document as defined by RFC 6902 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**var_from** | **str** | This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] **op** | **str** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | **path** | **str** | The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | -**_from** | **str** | This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] -**value** | **bool, date, datetime, dict, float, int, list, str, none_type** | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**value** | **object** | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] + +## Example + +```python +from ory_hydra_client.models.json_patch import JsonPatch + +# TODO update the JSON string below +json = "{}" +# create an instance of JsonPatch from a JSON string +json_patch_instance = JsonPatch.from_json(json) +# print the JSON string representation of the object +print(JsonPatch.to_json()) +# convert the object into a dict +json_patch_dict = json_patch_instance.to_dict() +# create an instance of JsonPatch from a dict +json_patch_from_dict = JsonPatch.from_dict(json_patch_dict) +``` [[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/clients/hydra/python/docs/JsonPatchDocument.md b/clients/hydra/python/docs/JsonPatchDocument.md deleted file mode 100644 index 324e59273f4..00000000000 --- a/clients/hydra/python/docs/JsonPatchDocument.md +++ /dev/null @@ -1,12 +0,0 @@ -# JsonPatchDocument - -A JSONPatchDocument request - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**[JsonPatch]**](JsonPatch.md) | A JSONPatchDocument request | - -[[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/clients/hydra/python/docs/JsonWebKey.md b/clients/hydra/python/docs/JsonWebKey.md index f48785e0c51..046d26cd385 100644 --- a/clients/hydra/python/docs/JsonWebKey.md +++ b/clients/hydra/python/docs/JsonWebKey.md @@ -2,27 +2,44 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alg** | **str** | The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. | -**kid** | **str** | The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. | -**kty** | **str** | The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. | -**use** | **str** | Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). | **crv** | **str** | | [optional] **d** | **str** | | [optional] **dp** | **str** | | [optional] **dq** | **str** | | [optional] **e** | **str** | | [optional] **k** | **str** | | [optional] +**kid** | **str** | The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. | +**kty** | **str** | The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. | **n** | **str** | | [optional] **p** | **str** | | [optional] **q** | **str** | | [optional] **qi** | **str** | | [optional] +**use** | **str** | Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). | **x** | **str** | | [optional] -**x5c** | **[str]** | The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. | [optional] +**x5c** | **List[str]** | The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. | [optional] **y** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.json_web_key import JsonWebKey + +# TODO update the JSON string below +json = "{}" +# create an instance of JsonWebKey from a JSON string +json_web_key_instance = JsonWebKey.from_json(json) +# print the JSON string representation of the object +print(JsonWebKey.to_json()) + +# convert the object into a dict +json_web_key_dict = json_web_key_instance.to_dict() +# create an instance of JsonWebKey from a dict +json_web_key_from_dict = JsonWebKey.from_dict(json_web_key_dict) +``` [[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/clients/hydra/python/docs/JsonWebKeySet.md b/clients/hydra/python/docs/JsonWebKeySet.md index 8d25e2b7a19..407659ec10c 100644 --- a/clients/hydra/python/docs/JsonWebKeySet.md +++ b/clients/hydra/python/docs/JsonWebKeySet.md @@ -3,11 +3,28 @@ JSON Web Key Set ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keys** | [**[JsonWebKey]**](JsonWebKey.md) | List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**keys** | [**List[JsonWebKey]**](JsonWebKey.md) | List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. | [optional] + +## Example + +```python +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet + +# TODO update the JSON string below +json = "{}" +# create an instance of JsonWebKeySet from a JSON string +json_web_key_set_instance = JsonWebKeySet.from_json(json) +# print the JSON string representation of the object +print(JsonWebKeySet.to_json()) +# convert the object into a dict +json_web_key_set_dict = json_web_key_set_instance.to_dict() +# create an instance of JsonWebKeySet from a dict +json_web_key_set_from_dict = JsonWebKeySet.from_dict(json_web_key_set_dict) +``` [[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/clients/hydra/python/docs/JwkApi.md b/clients/hydra/python/docs/JwkApi.md index 138068dd263..a0a16fd53cb 100644 --- a/clients/hydra/python/docs/JwkApi.md +++ b/clients/hydra/python/docs/JwkApi.md @@ -24,13 +24,12 @@ This endpoint is capable of generating JSON Web Key Sets for you. There a differ ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -39,32 +38,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set ID - create_json_web_key_set = CreateJsonWebKeySet( - alg="alg_example", - kid="kid_example", - use="use_example", - ) # CreateJsonWebKeySet | - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set ID + create_json_web_key_set = ory_hydra_client.CreateJsonWebKeySet() # CreateJsonWebKeySet | + try: # Create JSON Web Key api_response = api_instance.create_json_web_key_set(set, create_json_web_key_set) + print("The response of JwkApi->create_json_web_key_set:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->create_json_web_key_set: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| The JSON Web Key Set ID | - **create_json_web_key_set** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md)| | + **set** | **str**| The JSON Web Key Set ID | + **create_json_web_key_set** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md)| | ### Return type @@ -79,7 +76,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -100,11 +96,10 @@ Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a Ja ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -113,27 +108,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set - kid = "kid_example" # str | The JSON Web Key ID (kid) + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set + kid = 'kid_example' # str | The JSON Web Key ID (kid) - # example passing only required values which don't have defaults set try: # Delete JSON Web Key api_instance.delete_json_web_key(set, kid) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->delete_json_web_key: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| The JSON Web Key Set | - **kid** | **str**| The JSON Web Key ID (kid) | + **set** | **str**| The JSON Web Key Set | + **kid** | **str**| The JSON Web Key ID (kid) | ### Return type @@ -148,7 +144,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -169,11 +164,10 @@ Use this endpoint to delete a complete JSON Web Key Set and all the keys in that ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -182,25 +176,26 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set - # example passing only required values which don't have defaults set try: # Delete JSON Web Key Set api_instance.delete_json_web_key_set(set) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->delete_json_web_key_set: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| The JSON Web Key Set | + **set** | **str**| The JSON Web Key Set | ### Return type @@ -215,7 +210,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -236,12 +230,11 @@ This endpoint returns a singular JSON Web Key contained in a set. It is identifi ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -250,28 +243,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | JSON Web Key Set ID - kid = "kid_example" # str | JSON Web Key ID + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | JSON Web Key Set ID + kid = 'kid_example' # str | JSON Web Key ID - # example passing only required values which don't have defaults set try: # Get JSON Web Key api_response = api_instance.get_json_web_key(set, kid) + print("The response of JwkApi->get_json_web_key:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->get_json_web_key: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| JSON Web Key Set ID | - **kid** | **str**| JSON Web Key ID | + **set** | **str**| JSON Web Key Set ID | + **kid** | **str**| JSON Web Key ID | ### Return type @@ -286,7 +281,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -307,12 +301,11 @@ This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -321,26 +314,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | JSON Web Key Set ID + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | JSON Web Key Set ID - # example passing only required values which don't have defaults set try: # Retrieve a JSON Web Key Set api_response = api_instance.get_json_web_key_set(set) + print("The response of JwkApi->get_json_web_key_set:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->get_json_web_key_set: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| JSON Web Key Set ID | + **set** | **str**| JSON Web Key Set ID | ### Return type @@ -355,7 +350,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -366,7 +360,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_json_web_key** -> JsonWebKey set_json_web_key(set, kid) +> JsonWebKey set_json_web_key(set, kid, json_web_key=json_web_key) Set JSON Web Key @@ -376,12 +370,11 @@ Use this method if you do not want to let Hydra generate the JWKs for you, but i ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.json_web_key import JsonWebKey +from ory_hydra_client.models.json_web_key import JsonWebKey +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -390,59 +383,32 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set ID - kid = "kid_example" # str | JSON Web Key ID - json_web_key = JsonWebKey( - alg="RS256", - crv="P-256", - d="T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE", - dp="G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0", - dq="s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk", - e="AQAB", - k="GawgguFyGrWKav7AX4VKUg", - kid="1603dfe0af8f4596", - kty="RSA", - n="vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0", - p="6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ", - q="0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ", - qi="GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU", - use="sig", - x="f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU", - x5c=[ - "x5c_example", - ], - y="x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0", - ) # JsonWebKey | (optional) - - # example passing only required values which don't have defaults set - try: - # Set JSON Web Key - api_response = api_instance.set_json_web_key(set, kid) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling JwkApi->set_json_web_key: %s\n" % e) + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set ID + kid = 'kid_example' # str | JSON Web Key ID + json_web_key = ory_hydra_client.JsonWebKey() # JsonWebKey | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Set JSON Web Key api_response = api_instance.set_json_web_key(set, kid, json_web_key=json_web_key) + print("The response of JwkApi->set_json_web_key:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->set_json_web_key: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| The JSON Web Key Set ID | - **kid** | **str**| JSON Web Key ID | - **json_web_key** | [**JsonWebKey**](JsonWebKey.md)| | [optional] + **set** | **str**| The JSON Web Key Set ID | + **kid** | **str**| JSON Web Key ID | + **json_web_key** | [**JsonWebKey**](JsonWebKey.md)| | [optional] ### Return type @@ -457,7 +423,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -468,7 +433,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_json_web_key_set** -> JsonWebKeySet set_json_web_key_set(set) +> JsonWebKeySet set_json_web_key_set(set, json_web_key_set=json_web_key_set) Update a JSON Web Key Set @@ -478,12 +443,11 @@ Use this method if you do not want to let Hydra generate the JWKs for you, but i ```python -import time import ory_hydra_client -from ory_hydra_client.api import jwk_api -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -492,61 +456,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = jwk_api.JwkApi(api_client) - set = "set_example" # str | The JSON Web Key Set ID - json_web_key_set = JsonWebKeySet( - keys=[ - JsonWebKey( - alg="RS256", - crv="P-256", - d="T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE", - dp="G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0", - dq="s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk", - e="AQAB", - k="GawgguFyGrWKav7AX4VKUg", - kid="1603dfe0af8f4596", - kty="RSA", - n="vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0", - p="6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ", - q="0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ", - qi="GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU", - use="sig", - x="f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU", - x5c=[ - "x5c_example", - ], - y="x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0", - ), - ], - ) # JsonWebKeySet | (optional) - - # example passing only required values which don't have defaults set - try: - # Update a JSON Web Key Set - api_response = api_instance.set_json_web_key_set(set) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling JwkApi->set_json_web_key_set: %s\n" % e) + api_instance = ory_hydra_client.JwkApi(api_client) + set = 'set_example' # str | The JSON Web Key Set ID + json_web_key_set = ory_hydra_client.JsonWebKeySet() # JsonWebKeySet | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update a JSON Web Key Set api_response = api_instance.set_json_web_key_set(set, json_web_key_set=json_web_key_set) + print("The response of JwkApi->set_json_web_key_set:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling JwkApi->set_json_web_key_set: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **set** | **str**| The JSON Web Key Set ID | - **json_web_key_set** | [**JsonWebKeySet**](JsonWebKeySet.md)| | [optional] + **set** | **str**| The JSON Web Key Set ID | + **json_web_key_set** | [**JsonWebKeySet**](JsonWebKeySet.md)| | [optional] ### Return type @@ -561,7 +494,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/clients/hydra/python/docs/MetadataApi.md b/clients/hydra/python/docs/MetadataApi.md index 8f04f6feeb7..4f5f240fe50 100644 --- a/clients/hydra/python/docs/MetadataApi.md +++ b/clients/hydra/python/docs/MetadataApi.md @@ -20,11 +20,11 @@ This endpoint returns the version of Ory Hydra. If the service supports TLS Edg ```python -import time import ory_hydra_client -from ory_hydra_client.api import metadata_api -from ory_hydra_client.model.get_version200_response import GetVersion200Response +from ory_hydra_client.models.get_version200_response import GetVersion200Response +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -33,21 +33,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) + api_instance = ory_hydra_client.MetadataApi(api_client) - # example, this endpoint has no required or optional parameters try: # Return Running Software Version. api_response = api_instance.get_version() + print("The response of MetadataApi->get_version:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling MetadataApi->get_version: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -63,7 +65,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -83,12 +84,11 @@ This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incomin ```python -import time import ory_hydra_client -from ory_hydra_client.api import metadata_api -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.health_status import HealthStatus +from ory_hydra_client.models.health_status import HealthStatus +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -97,21 +97,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) + api_instance = ory_hydra_client.MetadataApi(api_client) - # example, this endpoint has no required or optional parameters try: # Check HTTP Server Status api_response = api_instance.is_alive() + print("The response of MetadataApi->is_alive:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling MetadataApi->is_alive: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -127,7 +129,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -148,12 +149,11 @@ This endpoint returns a HTTP 200 status code when Ory Hydra is up running and th ```python -import time import ory_hydra_client -from ory_hydra_client.api import metadata_api -from ory_hydra_client.model.is_ready503_response import IsReady503Response -from ory_hydra_client.model.is_ready200_response import IsReady200Response +from ory_hydra_client.models.is_ready200_response import IsReady200Response +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -162,21 +162,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) + api_instance = ory_hydra_client.MetadataApi(api_client) - # example, this endpoint has no required or optional parameters try: # Check HTTP Server and Database Status api_response = api_instance.is_ready() + print("The response of MetadataApi->is_ready:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling MetadataApi->is_ready: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -192,7 +194,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/clients/hydra/python/docs/NullDuration.md b/clients/hydra/python/docs/NullDuration.md deleted file mode 100644 index 65a91ffce58..00000000000 --- a/clients/hydra/python/docs/NullDuration.md +++ /dev/null @@ -1,11 +0,0 @@ -# NullDuration - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | | - -[[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/clients/hydra/python/docs/OAuth2Api.md b/clients/hydra/python/docs/OAuth2Api.md index 3a2d9ea5032..4e0a1b39a7f 100644 --- a/clients/hydra/python/docs/OAuth2Api.md +++ b/clients/hydra/python/docs/OAuth2Api.md @@ -35,7 +35,7 @@ Method | HTTP request | Description # **accept_o_auth2_consent_request** -> OAuth2RedirectTo accept_o_auth2_consent_request(consent_challenge) +> OAuth2RedirectTo accept_o_auth2_consent_request(consent_challenge, accept_o_auth2_consent_request=accept_o_auth2_consent_request) Accept OAuth 2.0 Consent Request @@ -45,13 +45,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -60,52 +59,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - consent_challenge = "consent_challenge_example" # str | OAuth 2.0 Consent Request Challenge - accept_o_auth2_consent_request = AcceptOAuth2ConsentRequest( - context=None, - grant_access_token_audience=StringSliceJSONFormat([ - "grant_access_token_audience_example", - ]), - grant_scope=StringSliceJSONFormat([ - "grant_scope_example", - ]), - handled_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - remember=True, - remember_for=1, - session=AcceptOAuth2ConsentRequestSession( - access_token=None, - id_token=None, - ), - ) # AcceptOAuth2ConsentRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Accept OAuth 2.0 Consent Request - api_response = api_instance.accept_o_auth2_consent_request(consent_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->accept_o_auth2_consent_request: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + consent_challenge = 'consent_challenge_example' # str | OAuth 2.0 Consent Request Challenge + accept_o_auth2_consent_request = ory_hydra_client.AcceptOAuth2ConsentRequest() # AcceptOAuth2ConsentRequest | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Accept OAuth 2.0 Consent Request api_response = api_instance.accept_o_auth2_consent_request(consent_challenge, accept_o_auth2_consent_request=accept_o_auth2_consent_request) + print("The response of OAuth2Api->accept_o_auth2_consent_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->accept_o_auth2_consent_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | - **accept_o_auth2_consent_request** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md)| | [optional] + **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | + **accept_o_auth2_consent_request** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md)| | [optional] ### Return type @@ -120,7 +97,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -131,7 +107,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **accept_o_auth2_login_request** -> OAuth2RedirectTo accept_o_auth2_login_request(login_challenge) +> OAuth2RedirectTo accept_o_auth2_login_request(login_challenge, accept_o_auth2_login_request=accept_o_auth2_login_request) Accept OAuth 2.0 Login Request @@ -141,13 +117,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -156,49 +131,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - login_challenge = "login_challenge_example" # str | OAuth 2.0 Login Request Challenge - accept_o_auth2_login_request = AcceptOAuth2LoginRequest( - acr="acr_example", - amr=StringSliceJSONFormat([ - "amr_example", - ]), - context=None, - extend_session_lifespan=True, - force_subject_identifier="force_subject_identifier_example", - identity_provider_session_id="identity_provider_session_id_example", - remember=True, - remember_for=1, - subject="subject_example", - ) # AcceptOAuth2LoginRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Accept OAuth 2.0 Login Request - api_response = api_instance.accept_o_auth2_login_request(login_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->accept_o_auth2_login_request: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + login_challenge = 'login_challenge_example' # str | OAuth 2.0 Login Request Challenge + accept_o_auth2_login_request = ory_hydra_client.AcceptOAuth2LoginRequest() # AcceptOAuth2LoginRequest | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Accept OAuth 2.0 Login Request api_response = api_instance.accept_o_auth2_login_request(login_challenge, accept_o_auth2_login_request=accept_o_auth2_login_request) + print("The response of OAuth2Api->accept_o_auth2_login_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->accept_o_auth2_login_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | - **accept_o_auth2_login_request** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md)| | [optional] + **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | + **accept_o_auth2_login_request** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md)| | [optional] ### Return type @@ -213,7 +169,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -234,12 +189,11 @@ When a user or an application requests Ory OAuth 2.0 to remove the session state ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -248,26 +202,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - logout_challenge = "logout_challenge_example" # str | OAuth 2.0 Logout Request Challenge + api_instance = ory_hydra_client.OAuth2Api(api_client) + logout_challenge = 'logout_challenge_example' # str | OAuth 2.0 Logout Request Challenge - # example passing only required values which don't have defaults set try: # Accept OAuth 2.0 Session Logout Request api_response = api_instance.accept_o_auth2_logout_request(logout_challenge) + print("The response of OAuth2Api->accept_o_auth2_logout_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->accept_o_auth2_logout_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| OAuth 2.0 Logout Request Challenge | + **logout_challenge** | **str**| OAuth 2.0 Logout Request Challenge | ### Return type @@ -282,7 +238,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -303,12 +258,11 @@ Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, o ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -317,91 +271,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - o_auth2_client = OAuth2Client( - access_token_strategy="access_token_strategy_example", - allowed_cors_origins=StringSliceJSONFormat([ - "allowed_cors_origins_example", - ]), - audience=StringSliceJSONFormat([ - "audience_example", - ]), - authorization_code_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - client_credentials_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - client_id="client_id_example", - client_name="client_name_example", - client_secret="client_secret_example", - client_secret_expires_at=1, - client_uri="client_uri_example", - contacts=StringSliceJSONFormat([ - "contacts_example", - ]), - created_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - frontchannel_logout_session_required=True, - frontchannel_logout_uri="frontchannel_logout_uri_example", - grant_types=StringSliceJSONFormat([ - "grant_types_example", - ]), - implicit_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - jwks=None, - jwks_uri="jwks_uri_example", - jwt_bearer_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - logo_uri="logo_uri_example", - metadata=None, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSliceJSONFormat([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSliceJSONFormat([ - "redirect_uris_example", - ]), - refresh_token_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - registration_access_token="registration_access_token_example", - registration_client_uri="registration_client_uri_example", - request_object_signing_alg="request_object_signing_alg_example", - request_uris=StringSliceJSONFormat([ - "request_uris_example", - ]), - response_types=StringSliceJSONFormat([ - "response_types_example", - ]), - scope="scope1 scope-2 scope.3 scope:4", - sector_identifier_uri="sector_identifier_uri_example", - skip_consent=True, - skip_logout_consent=True, - subject_type="subject_type_example", - token_endpoint_auth_method="client_secret_basic", - token_endpoint_auth_signing_alg="token_endpoint_auth_signing_alg_example", - tos_uri="tos_uri_example", - updated_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - userinfo_signed_response_alg="userinfo_signed_response_alg_example", - ) # OAuth2Client | OAuth 2.0 Client Request Body - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.OAuth2Api(api_client) + o_auth2_client = ory_hydra_client.OAuth2Client() # OAuth2Client | OAuth 2.0 Client Request Body + try: # Create OAuth 2.0 Client api_response = api_instance.create_o_auth2_client(o_auth2_client) + print("The response of OAuth2Api->create_o_auth2_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->create_o_auth2_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | ### Return type @@ -416,7 +307,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -438,11 +328,10 @@ Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to pe ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.generic_error import GenericError +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -451,25 +340,26 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | The id of the OAuth 2.0 Client. - # example passing only required values which don't have defaults set try: # Delete OAuth 2.0 Client api_instance.delete_o_auth2_client(id) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->delete_o_auth2_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | + **id** | **str**| The id of the OAuth 2.0 Client. | ### Return type @@ -484,7 +374,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -505,11 +394,10 @@ This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from th ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -518,25 +406,26 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - client_id = "client_id_example" # str | OAuth 2.0 Client ID + api_instance = ory_hydra_client.OAuth2Api(api_client) + client_id = 'client_id_example' # str | OAuth 2.0 Client ID - # example passing only required values which don't have defaults set try: # Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client api_instance.delete_o_auth2_token(client_id) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->delete_o_auth2_token: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **client_id** | **str**| OAuth 2.0 Client ID | + **client_id** | **str**| OAuth 2.0 Client ID | ### Return type @@ -551,7 +440,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -572,11 +460,10 @@ Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.generic_error import GenericError +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -585,25 +472,26 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | The id of the desired grant + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | The id of the desired grant - # example passing only required values which don't have defaults set try: # Delete Trusted OAuth2 JWT Bearer Grant Type Issuer api_instance.delete_trusted_o_auth2_jwt_grant_issuer(id) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->delete_trusted_o_auth2_jwt_grant_issuer: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the desired grant | + **id** | **str**| The id of the desired grant | ### Return type @@ -618,7 +506,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -639,12 +526,11 @@ Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -653,26 +539,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | The id of the OAuth 2.0 Client. - # example passing only required values which don't have defaults set try: # Get an OAuth 2.0 Client api_response = api_instance.get_o_auth2_client(id) + print("The response of OAuth2Api->get_o_auth2_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->get_o_auth2_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | + **id** | **str**| The id of the OAuth 2.0 Client. | ### Return type @@ -687,7 +575,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -708,13 +595,11 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -723,26 +608,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - consent_challenge = "consent_challenge_example" # str | OAuth 2.0 Consent Request Challenge + api_instance = ory_hydra_client.OAuth2Api(api_client) + consent_challenge = 'consent_challenge_example' # str | OAuth 2.0 Consent Request Challenge - # example passing only required values which don't have defaults set try: # Get OAuth 2.0 Consent Request api_response = api_instance.get_o_auth2_consent_request(consent_challenge) + print("The response of OAuth2Api->get_o_auth2_consent_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->get_o_auth2_consent_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | + **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | ### Return type @@ -757,7 +644,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -779,13 +665,11 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.o_auth2_login_request import OAuth2LoginRequest +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -794,26 +678,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - login_challenge = "login_challenge_example" # str | OAuth 2.0 Login Request Challenge + api_instance = ory_hydra_client.OAuth2Api(api_client) + login_challenge = 'login_challenge_example' # str | OAuth 2.0 Login Request Challenge - # example passing only required values which don't have defaults set try: # Get OAuth 2.0 Login Request api_response = api_instance.get_o_auth2_login_request(login_challenge) + print("The response of OAuth2Api->get_o_auth2_login_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->get_o_auth2_login_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | + **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | ### Return type @@ -828,7 +714,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -850,13 +735,11 @@ Use this endpoint to fetch an Ory OAuth 2.0 logout request. ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_logout_request import OAuth2LogoutRequest -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -865,26 +748,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - logout_challenge = "logout_challenge_example" # str | + api_instance = ory_hydra_client.OAuth2Api(api_client) + logout_challenge = 'logout_challenge_example' # str | - # example passing only required values which don't have defaults set try: # Get OAuth 2.0 Session Logout Request api_response = api_instance.get_o_auth2_logout_request(logout_challenge) + print("The response of OAuth2Api->get_o_auth2_logout_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->get_o_auth2_logout_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| | + **logout_challenge** | **str**| | ### Return type @@ -899,7 +784,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -921,12 +805,11 @@ Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the o ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -935,26 +818,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | The id of the desired grant + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | The id of the desired grant - # example passing only required values which don't have defaults set try: # Get Trusted OAuth2 JWT Bearer Grant Type Issuer api_response = api_instance.get_trusted_o_auth2_jwt_grant_issuer(id) + print("The response of OAuth2Api->get_trusted_o_auth2_jwt_grant_issuer:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->get_trusted_o_auth2_jwt_grant_issuer: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the desired grant | + **id** | **str**| The id of the desired grant | ### Return type @@ -969,7 +854,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -980,7 +864,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **introspect_o_auth2_token** -> IntrospectedOAuth2Token introspect_o_auth2_token(token) +> IntrospectedOAuth2Token introspect_o_auth2_token(token, scope=scope) Introspect OAuth2 Access and Refresh Tokens @@ -990,12 +874,11 @@ The introspection endpoint allows to check if a token (both refresh and access) ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.introspected_o_auth2_token import IntrospectedOAuth2Token +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1004,37 +887,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - token = "token_example" # str | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. - scope = "scope_example" # str | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) - - # example passing only required values which don't have defaults set - try: - # Introspect OAuth2 Access and Refresh Tokens - api_response = api_instance.introspect_o_auth2_token(token) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->introspect_o_auth2_token: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + token = 'token_example' # str | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + scope = 'scope_example' # str | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Introspect OAuth2 Access and Refresh Tokens api_response = api_instance.introspect_o_auth2_token(token, scope=scope) + print("The response of OAuth2Api->introspect_o_auth2_token:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->introspect_o_auth2_token: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **token** | **str**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | - **scope** | **str**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] + **token** | **str**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. | + **scope** | **str**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional] ### Return type @@ -1049,7 +925,6 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1060,7 +935,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_o_auth2_clients** -> [OAuth2Client] list_o_auth2_clients() +> List[OAuth2Client] list_o_auth2_clients(page_size=page_size, page_token=page_token, client_name=client_name, owner=owner) List OAuth 2.0 Clients @@ -1070,12 +945,11 @@ This endpoint lists all clients in the database, and never returns client secret ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1084,37 +958,38 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - page_size = 250 # int | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) if omitted the server will use the default value of 250 - page_token = "1" # str | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) if omitted the server will use the default value of "1" - client_name = "client_name_example" # str | The name of the clients to filter by. (optional) - owner = "owner_example" # str | The owner of the clients to filter by. (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = ory_hydra_client.OAuth2Api(api_client) + page_size = 250 # int | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) + page_token = '1' # str | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to '1') + client_name = 'client_name_example' # str | The name of the clients to filter by. (optional) + owner = 'owner_example' # str | The owner of the clients to filter by. (optional) + try: # List OAuth 2.0 Clients api_response = api_instance.list_o_auth2_clients(page_size=page_size, page_token=page_token, client_name=client_name, owner=owner) + print("The response of OAuth2Api->list_o_auth2_clients:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->list_o_auth2_clients: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page_size** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of 250 - **page_token** | **str**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of "1" - **client_name** | **str**| The name of the clients to filter by. | [optional] - **owner** | **str**| The owner of the clients to filter by. | [optional] + **page_size** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] + **page_token** | **str**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] + **client_name** | **str**| The name of the clients to filter by. | [optional] + **owner** | **str**| The owner of the clients to filter by. | [optional] ### Return type -[**[OAuth2Client]**](OAuth2Client.md) +[**List[OAuth2Client]**](OAuth2Client.md) ### Authorization @@ -1125,7 +1000,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1136,7 +1010,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_o_auth2_consent_sessions** -> OAuth2ConsentSessions list_o_auth2_consent_sessions(subject) +> List[OAuth2ConsentSession] list_o_auth2_consent_sessions(subject, page_size=page_size, page_token=page_token, login_session_id=login_session_id) List OAuth 2.0 Consent Sessions of a Subject @@ -1146,12 +1020,11 @@ This endpoint lists all subject's granted consent sessions, including client and ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_consent_sessions import OAuth2ConsentSessions -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1160,45 +1033,38 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - subject = "subject_example" # str | The subject to list the consent sessions for. - page_size = 250 # int | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) if omitted the server will use the default value of 250 - page_token = "1" # str | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) if omitted the server will use the default value of "1" - login_session_id = "login_session_id_example" # str | The login session id to list the consent sessions for. (optional) - - # example passing only required values which don't have defaults set - try: - # List OAuth 2.0 Consent Sessions of a Subject - api_response = api_instance.list_o_auth2_consent_sessions(subject) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->list_o_auth2_consent_sessions: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + subject = 'subject_example' # str | The subject to list the consent sessions for. + page_size = 250 # int | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) + page_token = '1' # str | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to '1') + login_session_id = 'login_session_id_example' # str | The login session id to list the consent sessions for. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List OAuth 2.0 Consent Sessions of a Subject api_response = api_instance.list_o_auth2_consent_sessions(subject, page_size=page_size, page_token=page_token, login_session_id=login_session_id) + print("The response of OAuth2Api->list_o_auth2_consent_sessions:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->list_o_auth2_consent_sessions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **subject** | **str**| The subject to list the consent sessions for. | - **page_size** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of 250 - **page_token** | **str**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of "1" - **login_session_id** | **str**| The login session id to list the consent sessions for. | [optional] + **subject** | **str**| The subject to list the consent sessions for. | + **page_size** | **int**| Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] + **page_token** | **str**| Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] + **login_session_id** | **str**| The login session id to list the consent sessions for. | [optional] ### Return type -[**OAuth2ConsentSessions**](OAuth2ConsentSessions.md) +[**List[OAuth2ConsentSession]**](OAuth2ConsentSession.md) ### Authorization @@ -1209,7 +1075,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1220,7 +1085,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_trusted_o_auth2_jwt_grant_issuers** -> TrustedOAuth2JwtGrantIssuers list_trusted_o_auth2_jwt_grant_issuers() +> List[TrustedOAuth2JwtGrantIssuer] list_trusted_o_auth2_jwt_grant_issuers(max_items=max_items, default_items=default_items, issuer=issuer) List Trusted OAuth2 JWT Bearer Grant Type Issuers @@ -1230,12 +1095,11 @@ Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuers import TrustedOAuth2JwtGrantIssuers +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1244,35 +1108,36 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - max_items = 1 # int | (optional) - default_items = 1 # int | (optional) - issuer = "issuer_example" # str | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + api_instance = ory_hydra_client.OAuth2Api(api_client) + max_items = 56 # int | (optional) + default_items = 56 # int | (optional) + issuer = 'issuer_example' # str | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List Trusted OAuth2 JWT Bearer Grant Type Issuers api_response = api_instance.list_trusted_o_auth2_jwt_grant_issuers(max_items=max_items, default_items=default_items, issuer=issuer) + print("The response of OAuth2Api->list_trusted_o_auth2_jwt_grant_issuers:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->list_trusted_o_auth2_jwt_grant_issuers: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **max_items** | **int**| | [optional] - **default_items** | **int**| | [optional] - **issuer** | **str**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] + **max_items** | **int**| | [optional] + **default_items** | **int**| | [optional] + **issuer** | **str**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] ### Return type -[**TrustedOAuth2JwtGrantIssuers**](TrustedOAuth2JwtGrantIssuers.md) +[**List[TrustedOAuth2JwtGrantIssuer]**](TrustedOAuth2JwtGrantIssuer.md) ### Authorization @@ -1283,7 +1148,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1304,11 +1168,11 @@ Use open source libraries to perform OAuth 2.0 and OpenID Connect available for ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1317,21 +1181,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) + api_instance = ory_hydra_client.OAuth2Api(api_client) - # example, this endpoint has no required or optional parameters try: # OAuth 2.0 Authorize Endpoint api_response = api_instance.o_auth2_authorize() + print("The response of OAuth2Api->o_auth2_authorize:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->o_auth2_authorize: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -1347,7 +1213,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1358,7 +1223,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **oauth2_token_exchange** -> OAuth2TokenExchange oauth2_token_exchange(grant_type) +> OAuth2TokenExchange oauth2_token_exchange(grant_type, client_id=client_id, code=code, redirect_uri=redirect_uri, refresh_token=refresh_token) The OAuth 2.0 Token Endpoint @@ -1370,12 +1235,11 @@ Use open source libraries to perform OAuth 2.0 and OpenID Connect available for * OAuth Authentication (oauth2): ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.o_auth2_token_exchange import OAuth2TokenExchange +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1389,54 +1253,43 @@ configuration = ory_hydra_client.Configuration( # Configure HTTP basic authorization: basic configuration = ory_hydra_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' + username = os.environ["USERNAME"], + password = os.environ["PASSWORD"] ) -# Configure OAuth2 access token for authorization: oauth2 -configuration = ory_hydra_client.Configuration( - host = "http://localhost" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - grant_type = "grant_type_example" # str | - client_id = "client_id_example" # str | (optional) - code = "code_example" # str | (optional) - redirect_uri = "redirect_uri_example" # str | (optional) - refresh_token = "refresh_token_example" # str | (optional) - - # example passing only required values which don't have defaults set - try: - # The OAuth 2.0 Token Endpoint - api_response = api_instance.oauth2_token_exchange(grant_type) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->oauth2_token_exchange: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + grant_type = 'grant_type_example' # str | + client_id = 'client_id_example' # str | (optional) + code = 'code_example' # str | (optional) + redirect_uri = 'redirect_uri_example' # str | (optional) + refresh_token = 'refresh_token_example' # str | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # The OAuth 2.0 Token Endpoint api_response = api_instance.oauth2_token_exchange(grant_type, client_id=client_id, code=code, redirect_uri=redirect_uri, refresh_token=refresh_token) + print("The response of OAuth2Api->oauth2_token_exchange:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->oauth2_token_exchange: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **grant_type** | **str**| | - **client_id** | **str**| | [optional] - **code** | **str**| | [optional] - **redirect_uri** | **str**| | [optional] - **refresh_token** | **str**| | [optional] + **grant_type** | **str**| | + **client_id** | **str**| | [optional] + **code** | **str**| | [optional] + **redirect_uri** | **str**| | [optional] + **refresh_token** | **str**| | [optional] ### Return type @@ -1451,7 +1304,6 @@ Name | Type | Description | Notes - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1462,7 +1314,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_o_auth2_client** -> OAuth2Client patch_o_auth2_client(id, json_patch_document) +> OAuth2Client patch_o_auth2_client(id, json_patch) Patch OAuth 2.0 Client @@ -1472,13 +1324,12 @@ Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.json_patch_document import JsonPatchDocument +from ory_hydra_client.models.json_patch import JsonPatch +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1487,35 +1338,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. - json_patch_document = JsonPatchDocument([ - JsonPatch( - _from="/name", - op="replace", - path="/name", - value=None, - ), - ]) # JsonPatchDocument | OAuth 2.0 Client JSON Patch Body - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | The id of the OAuth 2.0 Client. + json_patch = [ory_hydra_client.JsonPatch()] # List[JsonPatch] | OAuth 2.0 Client JSON Patch Body + try: # Patch OAuth 2.0 Client - api_response = api_instance.patch_o_auth2_client(id, json_patch_document) + api_response = api_instance.patch_o_auth2_client(id, json_patch) + print("The response of OAuth2Api->patch_o_auth2_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->patch_o_auth2_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - **json_patch_document** | [**JsonPatchDocument**](JsonPatchDocument.md)| OAuth 2.0 Client JSON Patch Body | + **id** | **str**| The id of the OAuth 2.0 Client. | + **json_patch** | [**List[JsonPatch]**](JsonPatch.md)| OAuth 2.0 Client JSON Patch Body | ### Return type @@ -1530,7 +1376,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1542,7 +1387,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **reject_o_auth2_consent_request** -> OAuth2RedirectTo reject_o_auth2_consent_request(consent_challenge) +> OAuth2RedirectTo reject_o_auth2_consent_request(consent_challenge, reject_o_auth2_request=reject_o_auth2_request) Reject OAuth 2.0 Consent Request @@ -1552,13 +1397,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1567,43 +1411,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - consent_challenge = "consent_challenge_example" # str | OAuth 2.0 Consent Request Challenge - reject_o_auth2_request = RejectOAuth2Request( - error="error_example", - error_debug="error_debug_example", - error_description="error_description_example", - error_hint="error_hint_example", - status_code=1, - ) # RejectOAuth2Request | (optional) - - # example passing only required values which don't have defaults set - try: - # Reject OAuth 2.0 Consent Request - api_response = api_instance.reject_o_auth2_consent_request(consent_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->reject_o_auth2_consent_request: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + consent_challenge = 'consent_challenge_example' # str | OAuth 2.0 Consent Request Challenge + reject_o_auth2_request = ory_hydra_client.RejectOAuth2Request() # RejectOAuth2Request | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Reject OAuth 2.0 Consent Request api_response = api_instance.reject_o_auth2_consent_request(consent_challenge, reject_o_auth2_request=reject_o_auth2_request) + print("The response of OAuth2Api->reject_o_auth2_consent_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->reject_o_auth2_consent_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | - **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] + **consent_challenge** | **str**| OAuth 2.0 Consent Request Challenge | + **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] ### Return type @@ -1618,7 +1449,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1629,7 +1459,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **reject_o_auth2_login_request** -> OAuth2RedirectTo reject_o_auth2_login_request(login_challenge) +> OAuth2RedirectTo reject_o_auth2_login_request(login_challenge, reject_o_auth2_request=reject_o_auth2_request) Reject OAuth 2.0 Login Request @@ -1639,13 +1469,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1654,43 +1483,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - login_challenge = "login_challenge_example" # str | OAuth 2.0 Login Request Challenge - reject_o_auth2_request = RejectOAuth2Request( - error="error_example", - error_debug="error_debug_example", - error_description="error_description_example", - error_hint="error_hint_example", - status_code=1, - ) # RejectOAuth2Request | (optional) - - # example passing only required values which don't have defaults set - try: - # Reject OAuth 2.0 Login Request - api_response = api_instance.reject_o_auth2_login_request(login_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->reject_o_auth2_login_request: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + login_challenge = 'login_challenge_example' # str | OAuth 2.0 Login Request Challenge + reject_o_auth2_request = ory_hydra_client.RejectOAuth2Request() # RejectOAuth2Request | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Reject OAuth 2.0 Login Request api_response = api_instance.reject_o_auth2_login_request(login_challenge, reject_o_auth2_request=reject_o_auth2_request) + print("The response of OAuth2Api->reject_o_auth2_login_request:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->reject_o_auth2_login_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | - **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] + **login_challenge** | **str**| OAuth 2.0 Login Request Challenge | + **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] ### Return type @@ -1705,7 +1521,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1726,11 +1541,10 @@ When a user or an application requests Ory OAuth 2.0 to remove the session state ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1739,25 +1553,26 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - logout_challenge = "logout_challenge_example" # str | + api_instance = ory_hydra_client.OAuth2Api(api_client) + logout_challenge = 'logout_challenge_example' # str | - # example passing only required values which don't have defaults set try: # Reject OAuth 2.0 Session Logout Request api_instance.reject_o_auth2_logout_request(logout_challenge) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->reject_o_auth2_logout_request: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| | + **logout_challenge** | **str**| | ### Return type @@ -1772,7 +1587,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1783,7 +1597,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **revoke_o_auth2_consent_sessions** -> revoke_o_auth2_consent_sessions(subject) +> revoke_o_auth2_consent_sessions(subject, client=client, all=all) Revoke OAuth 2.0 Consent Sessions of a Subject @@ -1793,11 +1607,10 @@ This endpoint revokes a subject's granted consent sessions and invalidates all a ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1806,37 +1619,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - subject = "subject_example" # str | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - client = "client_example" # str | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + api_instance = ory_hydra_client.OAuth2Api(api_client) + subject = 'subject_example' # str | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + client = 'client_example' # str | OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) all = True # bool | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) - # example passing only required values which don't have defaults set - try: - # Revoke OAuth 2.0 Consent Sessions of a Subject - api_instance.revoke_o_auth2_consent_sessions(subject) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->revoke_o_auth2_consent_sessions: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Revoke OAuth 2.0 Consent Sessions of a Subject api_instance.revoke_o_auth2_consent_sessions(subject, client=client, all=all) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->revoke_o_auth2_consent_sessions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **subject** | **str**| OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | - **client** | **str**| OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] - **all** | **bool**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] + **subject** | **str**| OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | + **client** | **str**| OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. | [optional] + **all** | **bool**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] ### Return type @@ -1851,7 +1657,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1862,7 +1667,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **revoke_o_auth2_login_sessions** -> revoke_o_auth2_login_sessions() +> revoke_o_auth2_login_sessions(subject=subject, sid=sid) Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID @@ -1872,11 +1677,10 @@ This endpoint invalidates authentication sessions. After revoking the authentica ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1885,28 +1689,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - subject = "subject_example" # str | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) - sid = "sid_example" # str | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + api_instance = ory_hydra_client.OAuth2Api(api_client) + subject = 'subject_example' # str | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + sid = 'sid_example' # str | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID api_instance.revoke_o_auth2_login_sessions(subject=subject, sid=sid) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->revoke_o_auth2_login_sessions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **subject** | **str**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] - **sid** | **str**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] + **subject** | **str**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] + **sid** | **str**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | [optional] ### Return type @@ -1921,7 +1725,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1932,7 +1735,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **revoke_o_auth2_token** -> revoke_o_auth2_token(token) +> revoke_o_auth2_token(token, client_id=client_id, client_secret=client_secret) Revoke OAuth 2.0 Access or Refresh Token @@ -1944,11 +1747,10 @@ Revoking a token (both access and refresh) means that the tokens will be invalid * OAuth Authentication (oauth2): ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -1962,48 +1764,37 @@ configuration = ory_hydra_client.Configuration( # Configure HTTP basic authorization: basic configuration = ory_hydra_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' + username = os.environ["USERNAME"], + password = os.environ["PASSWORD"] ) -# Configure OAuth2 access token for authorization: oauth2 -configuration = ory_hydra_client.Configuration( - host = "http://localhost" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - token = "token_example" # str | - client_id = "client_id_example" # str | (optional) - client_secret = "client_secret_example" # str | (optional) - - # example passing only required values which don't have defaults set - try: - # Revoke OAuth 2.0 Access or Refresh Token - api_instance.revoke_o_auth2_token(token) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->revoke_o_auth2_token: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + token = 'token_example' # str | + client_id = 'client_id_example' # str | (optional) + client_secret = 'client_secret_example' # str | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Revoke OAuth 2.0 Access or Refresh Token api_instance.revoke_o_auth2_token(token, client_id=client_id, client_secret=client_secret) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->revoke_o_auth2_token: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **token** | **str**| | - **client_id** | **str**| | [optional] - **client_secret** | **str**| | [optional] + **token** | **str**| | + **client_id** | **str**| | [optional] + **client_secret** | **str**| | [optional] ### Return type @@ -2018,7 +1809,6 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2039,12 +1829,11 @@ Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `cl ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -2053,93 +1842,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | OAuth 2.0 Client ID - o_auth2_client = OAuth2Client( - access_token_strategy="access_token_strategy_example", - allowed_cors_origins=StringSliceJSONFormat([ - "allowed_cors_origins_example", - ]), - audience=StringSliceJSONFormat([ - "audience_example", - ]), - authorization_code_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - client_credentials_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - client_id="client_id_example", - client_name="client_name_example", - client_secret="client_secret_example", - client_secret_expires_at=1, - client_uri="client_uri_example", - contacts=StringSliceJSONFormat([ - "contacts_example", - ]), - created_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - frontchannel_logout_session_required=True, - frontchannel_logout_uri="frontchannel_logout_uri_example", - grant_types=StringSliceJSONFormat([ - "grant_types_example", - ]), - implicit_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - jwks=None, - jwks_uri="jwks_uri_example", - jwt_bearer_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - logo_uri="logo_uri_example", - metadata=None, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSliceJSONFormat([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSliceJSONFormat([ - "redirect_uris_example", - ]), - refresh_token_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - registration_access_token="registration_access_token_example", - registration_client_uri="registration_client_uri_example", - request_object_signing_alg="request_object_signing_alg_example", - request_uris=StringSliceJSONFormat([ - "request_uris_example", - ]), - response_types=StringSliceJSONFormat([ - "response_types_example", - ]), - scope="scope1 scope-2 scope.3 scope:4", - sector_identifier_uri="sector_identifier_uri_example", - skip_consent=True, - skip_logout_consent=True, - subject_type="subject_type_example", - token_endpoint_auth_method="client_secret_basic", - token_endpoint_auth_signing_alg="token_endpoint_auth_signing_alg_example", - tos_uri="tos_uri_example", - updated_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - userinfo_signed_response_alg="userinfo_signed_response_alg_example", - ) # OAuth2Client | OAuth 2.0 Client Request Body - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | OAuth 2.0 Client ID + o_auth2_client = ory_hydra_client.OAuth2Client() # OAuth2Client | OAuth 2.0 Client Request Body + try: # Set OAuth 2.0 Client api_response = api_instance.set_o_auth2_client(id, o_auth2_client) + print("The response of OAuth2Api->set_o_auth2_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->set_o_auth2_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| OAuth 2.0 Client ID | - **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + **id** | **str**| OAuth 2.0 Client ID | + **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | ### Return type @@ -2154,7 +1880,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2167,7 +1892,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_o_auth2_client_lifespans** -> OAuth2Client set_o_auth2_client_lifespans(id) +> OAuth2Client set_o_auth2_client_lifespans(id, o_auth2_client_token_lifespans=o_auth2_client_token_lifespans) Set OAuth2 Client Token Lifespans @@ -2177,13 +1902,12 @@ Set lifespans of different token types issued for this OAuth 2.0 client. Does no ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -2192,48 +1916,30 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - id = "id_example" # str | OAuth 2.0 Client ID - o_auth2_client_token_lifespans = OAuth2ClientTokenLifespans( - authorization_code_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - client_credentials_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - jwt_bearer_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - ) # OAuth2ClientTokenLifespans | (optional) - - # example passing only required values which don't have defaults set - try: - # Set OAuth2 Client Token Lifespans - api_response = api_instance.set_o_auth2_client_lifespans(id) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling OAuth2Api->set_o_auth2_client_lifespans: %s\n" % e) + api_instance = ory_hydra_client.OAuth2Api(api_client) + id = 'id_example' # str | OAuth 2.0 Client ID + o_auth2_client_token_lifespans = ory_hydra_client.OAuth2ClientTokenLifespans() # OAuth2ClientTokenLifespans | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Set OAuth2 Client Token Lifespans api_response = api_instance.set_o_auth2_client_lifespans(id, o_auth2_client_token_lifespans=o_auth2_client_token_lifespans) + print("The response of OAuth2Api->set_o_auth2_client_lifespans:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->set_o_auth2_client_lifespans: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| OAuth 2.0 Client ID | - **o_auth2_client_token_lifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md)| | [optional] + **id** | **str**| OAuth 2.0 Client ID | + **o_auth2_client_token_lifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md)| | [optional] ### Return type @@ -2248,7 +1954,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2259,7 +1964,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **trust_o_auth2_jwt_grant_issuer** -> TrustedOAuth2JwtGrantIssuer trust_o_auth2_jwt_grant_issuer() +> TrustedOAuth2JwtGrantIssuer trust_o_auth2_jwt_grant_issuer(trust_o_auth2_jwt_grant_issuer=trust_o_auth2_jwt_grant_issuer) Trust OAuth2 JWT Bearer Grant Type Issuer @@ -2269,13 +1974,12 @@ Use this endpoint to establish a trust relationship for a JWT issuer to perform ```python -import time import ory_hydra_client -from ory_hydra_client.api import o_auth2_api -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -2284,54 +1988,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = o_auth2_api.OAuth2Api(api_client) - trust_o_auth2_jwt_grant_issuer = TrustOAuth2JwtGrantIssuer( - allow_any_subject=True, - expires_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - issuer="https://jwt-idp.example.com", - jwk=JsonWebKey( - alg="RS256", - crv="P-256", - d="T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE", - dp="G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0", - dq="s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk", - e="AQAB", - k="GawgguFyGrWKav7AX4VKUg", - kid="1603dfe0af8f4596", - kty="RSA", - n="vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0", - p="6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ", - q="0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ", - qi="GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU", - use="sig", - x="f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU", - x5c=[ - "x5c_example", - ], - y="x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0", - ), - scope=["openid","offline"], - subject="mike@example.com", - ) # TrustOAuth2JwtGrantIssuer | (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = ory_hydra_client.OAuth2Api(api_client) + trust_o_auth2_jwt_grant_issuer = ory_hydra_client.TrustOAuth2JwtGrantIssuer() # TrustOAuth2JwtGrantIssuer | (optional) + try: # Trust OAuth2 JWT Bearer Grant Type Issuer api_response = api_instance.trust_o_auth2_jwt_grant_issuer(trust_o_auth2_jwt_grant_issuer=trust_o_auth2_jwt_grant_issuer) + print("The response of OAuth2Api->trust_o_auth2_jwt_grant_issuer:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OAuth2Api->trust_o_auth2_jwt_grant_issuer: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **trust_o_auth2_jwt_grant_issuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md)| | [optional] + **trust_o_auth2_jwt_grant_issuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md)| | [optional] ### Return type @@ -2346,7 +2024,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/clients/hydra/python/docs/OAuth2Client.md b/clients/hydra/python/docs/OAuth2Client.md index a3c7708b493..96a0ee39379 100644 --- a/clients/hydra/python/docs/OAuth2Client.md +++ b/clients/hydra/python/docs/OAuth2Client.md @@ -3,58 +3,75 @@ OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **access_token_strategy** | **str** | OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. | [optional] -**allowed_cors_origins** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**authorization_code_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**authorization_code_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**authorization_code_grant_refresh_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] +**allowed_cors_origins** | **List[str]** | | [optional] +**audience** | **List[str]** | | [optional] +**authorization_code_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_refresh_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] **backchannel_logout_session_required** | **bool** | OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false. | [optional] **backchannel_logout_uri** | **str** | OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**client_credentials_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] +**client_credentials_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] **client_id** | **str** | OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated. | [optional] **client_name** | **str** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] **client_secret** | **str** | OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost. | [optional] **client_secret_expires_at** | **int** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] **client_uri** | **str** | OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion. | [optional] -**contacts** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**contacts** | **List[str]** | | [optional] **created_at** | **datetime** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] **frontchannel_logout_session_required** | **bool** | OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false. | [optional] **frontchannel_logout_uri** | **str** | OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be. | [optional] -**grant_types** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**implicit_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**implicit_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**jwks** | **bool, date, datetime, dict, float, int, list, str, none_type** | OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. | [optional] +**grant_types** | **List[str]** | | [optional] +**implicit_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwks** | **object** | OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. | [optional] **jwks_uri** | **str** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] -**jwt_bearer_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] +**jwt_bearer_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] **logo_uri** | **str** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] -**metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**metadata** | **object** | | [optional] **owner** | **str** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] **policy_uri** | **str** | OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data. | [optional] -**post_logout_redirect_uris** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**redirect_uris** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**refresh_token_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**refresh_token_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**refresh_token_grant_refresh_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] +**post_logout_redirect_uris** | **List[str]** | | [optional] +**redirect_uris** | **List[str]** | | [optional] +**refresh_token_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_refresh_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] **registration_access_token** | **str** | OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration. | [optional] **registration_client_uri** | **str** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] **request_object_signing_alg** | **str** | OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm. | [optional] -**request_uris** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**response_types** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**request_uris** | **List[str]** | | [optional] +**response_types** | **List[str]** | | [optional] **scope** | **str** | OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. | [optional] **sector_identifier_uri** | **str** | OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. | [optional] **skip_consent** | **bool** | SkipConsent skips the consent screen for this client. This field can only be set from the admin API. | [optional] **skip_logout_consent** | **bool** | SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API. | [optional] **subject_type** | **str** | OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. | [optional] -**token_endpoint_auth_method** | **str** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. | [optional] if omitted the server will use the default value of "client_secret_basic" +**token_endpoint_auth_method** | **str** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. | [optional] [default to 'client_secret_basic'] **token_endpoint_auth_signing_alg** | **str** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] **tos_uri** | **str** | OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. | [optional] **updated_at** | **datetime** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] **userinfo_signed_response_alg** | **str** | OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_client import OAuth2Client + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2Client from a JSON string +o_auth2_client_instance = OAuth2Client.from_json(json) +# print the JSON string representation of the object +print(OAuth2Client.to_json()) + +# convert the object into a dict +o_auth2_client_dict = o_auth2_client_instance.to_dict() +# create an instance of OAuth2Client from a dict +o_auth2_client_from_dict = OAuth2Client.from_dict(o_auth2_client_dict) +``` [[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/clients/hydra/python/docs/OAuth2ClientTokenLifespans.md b/clients/hydra/python/docs/OAuth2ClientTokenLifespans.md index 83c16789a7f..9bf7a835773 100644 --- a/clients/hydra/python/docs/OAuth2ClientTokenLifespans.md +++ b/clients/hydra/python/docs/OAuth2ClientTokenLifespans.md @@ -3,20 +3,37 @@ Lifespans of different token types issued for this OAuth 2.0 Client. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authorization_code_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**authorization_code_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**authorization_code_grant_refresh_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**client_credentials_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**implicit_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**implicit_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**jwt_bearer_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**refresh_token_grant_access_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**refresh_token_grant_id_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**refresh_token_grant_refresh_token_lifespan** | [**NullDuration**](NullDuration.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**authorization_code_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_refresh_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**client_credentials_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwt_bearer_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_access_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_id_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_refresh_token_lifespan** | **str** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] + +## Example + +```python +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ClientTokenLifespans from a JSON string +o_auth2_client_token_lifespans_instance = OAuth2ClientTokenLifespans.from_json(json) +# print the JSON string representation of the object +print(OAuth2ClientTokenLifespans.to_json()) +# convert the object into a dict +o_auth2_client_token_lifespans_dict = o_auth2_client_token_lifespans_instance.to_dict() +# create an instance of OAuth2ClientTokenLifespans from a dict +o_auth2_client_token_lifespans_from_dict = OAuth2ClientTokenLifespans.from_dict(o_auth2_client_token_lifespans_dict) +``` [[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/clients/hydra/python/docs/OAuth2ConsentRequest.md b/clients/hydra/python/docs/OAuth2ConsentRequest.md index 2c9709b2e8a..46db239441b 100644 --- a/clients/hydra/python/docs/OAuth2ConsentRequest.md +++ b/clients/hydra/python/docs/OAuth2ConsentRequest.md @@ -2,23 +2,40 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**challenge** | **str** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | **acr** | **str** | ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. | [optional] -**amr** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**amr** | **List[str]** | | [optional] +**challenge** | **str** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | **client** | [**OAuth2Client**](OAuth2Client.md) | | [optional] -**context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**context** | **object** | | [optional] **login_challenge** | **str** | LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. | [optional] **login_session_id** | **str** | LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional] **oidc_context** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.md) | | [optional] **request_url** | **str** | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. | [optional] -**requested_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**requested_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**requested_access_token_audience** | **List[str]** | | [optional] +**requested_scope** | **List[str]** | | [optional] **skip** | **bool** | Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call. | [optional] **subject** | **str** | Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ConsentRequest from a JSON string +o_auth2_consent_request_instance = OAuth2ConsentRequest.from_json(json) +# print the JSON string representation of the object +print(OAuth2ConsentRequest.to_json()) + +# convert the object into a dict +o_auth2_consent_request_dict = o_auth2_consent_request_instance.to_dict() +# create an instance of OAuth2ConsentRequest from a dict +o_auth2_consent_request_from_dict = OAuth2ConsentRequest.from_dict(o_auth2_consent_request_dict) +``` [[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/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md b/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md index 77adf658034..44629f423bc 100644 --- a/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md +++ b/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md @@ -2,15 +2,32 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acr_values** | **[str]** | ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. | [optional] +**acr_values** | **List[str]** | ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. | [optional] **display** | **str** | Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. | [optional] -**id_token_hint_claims** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. | [optional] +**id_token_hint_claims** | **Dict[str, object]** | IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. | [optional] **login_hint** | **str** | LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. | [optional] -**ui_locales** | **[str]** | UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**ui_locales** | **List[str]** | UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. | [optional] + +## Example + +```python +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ConsentRequestOpenIDConnectContext from a JSON string +o_auth2_consent_request_open_id_connect_context_instance = OAuth2ConsentRequestOpenIDConnectContext.from_json(json) +# print the JSON string representation of the object +print(OAuth2ConsentRequestOpenIDConnectContext.to_json()) +# convert the object into a dict +o_auth2_consent_request_open_id_connect_context_dict = o_auth2_consent_request_open_id_connect_context_instance.to_dict() +# create an instance of OAuth2ConsentRequestOpenIDConnectContext from a dict +o_auth2_consent_request_open_id_connect_context_from_dict = OAuth2ConsentRequestOpenIDConnectContext.from_dict(o_auth2_consent_request_open_id_connect_context_dict) +``` [[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/clients/hydra/python/docs/OAuth2ConsentSession.md b/clients/hydra/python/docs/OAuth2ConsentSession.md index 12b8e77f2d0..150da193b13 100644 --- a/clients/hydra/python/docs/OAuth2ConsentSession.md +++ b/clients/hydra/python/docs/OAuth2ConsentSession.md @@ -3,19 +3,36 @@ A completed OAuth 2.0 Consent Session. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **consent_request** | [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] -**context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**context** | **object** | | [optional] **expires_at** | [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] -**grant_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**grant_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**grant_access_token_audience** | **List[str]** | | [optional] +**grant_scope** | **List[str]** | | [optional] **handled_at** | **datetime** | | [optional] **remember** | **bool** | Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. | [optional] **remember_for** | **int** | Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. | [optional] **session** | [**AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ConsentSession from a JSON string +o_auth2_consent_session_instance = OAuth2ConsentSession.from_json(json) +# print the JSON string representation of the object +print(OAuth2ConsentSession.to_json()) + +# convert the object into a dict +o_auth2_consent_session_dict = o_auth2_consent_session_instance.to_dict() +# create an instance of OAuth2ConsentSession from a dict +o_auth2_consent_session_from_dict = OAuth2ConsentSession.from_dict(o_auth2_consent_session_dict) +``` [[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/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md index 724dfe77140..b002d563f58 100644 --- a/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md +++ b/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **access_token** | **datetime** | | [optional] @@ -9,8 +10,24 @@ Name | Type | Description | Notes **id_token** | **datetime** | | [optional] **par_context** | **datetime** | | [optional] **refresh_token** | **datetime** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ConsentSessionExpiresAt from a JSON string +o_auth2_consent_session_expires_at_instance = OAuth2ConsentSessionExpiresAt.from_json(json) +# print the JSON string representation of the object +print(OAuth2ConsentSessionExpiresAt.to_json()) + +# convert the object into a dict +o_auth2_consent_session_expires_at_dict = o_auth2_consent_session_expires_at_instance.to_dict() +# create an instance of OAuth2ConsentSessionExpiresAt from a dict +o_auth2_consent_session_expires_at_from_dict = OAuth2ConsentSessionExpiresAt.from_dict(o_auth2_consent_session_expires_at_dict) +``` [[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/clients/hydra/python/docs/OAuth2ConsentSessions.md b/clients/hydra/python/docs/OAuth2ConsentSessions.md deleted file mode 100644 index afb9e67b39e..00000000000 --- a/clients/hydra/python/docs/OAuth2ConsentSessions.md +++ /dev/null @@ -1,12 +0,0 @@ -# OAuth2ConsentSessions - -List of OAuth 2.0 Consent Sessions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**[OAuth2ConsentSession]**](OAuth2ConsentSession.md) | List of OAuth 2.0 Consent Sessions | - -[[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/clients/hydra/python/docs/OAuth2LoginRequest.md b/clients/hydra/python/docs/OAuth2LoginRequest.md index 350d901fafc..3230e4d2ad1 100644 --- a/clients/hydra/python/docs/OAuth2LoginRequest.md +++ b/clients/hydra/python/docs/OAuth2LoginRequest.md @@ -2,19 +2,36 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **str** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | **client** | [**OAuth2Client**](OAuth2Client.md) | | +**oidc_context** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.md) | | [optional] **request_url** | **str** | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. | +**requested_access_token_audience** | **List[str]** | | [optional] +**requested_scope** | **List[str]** | | [optional] +**session_id** | **str** | SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional] **skip** | **bool** | Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. | **subject** | **str** | Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. | -**oidc_context** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.md) | | [optional] -**requested_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**requested_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] -**session_id** | **str** | SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2LoginRequest from a JSON string +o_auth2_login_request_instance = OAuth2LoginRequest.from_json(json) +# print the JSON string representation of the object +print(OAuth2LoginRequest.to_json()) + +# convert the object into a dict +o_auth2_login_request_dict = o_auth2_login_request_instance.to_dict() +# create an instance of OAuth2LoginRequest from a dict +o_auth2_login_request_from_dict = OAuth2LoginRequest.from_dict(o_auth2_login_request_dict) +``` [[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/clients/hydra/python/docs/OAuth2LogoutRequest.md b/clients/hydra/python/docs/OAuth2LogoutRequest.md index be61e5628f2..1f060ac5136 100644 --- a/clients/hydra/python/docs/OAuth2LogoutRequest.md +++ b/clients/hydra/python/docs/OAuth2LogoutRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **str** | Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. | [optional] @@ -10,8 +11,24 @@ Name | Type | Description | Notes **rp_initiated** | **bool** | RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. | [optional] **sid** | **str** | SessionID is the login session ID that was requested to log out. | [optional] **subject** | **str** | Subject is the user for whom the logout was request. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2LogoutRequest from a JSON string +o_auth2_logout_request_instance = OAuth2LogoutRequest.from_json(json) +# print the JSON string representation of the object +print(OAuth2LogoutRequest.to_json()) + +# convert the object into a dict +o_auth2_logout_request_dict = o_auth2_logout_request_instance.to_dict() +# create an instance of OAuth2LogoutRequest from a dict +o_auth2_logout_request_from_dict = OAuth2LogoutRequest.from_dict(o_auth2_logout_request_dict) +``` [[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/clients/hydra/python/docs/OAuth2RedirectTo.md b/clients/hydra/python/docs/OAuth2RedirectTo.md index db5dacfd251..afc8d0b1980 100644 --- a/clients/hydra/python/docs/OAuth2RedirectTo.md +++ b/clients/hydra/python/docs/OAuth2RedirectTo.md @@ -3,11 +3,28 @@ Contains a redirect URL used to complete a login, consent, or logout request. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **redirect_to** | **str** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2RedirectTo from a JSON string +o_auth2_redirect_to_instance = OAuth2RedirectTo.from_json(json) +# print the JSON string representation of the object +print(OAuth2RedirectTo.to_json()) + +# convert the object into a dict +o_auth2_redirect_to_dict = o_auth2_redirect_to_instance.to_dict() +# create an instance of OAuth2RedirectTo from a dict +o_auth2_redirect_to_from_dict = OAuth2RedirectTo.from_dict(o_auth2_redirect_to_dict) +``` [[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/clients/hydra/python/docs/OAuth2TokenExchange.md b/clients/hydra/python/docs/OAuth2TokenExchange.md index cae3acbb08f..3c91512157e 100644 --- a/clients/hydra/python/docs/OAuth2TokenExchange.md +++ b/clients/hydra/python/docs/OAuth2TokenExchange.md @@ -3,6 +3,7 @@ OAuth2 Token Exchange Result ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **access_token** | **str** | The access token issued by the authorization server. | [optional] @@ -11,8 +12,24 @@ Name | Type | Description | Notes **refresh_token** | **str** | The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. | [optional] **scope** | **str** | The scope of the access token | [optional] **token_type** | **str** | The type of the token issued | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2TokenExchange from a JSON string +o_auth2_token_exchange_instance = OAuth2TokenExchange.from_json(json) +# print the JSON string representation of the object +print(OAuth2TokenExchange.to_json()) + +# convert the object into a dict +o_auth2_token_exchange_dict = o_auth2_token_exchange_instance.to_dict() +# create an instance of OAuth2TokenExchange from a dict +o_auth2_token_exchange_from_dict = OAuth2TokenExchange.from_dict(o_auth2_token_exchange_dict) +``` [[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/clients/hydra/python/docs/OidcApi.md b/clients/hydra/python/docs/OidcApi.md index e1fcda2daf5..b7bb298ca25 100644 --- a/clients/hydra/python/docs/OidcApi.md +++ b/clients/hydra/python/docs/OidcApi.md @@ -25,12 +25,11 @@ This endpoint behaves like the administrative counterpart (`createOAuth2Client`) ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -39,91 +38,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) - o_auth2_client = OAuth2Client( - access_token_strategy="access_token_strategy_example", - allowed_cors_origins=StringSliceJSONFormat([ - "allowed_cors_origins_example", - ]), - audience=StringSliceJSONFormat([ - "audience_example", - ]), - authorization_code_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - client_credentials_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - client_id="client_id_example", - client_name="client_name_example", - client_secret="client_secret_example", - client_secret_expires_at=1, - client_uri="client_uri_example", - contacts=StringSliceJSONFormat([ - "contacts_example", - ]), - created_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - frontchannel_logout_session_required=True, - frontchannel_logout_uri="frontchannel_logout_uri_example", - grant_types=StringSliceJSONFormat([ - "grant_types_example", - ]), - implicit_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - jwks=None, - jwks_uri="jwks_uri_example", - jwt_bearer_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - logo_uri="logo_uri_example", - metadata=None, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSliceJSONFormat([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSliceJSONFormat([ - "redirect_uris_example", - ]), - refresh_token_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - registration_access_token="registration_access_token_example", - registration_client_uri="registration_client_uri_example", - request_object_signing_alg="request_object_signing_alg_example", - request_uris=StringSliceJSONFormat([ - "request_uris_example", - ]), - response_types=StringSliceJSONFormat([ - "response_types_example", - ]), - scope="scope1 scope-2 scope.3 scope:4", - sector_identifier_uri="sector_identifier_uri_example", - skip_consent=True, - skip_logout_consent=True, - subject_type="subject_type_example", - token_endpoint_auth_method="client_secret_basic", - token_endpoint_auth_signing_alg="token_endpoint_auth_signing_alg_example", - tos_uri="tos_uri_example", - updated_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - userinfo_signed_response_alg="userinfo_signed_response_alg_example", - ) # OAuth2Client | Dynamic Client Registration Request Body - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.OidcApi(api_client) + o_auth2_client = ory_hydra_client.OAuth2Client() # OAuth2Client | Dynamic Client Registration Request Body + try: # Register OAuth2 Client using OpenID Dynamic Client Registration api_response = api_instance.create_oidc_dynamic_client(o_auth2_client) + print("The response of OidcApi->create_oidc_dynamic_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->create_oidc_dynamic_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| Dynamic Client Registration Request Body | + **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| Dynamic Client Registration Request Body | ### Return type @@ -138,7 +74,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -150,7 +85,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_verifiable_credential** -> VerifiableCredentialResponse create_verifiable_credential() +> VerifiableCredentialResponse create_verifiable_credential(create_verifiable_credential_request_body=create_verifiable_credential_request_body) Issues a Verifiable Credential @@ -160,14 +95,12 @@ This endpoint creates a verifiable credential that attests that the user authent ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody -from ory_hydra_client.model.verifiable_credential_response import VerifiableCredentialResponse -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -176,36 +109,28 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) - create_verifiable_credential_request_body = CreateVerifiableCredentialRequestBody( - format="format_example", - proof=VerifiableCredentialProof( - jwt="jwt_example", - proof_type="proof_type_example", - ), - types=[ - "types_example", - ], - ) # CreateVerifiableCredentialRequestBody | (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = ory_hydra_client.OidcApi(api_client) + create_verifiable_credential_request_body = ory_hydra_client.CreateVerifiableCredentialRequestBody() # CreateVerifiableCredentialRequestBody | (optional) + try: # Issues a Verifiable Credential api_response = api_instance.create_verifiable_credential(create_verifiable_credential_request_body=create_verifiable_credential_request_body) + print("The response of OidcApi->create_verifiable_credential:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->create_verifiable_credential: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_verifiable_credential_request_body** | [**CreateVerifiableCredentialRequestBody**](CreateVerifiableCredentialRequestBody.md)| | [optional] + **create_verifiable_credential_request_body** | [**CreateVerifiableCredentialRequestBody**](CreateVerifiableCredentialRequestBody.md)| | [optional] ### Return type @@ -220,7 +145,6 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -243,11 +167,10 @@ This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) * Bearer Authentication (bearer): ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.generic_error import GenericError +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -261,29 +184,30 @@ configuration = ory_hydra_client.Configuration( # Configure Bearer authorization: bearer configuration = ory_hydra_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' + access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. + api_instance = ory_hydra_client.OidcApi(api_client) + id = 'id_example' # str | The id of the OAuth 2.0 Client. - # example passing only required values which don't have defaults set try: # Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol api_instance.delete_oidc_dynamic_client(id) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->delete_oidc_dynamic_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | + **id** | **str**| The id of the OAuth 2.0 Client. | ### Return type @@ -298,7 +222,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -319,12 +242,11 @@ A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenI ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.oidc_configuration import OidcConfiguration +from ory_hydra_client.models.oidc_configuration import OidcConfiguration +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -333,21 +255,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) + api_instance = ory_hydra_client.OidcApi(api_client) - # example, this endpoint has no required or optional parameters try: # OpenID Connect Discovery api_response = api_instance.discover_oidc_configuration() + print("The response of OidcApi->discover_oidc_configuration:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->discover_oidc_configuration: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -363,7 +287,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -385,12 +308,11 @@ This endpoint behaves like the administrative counterpart (`getOAuth2Client`) bu * Bearer Authentication (bearer): ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -404,30 +326,32 @@ configuration = ory_hydra_client.Configuration( # Configure Bearer authorization: bearer configuration = ory_hydra_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' + access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. + api_instance = ory_hydra_client.OidcApi(api_client) + id = 'id_example' # str | The id of the OAuth 2.0 Client. - # example passing only required values which don't have defaults set try: # Get OAuth2 Client using OpenID Dynamic Client Registration api_response = api_instance.get_oidc_dynamic_client(id) + print("The response of OidcApi->get_oidc_dynamic_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->get_oidc_dynamic_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | + **id** | **str**| The id of the OAuth 2.0 Client. | ### Return type @@ -442,7 +366,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -464,12 +387,11 @@ This endpoint returns the payload of the ID Token, including `session.id_token` * OAuth Authentication (oauth2): ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.oidc_user_info import OidcUserInfo +from ory_hydra_client.models.oidc_user_info import OidcUserInfo +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -481,28 +403,26 @@ configuration = ory_hydra_client.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: oauth2 -configuration = ory_hydra_client.Configuration( - host = "http://localhost" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) + api_instance = ory_hydra_client.OidcApi(api_client) - # example, this endpoint has no required or optional parameters try: # OpenID Connect Userinfo api_response = api_instance.get_oidc_user_info() + print("The response of OidcApi->get_oidc_user_info:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->get_oidc_user_info: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -518,7 +438,6 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -539,10 +458,10 @@ This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID pro ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -551,20 +470,21 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) + api_instance = ory_hydra_client.OidcApi(api_client) - # example, this endpoint has no required or optional parameters try: # OpenID Connect Front- and Back-channel Enabled Logout api_instance.revoke_oidc_session() - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->revoke_oidc_session: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -580,7 +500,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -601,12 +520,11 @@ This endpoint behaves like the administrative counterpart (`setOAuth2Client`) bu * Bearer Authentication (bearer): ```python -import time import ory_hydra_client -from ory_hydra_client.api import oidc_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -620,97 +538,34 @@ configuration = ory_hydra_client.Configuration( # Configure Bearer authorization: bearer configuration = ory_hydra_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' + access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = oidc_api.OidcApi(api_client) - id = "id_example" # str | OAuth 2.0 Client ID - o_auth2_client = OAuth2Client( - access_token_strategy="access_token_strategy_example", - allowed_cors_origins=StringSliceJSONFormat([ - "allowed_cors_origins_example", - ]), - audience=StringSliceJSONFormat([ - "audience_example", - ]), - authorization_code_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - authorization_code_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - client_credentials_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - client_id="client_id_example", - client_name="client_name_example", - client_secret="client_secret_example", - client_secret_expires_at=1, - client_uri="client_uri_example", - contacts=StringSliceJSONFormat([ - "contacts_example", - ]), - created_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - frontchannel_logout_session_required=True, - frontchannel_logout_uri="frontchannel_logout_uri_example", - grant_types=StringSliceJSONFormat([ - "grant_types_example", - ]), - implicit_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - implicit_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - jwks=None, - jwks_uri="jwks_uri_example", - jwt_bearer_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - logo_uri="logo_uri_example", - metadata=None, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSliceJSONFormat([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSliceJSONFormat([ - "redirect_uris_example", - ]), - refresh_token_grant_access_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_id_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - refresh_token_grant_refresh_token_lifespan=NullDuration("80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s"), - registration_access_token="registration_access_token_example", - registration_client_uri="registration_client_uri_example", - request_object_signing_alg="request_object_signing_alg_example", - request_uris=StringSliceJSONFormat([ - "request_uris_example", - ]), - response_types=StringSliceJSONFormat([ - "response_types_example", - ]), - scope="scope1 scope-2 scope.3 scope:4", - sector_identifier_uri="sector_identifier_uri_example", - skip_consent=True, - skip_logout_consent=True, - subject_type="subject_type_example", - token_endpoint_auth_method="client_secret_basic", - token_endpoint_auth_signing_alg="token_endpoint_auth_signing_alg_example", - tos_uri="tos_uri_example", - updated_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - userinfo_signed_response_alg="userinfo_signed_response_alg_example", - ) # OAuth2Client | OAuth 2.0 Client Request Body - - # example passing only required values which don't have defaults set + api_instance = ory_hydra_client.OidcApi(api_client) + id = 'id_example' # str | OAuth 2.0 Client ID + o_auth2_client = ory_hydra_client.OAuth2Client() # OAuth2Client | OAuth 2.0 Client Request Body + try: # Set OAuth2 Client using OpenID Dynamic Client Registration api_response = api_instance.set_oidc_dynamic_client(id, o_auth2_client) + print("The response of OidcApi->set_oidc_dynamic_client:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling OidcApi->set_oidc_dynamic_client: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| OAuth 2.0 Client ID | - **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + **id** | **str**| OAuth 2.0 Client ID | + **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | ### Return type @@ -725,7 +580,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/clients/hydra/python/docs/OidcConfiguration.md b/clients/hydra/python/docs/OidcConfiguration.md index bfe68a11911..cf2945327c7 100644 --- a/clients/hydra/python/docs/OidcConfiguration.md +++ b/clients/hydra/python/docs/OidcConfiguration.md @@ -3,41 +3,58 @@ Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **authorization_endpoint** | **str** | OAuth 2.0 Authorization Endpoint URL | -**id_token_signed_response_alg** | **[str]** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | -**id_token_signing_alg_values_supported** | **[str]** | OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. | -**issuer** | **str** | OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. | -**jwks_uri** | **str** | OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | -**response_types_supported** | **[str]** | OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. | -**subject_types_supported** | **[str]** | OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**token_endpoint** | **str** | OAuth 2.0 Token Endpoint URL | -**userinfo_signed_response_alg** | **[str]** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | **backchannel_logout_session_supported** | **bool** | OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP | [optional] **backchannel_logout_supported** | **bool** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] **claims_parameter_supported** | **bool** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claims_supported** | **[str]** | OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. | [optional] -**code_challenge_methods_supported** | **[str]** | OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] +**claims_supported** | **List[str]** | OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. | [optional] +**code_challenge_methods_supported** | **List[str]** | OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] **credentials_endpoint_draft_00** | **str** | OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint. | [optional] -**credentials_supported_draft_00** | [**[CredentialSupportedDraft00]**](CredentialSupportedDraft00.md) | OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. | [optional] +**credentials_supported_draft_00** | [**List[CredentialSupportedDraft00]**](CredentialSupportedDraft00.md) | OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. | [optional] **end_session_endpoint** | **str** | OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. | [optional] **frontchannel_logout_session_supported** | **bool** | OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. | [optional] **frontchannel_logout_supported** | **bool** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grant_types_supported** | **[str]** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**grant_types_supported** | **List[str]** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**id_token_signed_response_alg** | **List[str]** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**id_token_signing_alg_values_supported** | **List[str]** | OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. | +**issuer** | **str** | OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. | +**jwks_uri** | **str** | OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | **registration_endpoint** | **str** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] -**request_object_signing_alg_values_supported** | **[str]** | OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). | [optional] +**request_object_signing_alg_values_supported** | **List[str]** | OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). | [optional] **request_parameter_supported** | **bool** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] **request_uri_parameter_supported** | **bool** | OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] **require_request_uri_registration** | **bool** | OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**response_modes_supported** | **[str]** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**response_modes_supported** | **List[str]** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**response_types_supported** | **List[str]** | OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. | **revocation_endpoint** | **str** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopes_supported** | **[str]** | OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used | [optional] -**token_endpoint_auth_methods_supported** | **[str]** | OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 | [optional] +**scopes_supported** | **List[str]** | OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used | [optional] +**subject_types_supported** | **List[str]** | OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | +**token_endpoint** | **str** | OAuth 2.0 Token Endpoint URL | +**token_endpoint_auth_methods_supported** | **List[str]** | OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 | [optional] **userinfo_endpoint** | **str** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] -**userinfo_signing_alg_values_supported** | **[str]** | OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**userinfo_signed_response_alg** | **List[str]** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**userinfo_signing_alg_values_supported** | **List[str]** | OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. | [optional] + +## Example + +```python +from ory_hydra_client.models.oidc_configuration import OidcConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of OidcConfiguration from a JSON string +oidc_configuration_instance = OidcConfiguration.from_json(json) +# print the JSON string representation of the object +print(OidcConfiguration.to_json()) +# convert the object into a dict +oidc_configuration_dict = oidc_configuration_instance.to_dict() +# create an instance of OidcConfiguration from a dict +oidc_configuration_from_dict = OidcConfiguration.from_dict(oidc_configuration_dict) +``` [[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/clients/hydra/python/docs/OidcUserInfo.md b/clients/hydra/python/docs/OidcUserInfo.md index 5b555deb64e..9437f32d7c3 100644 --- a/clients/hydra/python/docs/OidcUserInfo.md +++ b/clients/hydra/python/docs/OidcUserInfo.md @@ -3,6 +3,7 @@ OpenID Connect Userinfo ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **birthdate** | **str** | End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. | [optional] @@ -24,8 +25,24 @@ Name | Type | Description | Notes **updated_at** | **int** | Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. | [optional] **website** | **str** | URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. | [optional] **zoneinfo** | **str** | String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.oidc_user_info import OidcUserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of OidcUserInfo from a JSON string +oidc_user_info_instance = OidcUserInfo.from_json(json) +# print the JSON string representation of the object +print(OidcUserInfo.to_json()) + +# convert the object into a dict +oidc_user_info_dict = oidc_user_info_instance.to_dict() +# create an instance of OidcUserInfo from a dict +oidc_user_info_from_dict = OidcUserInfo.from_dict(oidc_user_info_dict) +``` [[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/clients/hydra/python/docs/Pagination.md b/clients/hydra/python/docs/Pagination.md index 8c0b2c15a69..afdfeb9ccc8 100644 --- a/clients/hydra/python/docs/Pagination.md +++ b/clients/hydra/python/docs/Pagination.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**page_size** | **int** | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of 250 -**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of "1" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**page_size** | **int** | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] +**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] + +## Example + +```python +from ory_hydra_client.models.pagination import Pagination + +# TODO update the JSON string below +json = "{}" +# create an instance of Pagination from a JSON string +pagination_instance = Pagination.from_json(json) +# print the JSON string representation of the object +print(Pagination.to_json()) +# convert the object into a dict +pagination_dict = pagination_instance.to_dict() +# create an instance of Pagination from a dict +pagination_from_dict = Pagination.from_dict(pagination_dict) +``` [[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/clients/hydra/python/docs/PaginationHeaders.md b/clients/hydra/python/docs/PaginationHeaders.md index 5419a56e1fe..99caf051bd2 100644 --- a/clients/hydra/python/docs/PaginationHeaders.md +++ b/clients/hydra/python/docs/PaginationHeaders.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **link** | **str** | The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header | [optional] **x_total_count** | **str** | The total number of clients. in: header | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.pagination_headers import PaginationHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationHeaders from a JSON string +pagination_headers_instance = PaginationHeaders.from_json(json) +# print the JSON string representation of the object +print(PaginationHeaders.to_json()) + +# convert the object into a dict +pagination_headers_dict = pagination_headers_instance.to_dict() +# create an instance of PaginationHeaders from a dict +pagination_headers_from_dict = PaginationHeaders.from_dict(pagination_headers_dict) +``` [[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/clients/hydra/python/docs/RFC6749ErrorJson.md b/clients/hydra/python/docs/RFC6749ErrorJson.md index 81c39b35535..32e5722743d 100644 --- a/clients/hydra/python/docs/RFC6749ErrorJson.md +++ b/clients/hydra/python/docs/RFC6749ErrorJson.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **str** | | [optional] @@ -9,8 +10,24 @@ Name | Type | Description | Notes **error_description** | **str** | | [optional] **error_hint** | **str** | | [optional] **status_code** | **int** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.rfc6749_error_json import RFC6749ErrorJson + +# TODO update the JSON string below +json = "{}" +# create an instance of RFC6749ErrorJson from a JSON string +rfc6749_error_json_instance = RFC6749ErrorJson.from_json(json) +# print the JSON string representation of the object +print(RFC6749ErrorJson.to_json()) + +# convert the object into a dict +rfc6749_error_json_dict = rfc6749_error_json_instance.to_dict() +# create an instance of RFC6749ErrorJson from a dict +rfc6749_error_json_from_dict = RFC6749ErrorJson.from_dict(rfc6749_error_json_dict) +``` [[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/clients/hydra/python/docs/RejectOAuth2Request.md b/clients/hydra/python/docs/RejectOAuth2Request.md index 45ba0c1218c..525b87cfafc 100644 --- a/clients/hydra/python/docs/RejectOAuth2Request.md +++ b/clients/hydra/python/docs/RejectOAuth2Request.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **str** | The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. | [optional] @@ -9,8 +10,24 @@ Name | Type | Description | Notes **error_description** | **str** | Description of the error in a human readable format. | [optional] **error_hint** | **str** | Hint to help resolve the error. | [optional] **status_code** | **int** | Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request + +# TODO update the JSON string below +json = "{}" +# create an instance of RejectOAuth2Request from a JSON string +reject_o_auth2_request_instance = RejectOAuth2Request.from_json(json) +# print the JSON string representation of the object +print(RejectOAuth2Request.to_json()) + +# convert the object into a dict +reject_o_auth2_request_dict = reject_o_auth2_request_instance.to_dict() +# create an instance of RejectOAuth2Request from a dict +reject_o_auth2_request_from_dict = RejectOAuth2Request.from_dict(reject_o_auth2_request_dict) +``` [[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/clients/hydra/python/docs/StringSliceJSONFormat.md b/clients/hydra/python/docs/StringSliceJSONFormat.md deleted file mode 100644 index b6786d7534a..00000000000 --- a/clients/hydra/python/docs/StringSliceJSONFormat.md +++ /dev/null @@ -1,11 +0,0 @@ -# StringSliceJSONFormat - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **[str]** | | - -[[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/clients/hydra/python/docs/TokenPagination.md b/clients/hydra/python/docs/TokenPagination.md index 3aaf984bad6..08702f43245 100644 --- a/clients/hydra/python/docs/TokenPagination.md +++ b/clients/hydra/python/docs/TokenPagination.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**page_size** | **int** | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of 250 -**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of "1" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**page_size** | **int** | Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] +**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] + +## Example + +```python +from ory_hydra_client.models.token_pagination import TokenPagination + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenPagination from a JSON string +token_pagination_instance = TokenPagination.from_json(json) +# print the JSON string representation of the object +print(TokenPagination.to_json()) +# convert the object into a dict +token_pagination_dict = token_pagination_instance.to_dict() +# create an instance of TokenPagination from a dict +token_pagination_from_dict = TokenPagination.from_dict(token_pagination_dict) +``` [[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/clients/hydra/python/docs/TokenPaginationHeaders.md b/clients/hydra/python/docs/TokenPaginationHeaders.md index 4a77de9c8ee..a201f3e6c7b 100644 --- a/clients/hydra/python/docs/TokenPaginationHeaders.md +++ b/clients/hydra/python/docs/TokenPaginationHeaders.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **link** | **str** | The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header | [optional] **x_total_count** | **str** | The total number of clients. in: header | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.token_pagination_headers import TokenPaginationHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenPaginationHeaders from a JSON string +token_pagination_headers_instance = TokenPaginationHeaders.from_json(json) +# print the JSON string representation of the object +print(TokenPaginationHeaders.to_json()) + +# convert the object into a dict +token_pagination_headers_dict = token_pagination_headers_instance.to_dict() +# create an instance of TokenPaginationHeaders from a dict +token_pagination_headers_from_dict = TokenPaginationHeaders.from_dict(token_pagination_headers_dict) +``` [[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/clients/hydra/python/docs/TokenPaginationRequestParameters.md b/clients/hydra/python/docs/TokenPaginationRequestParameters.md index 1a0f709508f..ce201e9d16d 100644 --- a/clients/hydra/python/docs/TokenPaginationRequestParameters.md +++ b/clients/hydra/python/docs/TokenPaginationRequestParameters.md @@ -3,12 +3,29 @@ The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**page_size** | **int** | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of 250 -**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] if omitted the server will use the default value of "1" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**page_size** | **int** | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to 250] +**page_token** | **str** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | [optional] [default to '1'] + +## Example + +```python +from ory_hydra_client.models.token_pagination_request_parameters import TokenPaginationRequestParameters + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenPaginationRequestParameters from a JSON string +token_pagination_request_parameters_instance = TokenPaginationRequestParameters.from_json(json) +# print the JSON string representation of the object +print(TokenPaginationRequestParameters.to_json()) +# convert the object into a dict +token_pagination_request_parameters_dict = token_pagination_request_parameters_instance.to_dict() +# create an instance of TokenPaginationRequestParameters from a dict +token_pagination_request_parameters_from_dict = TokenPaginationRequestParameters.from_dict(token_pagination_request_parameters_dict) +``` [[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/clients/hydra/python/docs/TokenPaginationResponseHeaders.md b/clients/hydra/python/docs/TokenPaginationResponseHeaders.md index ad76f344d88..9fe17f8fe61 100644 --- a/clients/hydra/python/docs/TokenPaginationResponseHeaders.md +++ b/clients/hydra/python/docs/TokenPaginationResponseHeaders.md @@ -3,12 +3,29 @@ The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **link** | **str** | The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\" | [optional] **x_total_count** | **int** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.token_pagination_response_headers import TokenPaginationResponseHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenPaginationResponseHeaders from a JSON string +token_pagination_response_headers_instance = TokenPaginationResponseHeaders.from_json(json) +# print the JSON string representation of the object +print(TokenPaginationResponseHeaders.to_json()) + +# convert the object into a dict +token_pagination_response_headers_dict = token_pagination_response_headers_instance.to_dict() +# create an instance of TokenPaginationResponseHeaders from a dict +token_pagination_response_headers_from_dict = TokenPaginationResponseHeaders.from_dict(token_pagination_response_headers_dict) +``` [[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/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md b/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md index f991438b8b8..7c82a45afa3 100644 --- a/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md +++ b/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md @@ -3,16 +3,33 @@ Trust OAuth2 JWT Bearer Grant Type Issuer Request Body ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allow_any_subject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **expires_at** | **datetime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | **issuer** | **str** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | **jwk** | [**JsonWebKey**](JsonWebKey.md) | | -**scope** | **[str]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**allow_any_subject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] +**scope** | **List[str]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | **subject** | **str** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer + +# TODO update the JSON string below +json = "{}" +# create an instance of TrustOAuth2JwtGrantIssuer from a JSON string +trust_o_auth2_jwt_grant_issuer_instance = TrustOAuth2JwtGrantIssuer.from_json(json) +# print the JSON string representation of the object +print(TrustOAuth2JwtGrantIssuer.to_json()) + +# convert the object into a dict +trust_o_auth2_jwt_grant_issuer_dict = trust_o_auth2_jwt_grant_issuer_instance.to_dict() +# create an instance of TrustOAuth2JwtGrantIssuer from a dict +trust_o_auth2_jwt_grant_issuer_from_dict = TrustOAuth2JwtGrantIssuer.from_dict(trust_o_auth2_jwt_grant_issuer_dict) +``` [[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/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md index 9a06d633a16..d929798b535 100644 --- a/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md +++ b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md @@ -3,6 +3,7 @@ OAuth2 JWT Bearer Grant Type Issuer Trust Relationship ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allow_any_subject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] @@ -11,10 +12,26 @@ Name | Type | Description | Notes **id** | **str** | | [optional] **issuer** | **str** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] **public_key** | [**TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] -**scope** | **[str]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] +**scope** | **List[str]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **subject** | **str** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer + +# TODO update the JSON string below +json = "{}" +# create an instance of TrustedOAuth2JwtGrantIssuer from a JSON string +trusted_o_auth2_jwt_grant_issuer_instance = TrustedOAuth2JwtGrantIssuer.from_json(json) +# print the JSON string representation of the object +print(TrustedOAuth2JwtGrantIssuer.to_json()) + +# convert the object into a dict +trusted_o_auth2_jwt_grant_issuer_dict = trusted_o_auth2_jwt_grant_issuer_instance.to_dict() +# create an instance of TrustedOAuth2JwtGrantIssuer from a dict +trusted_o_auth2_jwt_grant_issuer_from_dict = TrustedOAuth2JwtGrantIssuer.from_dict(trusted_o_auth2_jwt_grant_issuer_dict) +``` [[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/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md deleted file mode 100644 index c42e4264d36..00000000000 --- a/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md +++ /dev/null @@ -1,12 +0,0 @@ -# TrustedOAuth2JwtGrantIssuers - -OAuth2 JWT Bearer Grant Type Issuer Trust Relationships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**[TrustedOAuth2JwtGrantIssuer]**](TrustedOAuth2JwtGrantIssuer.md) | OAuth2 JWT Bearer Grant Type Issuer Trust Relationships | - -[[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/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md index 08fefbdde40..2f8d0500296 100644 --- a/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md +++ b/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -3,12 +3,29 @@ OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **kid** | **str** | The \"key_id\" is key unique identifier (same as kid header in jws/jwt). | [optional] **set** | **str** | The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey + +# TODO update the JSON string below +json = "{}" +# create an instance of TrustedOAuth2JwtGrantJsonWebKey from a JSON string +trusted_o_auth2_jwt_grant_json_web_key_instance = TrustedOAuth2JwtGrantJsonWebKey.from_json(json) +# print the JSON string representation of the object +print(TrustedOAuth2JwtGrantJsonWebKey.to_json()) + +# convert the object into a dict +trusted_o_auth2_jwt_grant_json_web_key_dict = trusted_o_auth2_jwt_grant_json_web_key_instance.to_dict() +# create an instance of TrustedOAuth2JwtGrantJsonWebKey from a dict +trusted_o_auth2_jwt_grant_json_web_key_from_dict = TrustedOAuth2JwtGrantJsonWebKey.from_dict(trusted_o_auth2_jwt_grant_json_web_key_dict) +``` [[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/clients/hydra/python/docs/VerifiableCredentialPrimingResponse.md b/clients/hydra/python/docs/VerifiableCredentialPrimingResponse.md index 0989f3c6397..ce72cbfe967 100644 --- a/clients/hydra/python/docs/VerifiableCredentialPrimingResponse.md +++ b/clients/hydra/python/docs/VerifiableCredentialPrimingResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **c_nonce** | **str** | | [optional] @@ -12,8 +13,24 @@ Name | Type | Description | Notes **error_hint** | **str** | | [optional] **format** | **str** | | [optional] **status_code** | **int** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifiableCredentialPrimingResponse from a JSON string +verifiable_credential_priming_response_instance = VerifiableCredentialPrimingResponse.from_json(json) +# print the JSON string representation of the object +print(VerifiableCredentialPrimingResponse.to_json()) + +# convert the object into a dict +verifiable_credential_priming_response_dict = verifiable_credential_priming_response_instance.to_dict() +# create an instance of VerifiableCredentialPrimingResponse from a dict +verifiable_credential_priming_response_from_dict = VerifiableCredentialPrimingResponse.from_dict(verifiable_credential_priming_response_dict) +``` [[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/clients/hydra/python/docs/VerifiableCredentialProof.md b/clients/hydra/python/docs/VerifiableCredentialProof.md index 263395bf1d2..f2181cd46e3 100644 --- a/clients/hydra/python/docs/VerifiableCredentialProof.md +++ b/clients/hydra/python/docs/VerifiableCredentialProof.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **jwt** | **str** | | [optional] **proof_type** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.verifiable_credential_proof import VerifiableCredentialProof + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifiableCredentialProof from a JSON string +verifiable_credential_proof_instance = VerifiableCredentialProof.from_json(json) +# print the JSON string representation of the object +print(VerifiableCredentialProof.to_json()) + +# convert the object into a dict +verifiable_credential_proof_dict = verifiable_credential_proof_instance.to_dict() +# create an instance of VerifiableCredentialProof from a dict +verifiable_credential_proof_from_dict = VerifiableCredentialProof.from_dict(verifiable_credential_proof_dict) +``` [[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/clients/hydra/python/docs/VerifiableCredentialResponse.md b/clients/hydra/python/docs/VerifiableCredentialResponse.md index 33749ce9688..7da03fa1046 100644 --- a/clients/hydra/python/docs/VerifiableCredentialResponse.md +++ b/clients/hydra/python/docs/VerifiableCredentialResponse.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **credential_draft_00** | **str** | | [optional] **format** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifiableCredentialResponse from a JSON string +verifiable_credential_response_instance = VerifiableCredentialResponse.from_json(json) +# print the JSON string representation of the object +print(VerifiableCredentialResponse.to_json()) + +# convert the object into a dict +verifiable_credential_response_dict = verifiable_credential_response_instance.to_dict() +# create an instance of VerifiableCredentialResponse from a dict +verifiable_credential_response_from_dict = VerifiableCredentialResponse.from_dict(verifiable_credential_response_dict) +``` [[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/clients/hydra/python/docs/Version.md b/clients/hydra/python/docs/Version.md index f320e549d48..537853f2543 100644 --- a/clients/hydra/python/docs/Version.md +++ b/clients/hydra/python/docs/Version.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **version** | **str** | Version is the service's version. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from ory_hydra_client.models.version import Version + +# TODO update the JSON string below +json = "{}" +# create an instance of Version from a JSON string +version_instance = Version.from_json(json) +# print the JSON string representation of the object +print(Version.to_json()) + +# convert the object into a dict +version_dict = version_instance.to_dict() +# create an instance of Version from a dict +version_from_dict = Version.from_dict(version_dict) +``` [[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/clients/hydra/python/docs/WellknownApi.md b/clients/hydra/python/docs/WellknownApi.md index 12b5e854eb6..c4f71cb17fb 100644 --- a/clients/hydra/python/docs/WellknownApi.md +++ b/clients/hydra/python/docs/WellknownApi.md @@ -18,12 +18,11 @@ This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Toke ```python -import time import ory_hydra_client -from ory_hydra_client.api import wellknown_api -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = ory_hydra_client.Configuration( @@ -32,21 +31,23 @@ configuration = ory_hydra_client.Configuration( # Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: +with ory_hydra_client.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = wellknown_api.WellknownApi(api_client) + api_instance = ory_hydra_client.WellknownApi(api_client) - # example, this endpoint has no required or optional parameters try: # Discover Well-Known JSON Web Keys api_response = api_instance.discover_json_web_keys() + print("The response of WellknownApi->discover_json_web_keys:\n") pprint(api_response) - except ory_hydra_client.ApiException as e: + except Exception as e: print("Exception when calling WellknownApi->discover_json_web_keys: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -62,7 +63,6 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/clients/hydra/python/ory_hydra_client/__init__.py b/clients/hydra/python/ory_hydra_client/__init__.py index 8d53ec25b72..9e054a3b73f 100644 --- a/clients/hydra/python/ory_hydra_client/__init__.py +++ b/clients/hydra/python/ory_hydra_client/__init__.py @@ -1,28 +1,82 @@ +# coding: utf-8 + # flake8: noqa """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -__version__ = "v2.2.0" +__version__ = "v2.2.1" + +# import apis into sdk package +from ory_hydra_client.api.jwk_api import JwkApi +from ory_hydra_client.api.metadata_api import MetadataApi +from ory_hydra_client.api.o_auth2_api import OAuth2Api +from ory_hydra_client.api.oidc_api import OidcApi +from ory_hydra_client.api.wellknown_api import WellknownApi # import ApiClient +from ory_hydra_client.api_response import ApiResponse from ory_hydra_client.api_client import ApiClient - -# import Configuration from ory_hydra_client.configuration import Configuration - -# import exceptions from ory_hydra_client.exceptions import OpenApiException -from ory_hydra_client.exceptions import ApiAttributeError from ory_hydra_client.exceptions import ApiTypeError from ory_hydra_client.exceptions import ApiValueError from ory_hydra_client.exceptions import ApiKeyError +from ory_hydra_client.exceptions import ApiAttributeError from ory_hydra_client.exceptions import ApiException + +# import models into sdk package +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody +from ory_hydra_client.models.credential_supported_draft00 import CredentialSupportedDraft00 +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.generic_error import GenericError +from ory_hydra_client.models.get_version200_response import GetVersion200Response +from ory_hydra_client.models.health_not_ready_status import HealthNotReadyStatus +from ory_hydra_client.models.health_status import HealthStatus +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token +from ory_hydra_client.models.is_ready200_response import IsReady200Response +from ory_hydra_client.models.is_ready503_response import IsReady503Response +from ory_hydra_client.models.json_patch import JsonPatch +from ory_hydra_client.models.json_web_key import JsonWebKey +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession +from ory_hydra_client.models.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange +from ory_hydra_client.models.oidc_configuration import OidcConfiguration +from ory_hydra_client.models.oidc_user_info import OidcUserInfo +from ory_hydra_client.models.pagination import Pagination +from ory_hydra_client.models.pagination_headers import PaginationHeaders +from ory_hydra_client.models.rfc6749_error_json import RFC6749ErrorJson +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.models.token_pagination import TokenPagination +from ory_hydra_client.models.token_pagination_headers import TokenPaginationHeaders +from ory_hydra_client.models.token_pagination_request_parameters import TokenPaginationRequestParameters +from ory_hydra_client.models.token_pagination_response_headers import TokenPaginationResponseHeaders +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey +from ory_hydra_client.models.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse +from ory_hydra_client.models.verifiable_credential_proof import VerifiableCredentialProof +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse +from ory_hydra_client.models.version import Version diff --git a/clients/hydra/python/ory_hydra_client/api/__init__.py b/clients/hydra/python/ory_hydra_client/api/__init__.py index 14aaf3e2ce9..6d968697fd4 100644 --- a/clients/hydra/python/ory_hydra_client/api/__init__.py +++ b/clients/hydra/python/ory_hydra_client/api/__init__.py @@ -1,3 +1,9 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from ory_hydra_client.apis import JwkApi +# flake8: noqa + +# import apis into api package +from ory_hydra_client.api.jwk_api import JwkApi +from ory_hydra_client.api.metadata_api import MetadataApi +from ory_hydra_client.api.o_auth2_api import OAuth2Api +from ory_hydra_client.api.oidc_api import OidcApi +from ory_hydra_client.api.wellknown_api import WellknownApi + diff --git a/clients/hydra/python/ory_hydra_client/api/jwk_api.py b/clients/hydra/python/ory_hydra_client/api/jwk_api.py index a169f34b97a..453a53fd567 100644 --- a/clients/hydra/python/ory_hydra_client/api/jwk_api.py +++ b/clients/hydra/python/ory_hydra_client/api/jwk_api.py @@ -1,1021 +1,1977 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet +from ory_hydra_client.models.json_web_key import JsonWebKey +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet -from ory_hydra_client.api_client import ApiClient, Endpoint as _Endpoint -from ory_hydra_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.json_web_key import JsonWebKey -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet +from ory_hydra_client.api_client import ApiClient, RequestSerialized +from ory_hydra_client.api_response import ApiResponse +from ory_hydra_client.rest import RESTResponseType -class JwkApi(object): +class JwkApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.create_json_web_key_set_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKeySet,), - 'auth': [], - 'endpoint_path': '/admin/keys/{set}', - 'operation_id': 'create_json_web_key_set', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'create_json_web_key_set', - ], - 'required': [ - 'set', - 'create_json_web_key_set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'create_json_web_key_set': - (CreateJsonWebKeySet,), - }, - 'attribute_map': { - 'set': 'set', - }, - 'location_map': { - 'set': 'path', - 'create_json_web_key_set': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_json_web_key_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/keys/{set}/{kid}', - 'operation_id': 'delete_json_web_key', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'kid', - ], - 'required': [ - 'set', - 'kid', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'kid': - (str,), - }, - 'attribute_map': { - 'set': 'set', - 'kid': 'kid', - }, - 'location_map': { - 'set': 'path', - 'kid': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_json_web_key_set_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/keys/{set}', - 'operation_id': 'delete_json_web_key_set', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - ], - 'required': [ - 'set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - }, - 'attribute_map': { - 'set': 'set', - }, - 'location_map': { - 'set': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_json_web_key_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKeySet,), - 'auth': [], - 'endpoint_path': '/admin/keys/{set}/{kid}', - 'operation_id': 'get_json_web_key', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'kid', - ], - 'required': [ - 'set', - 'kid', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'kid': - (str,), - }, - 'attribute_map': { - 'set': 'set', - 'kid': 'kid', - }, - 'location_map': { - 'set': 'path', - 'kid': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_json_web_key_set_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKeySet,), - 'auth': [], - 'endpoint_path': '/admin/keys/{set}', - 'operation_id': 'get_json_web_key_set', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - ], - 'required': [ - 'set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - }, - 'attribute_map': { - 'set': 'set', - }, - 'location_map': { - 'set': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.set_json_web_key_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKey,), - 'auth': [], - 'endpoint_path': '/admin/keys/{set}/{kid}', - 'operation_id': 'set_json_web_key', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'kid', - 'json_web_key', - ], - 'required': [ - 'set', - 'kid', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'kid': - (str,), - 'json_web_key': - (JsonWebKey,), - }, - 'attribute_map': { - 'set': 'set', - 'kid': 'kid', - }, - 'location_map': { - 'set': 'path', - 'kid': 'path', - 'json_web_key': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.set_json_web_key_set_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKeySet,), - 'auth': [], - 'endpoint_path': '/admin/keys/{set}', - 'operation_id': 'set_json_web_key_set', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'json_web_key_set', - ], - 'required': [ - 'set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'json_web_key_set': - (JsonWebKeySet,), - }, - 'attribute_map': { - 'set': 'set', - }, - 'location_map': { - 'set': 'path', - 'json_web_key_set': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def create_json_web_key_set( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + create_json_web_key_set: CreateJsonWebKeySet, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKeySet: + """Create JSON Web Key + + This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param create_json_web_key_set: (required) + :type create_json_web_key_set: CreateJsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_json_web_key_set_serialize( + set=set, + create_json_web_key_set=create_json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_json_web_key_set_with_http_info( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + create_json_web_key_set: CreateJsonWebKeySet, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKeySet]: + """Create JSON Web Key + + This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param create_json_web_key_set: (required) + :type create_json_web_key_set: CreateJsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_json_web_key_set_serialize( + set=set, + create_json_web_key_set=create_json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_json_web_key_set_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + create_json_web_key_set: CreateJsonWebKeySet, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create JSON Web Key + + This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param create_json_web_key_set: (required) + :type create_json_web_key_set: CreateJsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_json_web_key_set_serialize( + set=set, + create_json_web_key_set=create_json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_json_web_key_set_serialize( self, set, create_json_web_key_set, - **kwargs - ): - """Create JSON Web Key # noqa: E501 - - This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_json_web_key_set(set, create_json_web_key_set, async_req=True) - >>> result = thread.get() - - Args: - set (str): The JSON Web Key Set ID - create_json_web_key_set (CreateJsonWebKeySet): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKeySet - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - kwargs['create_json_web_key_set'] = \ - create_json_web_key_set - return self.create_json_web_key_set_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_json_web_key_set is not None: + _body_params = create_json_web_key_set + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/admin/keys/{set}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_json_web_key( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + kid: Annotated[StrictStr, Field(description="The JSON Web Key ID (kid)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete JSON Web Key + + Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param kid: The JSON Web Key ID (kid) (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_json_web_key_with_http_info( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + kid: Annotated[StrictStr, Field(description="The JSON Web Key ID (kid)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete JSON Web Key + + Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param kid: The JSON Web Key ID (kid) (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_json_web_key_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + kid: Annotated[StrictStr, Field(description="The JSON Web Key ID (kid)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete JSON Web Key + + Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param kid: The JSON Web Key ID (kid) (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_json_web_key_serialize( self, set, kid, - **kwargs - ): - """Delete JSON Web Key # noqa: E501 - - Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_json_web_key(set, kid, async_req=True) - >>> result = thread.get() - - Args: - set (str): The JSON Web Key Set - kid (str): The JSON Web Key ID (kid) - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - kwargs['kid'] = \ - kid - return self.delete_json_web_key_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + if kid is not None: + _path_params['kid'] = kid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/keys/{set}/{kid}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_json_web_key_set( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete JSON Web Key Set + + Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_json_web_key_set_with_http_info( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete JSON Web Key Set + + Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_json_web_key_set_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete JSON Web Key Set + + Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_json_web_key_set_serialize( self, set, - **kwargs - ): - """Delete JSON Web Key Set # noqa: E501 - - Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_json_web_key_set(set, async_req=True) - >>> result = thread.get() - - Args: - set (str): The JSON Web Key Set - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - return self.delete_json_web_key_set_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + # process the path parameters + if set is not None: + _path_params['set'] = set + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/keys/{set}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_json_web_key( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKeySet: + """Get JSON Web Key + + This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + + :param set: JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_json_web_key_with_http_info( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKeySet]: + """Get JSON Web Key + + This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + + :param set: JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_json_web_key_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get JSON Web Key + + This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + + :param set: JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_serialize( + set=set, + kid=kid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_json_web_key_serialize( self, set, kid, - **kwargs - ): - """Get JSON Web Key # noqa: E501 - - This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_json_web_key(set, kid, async_req=True) - >>> result = thread.get() - - Args: - set (str): JSON Web Key Set ID - kid (str): JSON Web Key ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKeySet - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - kwargs['kid'] = \ - kid - return self.get_json_web_key_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + if kid is not None: + _path_params['kid'] = kid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/keys/{set}/{kid}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_json_web_key_set( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKeySet: + """Retrieve a JSON Web Key Set + + This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: JSON Web Key Set ID (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_json_web_key_set_with_http_info( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKeySet]: + """Retrieve a JSON Web Key Set + + This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: JSON Web Key Set ID (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_json_web_key_set_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="JSON Web Key Set ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve a JSON Web Key Set + + This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: JSON Web Key Set ID (required) + :type set: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_json_web_key_set_serialize( + set=set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_json_web_key_set_serialize( self, set, - **kwargs - ): - """Retrieve a JSON Web Key Set # noqa: E501 - - This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_json_web_key_set(set, async_req=True) - >>> result = thread.get() - - Args: - set (str): JSON Web Key Set ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKeySet - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - return self.get_json_web_key_set_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/keys/{set}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def set_json_web_key( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + json_web_key: Optional[JsonWebKey] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKey: + """Set JSON Web Key + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param json_web_key: + :type json_web_key: JsonWebKey + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_serialize( + set=set, + kid=kid, + json_web_key=json_web_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKey", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_json_web_key_with_http_info( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + json_web_key: Optional[JsonWebKey] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKey]: + """Set JSON Web Key + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param json_web_key: + :type json_web_key: JsonWebKey + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_serialize( + set=set, + kid=kid, + json_web_key=json_web_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKey", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_json_web_key_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + kid: Annotated[StrictStr, Field(description="JSON Web Key ID")], + json_web_key: Optional[JsonWebKey] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set JSON Web Key + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param kid: JSON Web Key ID (required) + :type kid: str + :param json_web_key: + :type json_web_key: JsonWebKey + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_serialize( + set=set, + kid=kid, + json_web_key=json_web_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKey", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_json_web_key_serialize( self, set, kid, - **kwargs - ): - """Set JSON Web Key # noqa: E501 - - Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_json_web_key(set, kid, async_req=True) - >>> result = thread.get() - - Args: - set (str): The JSON Web Key Set ID - kid (str): JSON Web Key ID - - Keyword Args: - json_web_key (JsonWebKey): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKey - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - kwargs['kid'] = \ - kid - return self.set_json_web_key_endpoint.call_with_http_info(**kwargs) + json_web_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + if kid is not None: + _path_params['kid'] = kid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if json_web_key is not None: + _body_params = json_web_key + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/keys/{set}/{kid}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def set_json_web_key_set( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + json_web_key_set: Optional[JsonWebKeySet] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKeySet: + """Update a JSON Web Key Set + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param json_web_key_set: + :type json_web_key_set: JsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_set_serialize( + set=set, + json_web_key_set=json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_json_web_key_set_with_http_info( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + json_web_key_set: Optional[JsonWebKeySet] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKeySet]: + """Update a JSON Web Key Set + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param json_web_key_set: + :type json_web_key_set: JsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_set_serialize( + set=set, + json_web_key_set=json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_json_web_key_set_without_preload_content( + self, + set: Annotated[StrictStr, Field(description="The JSON Web Key Set ID")], + json_web_key_set: Optional[JsonWebKeySet] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a JSON Web Key Set + + Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + + :param set: The JSON Web Key Set ID (required) + :type set: str + :param json_web_key_set: + :type json_web_key_set: JsonWebKeySet + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_json_web_key_set_serialize( + set=set, + json_web_key_set=json_web_key_set, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_json_web_key_set_serialize( self, set, - **kwargs - ): - """Update a JSON Web Key Set # noqa: E501 - - Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_json_web_key_set(set, async_req=True) - >>> result = thread.get() - - Args: - set (str): The JSON Web Key Set ID - - Keyword Args: - json_web_key_set (JsonWebKeySet): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKeySet - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['set'] = \ - set - return self.set_json_web_key_set_endpoint.call_with_http_info(**kwargs) + json_web_key_set, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if set is not None: + _path_params['set'] = set + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if json_web_key_set is not None: + _body_params = json_web_key_set + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/keys/{set}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/clients/hydra/python/ory_hydra_client/api/metadata_api.py b/clients/hydra/python/ory_hydra_client/api/metadata_api.py index 7e50147d348..60bbda0e54d 100644 --- a/clients/hydra/python/ory_hydra_client/api/metadata_api.py +++ b/clients/hydra/python/ory_hydra_client/api/metadata_api.py @@ -1,403 +1,774 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from ory_hydra_client.models.get_version200_response import GetVersion200Response +from ory_hydra_client.models.health_status import HealthStatus +from ory_hydra_client.models.is_ready200_response import IsReady200Response -from ory_hydra_client.api_client import ApiClient, Endpoint as _Endpoint -from ory_hydra_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.get_version200_response import GetVersion200Response -from ory_hydra_client.model.health_status import HealthStatus -from ory_hydra_client.model.is_ready200_response import IsReady200Response -from ory_hydra_client.model.is_ready503_response import IsReady503Response +from ory_hydra_client.api_client import ApiClient, RequestSerialized +from ory_hydra_client.api_response import ApiResponse +from ory_hydra_client.rest import RESTResponseType -class MetadataApi(object): +class MetadataApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.get_version_endpoint = _Endpoint( - settings={ - 'response_type': (GetVersion200Response,), - 'auth': [], - 'endpoint_path': '/version', - 'operation_id': 'get_version', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.is_alive_endpoint = _Endpoint( - settings={ - 'response_type': (HealthStatus,), - 'auth': [], - 'endpoint_path': '/health/alive', - 'operation_id': 'is_alive', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.is_ready_endpoint = _Endpoint( - settings={ - 'response_type': (IsReady200Response,), - 'auth': [], - 'endpoint_path': '/health/ready', - 'operation_id': 'is_ready', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def get_version( self, - **kwargs - ): - """Return Running Software Version. # noqa: E501 - - This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_version(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - GetVersion200Response - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetVersion200Response: + """Return Running Software Version. + + This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetVersion200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_version_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetVersion200Response]: + """Return Running Software Version. + + This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetVersion200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + + @validate_call + def get_version_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Return Running Software Version. + + This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetVersion200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _get_version_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/version', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_version_endpoint.call_with_http_info(**kwargs) + + + + @validate_call def is_alive( self, - **kwargs - ): - """Check HTTP Server Status # noqa: E501 - - This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.is_alive(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - HealthStatus - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HealthStatus: + """Check HTTP Server Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_alive_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthStatus", + '500': "GenericError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def is_alive_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HealthStatus]: + """Check HTTP Server Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_alive_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthStatus", + '500': "GenericError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + + @validate_call + def is_alive_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check HTTP Server Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_alive_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthStatus", + '500': "GenericError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _is_alive_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/health/alive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.is_alive_endpoint.call_with_http_info(**kwargs) + + + + @validate_call def is_ready( self, - **kwargs - ): - """Check HTTP Server and Database Status # noqa: E501 - - This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.is_ready(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - IsReady200Response - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IsReady200Response: + """Check HTTP Server and Database Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsReady200Response", + '503': "IsReady503Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def is_ready_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IsReady200Response]: + """Check HTTP Server and Database Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsReady200Response", + '503': "IsReady503Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + + @validate_call + def is_ready_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check HTTP Server and Database Status + + This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._is_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsReady200Response", + '503': "IsReady503Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _is_ready_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/health/ready', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.is_ready_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py b/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py index 36105fd300d..57027cc9618 100644 --- a/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py +++ b/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py @@ -1,3915 +1,7873 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - + Generated by OpenAPI Generator (https://openapi-generator.tech) -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.api_client import ApiClient, Endpoint as _Endpoint -from ory_hydra_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from ory_hydra_client.model.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest -from ory_hydra_client.model.accept_o_auth2_login_request import AcceptOAuth2LoginRequest -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.introspected_o_auth2_token import IntrospectedOAuth2Token -from ory_hydra_client.model.json_patch_document import JsonPatchDocument -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans -from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest -from ory_hydra_client.model.o_auth2_consent_sessions import OAuth2ConsentSessions -from ory_hydra_client.model.o_auth2_login_request import OAuth2LoginRequest -from ory_hydra_client.model.o_auth2_logout_request import OAuth2LogoutRequest -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.o_auth2_token_exchange import OAuth2TokenExchange -from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request -from ory_hydra_client.model.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuers import TrustedOAuth2JwtGrantIssuers - - -class OAuth2Api(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token +from ory_hydra_client.models.json_patch import JsonPatch +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer + +from ory_hydra_client.api_client import ApiClient, RequestSerialized +from ory_hydra_client.api_response import ApiResponse +from ory_hydra_client.rest import RESTResponseType + + +class OAuth2Api: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.accept_o_auth2_consent_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2RedirectTo,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/consent/accept', - 'operation_id': 'accept_o_auth2_consent_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'consent_challenge', - 'accept_o_auth2_consent_request', - ], - 'required': [ - 'consent_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'consent_challenge': - (str,), - 'accept_o_auth2_consent_request': - (AcceptOAuth2ConsentRequest,), - }, - 'attribute_map': { - 'consent_challenge': 'consent_challenge', - }, - 'location_map': { - 'consent_challenge': 'query', - 'accept_o_auth2_consent_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.accept_o_auth2_login_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2RedirectTo,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/login/accept', - 'operation_id': 'accept_o_auth2_login_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'login_challenge', - 'accept_o_auth2_login_request', - ], - 'required': [ - 'login_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'login_challenge': - (str,), - 'accept_o_auth2_login_request': - (AcceptOAuth2LoginRequest,), - }, - 'attribute_map': { - 'login_challenge': 'login_challenge', - }, - 'location_map': { - 'login_challenge': 'query', - 'accept_o_auth2_login_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.accept_o_auth2_logout_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2RedirectTo,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/logout/accept', - 'operation_id': 'accept_o_auth2_logout_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'logout_challenge', - ], - 'required': [ - 'logout_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'logout_challenge': - (str,), - }, - 'attribute_map': { - 'logout_challenge': 'logout_challenge', - }, - 'location_map': { - 'logout_challenge': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.create_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/admin/clients', - 'operation_id': 'create_o_auth2_client', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'o_auth2_client', - ], - 'required': [ - 'o_auth2_client', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'o_auth2_client': - (OAuth2Client,), - }, - 'attribute_map': { - }, - 'location_map': { - 'o_auth2_client': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/clients/{id}', - 'operation_id': 'delete_o_auth2_client', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_o_auth2_token_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/oauth2/tokens', - 'operation_id': 'delete_o_auth2_token', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'client_id', - ], - 'required': [ - 'client_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'client_id': - (str,), - }, - 'attribute_map': { - 'client_id': 'client_id', - }, - 'location_map': { - 'client_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_trusted_o_auth2_jwt_grant_issuer_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/trust/grants/jwt-bearer/issuers/{id}', - 'operation_id': 'delete_trusted_o_auth2_jwt_grant_issuer', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/admin/clients/{id}', - 'operation_id': 'get_o_auth2_client', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_o_auth2_consent_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2ConsentRequest,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/consent', - 'operation_id': 'get_o_auth2_consent_request', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'consent_challenge', - ], - 'required': [ - 'consent_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'consent_challenge': - (str,), - }, - 'attribute_map': { - 'consent_challenge': 'consent_challenge', - }, - 'location_map': { - 'consent_challenge': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_o_auth2_login_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2LoginRequest,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/login', - 'operation_id': 'get_o_auth2_login_request', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'login_challenge', - ], - 'required': [ - 'login_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'login_challenge': - (str,), - }, - 'attribute_map': { - 'login_challenge': 'login_challenge', - }, - 'location_map': { - 'login_challenge': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_o_auth2_logout_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2LogoutRequest,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/logout', - 'operation_id': 'get_o_auth2_logout_request', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'logout_challenge', - ], - 'required': [ - 'logout_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'logout_challenge': - (str,), - }, - 'attribute_map': { - 'logout_challenge': 'logout_challenge', - }, - 'location_map': { - 'logout_challenge': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_trusted_o_auth2_jwt_grant_issuer_endpoint = _Endpoint( - settings={ - 'response_type': (TrustedOAuth2JwtGrantIssuer,), - 'auth': [], - 'endpoint_path': '/admin/trust/grants/jwt-bearer/issuers/{id}', - 'operation_id': 'get_trusted_o_auth2_jwt_grant_issuer', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.introspect_o_auth2_token_endpoint = _Endpoint( - settings={ - 'response_type': (IntrospectedOAuth2Token,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/introspect', - 'operation_id': 'introspect_o_auth2_token', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'token', - 'scope', - ], - 'required': [ - 'token', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'token': - (str,), - 'scope': - (str,), - }, - 'attribute_map': { - 'token': 'token', - 'scope': 'scope', - }, - 'location_map': { - 'token': 'form', - 'scope': 'form', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/x-www-form-urlencoded' - ] - }, - api_client=api_client - ) - self.list_o_auth2_clients_endpoint = _Endpoint( - settings={ - 'response_type': ([OAuth2Client],), - 'auth': [], - 'endpoint_path': '/admin/clients', - 'operation_id': 'list_o_auth2_clients', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'page_size', - 'page_token', - 'client_name', - 'owner', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'page_size', - 'page_token', - ] - }, - root_map={ - 'validations': { - ('page_size',): { - - 'inclusive_maximum': 500, - 'inclusive_minimum': 1, - }, - ('page_token',): { - - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page_size': - (int,), - 'page_token': - (str,), - 'client_name': - (str,), - 'owner': - (str,), - }, - 'attribute_map': { - 'page_size': 'page_size', - 'page_token': 'page_token', - 'client_name': 'client_name', - 'owner': 'owner', - }, - 'location_map': { - 'page_size': 'query', - 'page_token': 'query', - 'client_name': 'query', - 'owner': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_o_auth2_consent_sessions_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2ConsentSessions,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/sessions/consent', - 'operation_id': 'list_o_auth2_consent_sessions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'subject', - 'page_size', - 'page_token', - 'login_session_id', - ], - 'required': [ - 'subject', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'page_size', - 'page_token', - ] - }, - root_map={ - 'validations': { - ('page_size',): { - - 'inclusive_maximum': 500, - 'inclusive_minimum': 1, - }, - ('page_token',): { - - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'subject': - (str,), - 'page_size': - (int,), - 'page_token': - (str,), - 'login_session_id': - (str,), - }, - 'attribute_map': { - 'subject': 'subject', - 'page_size': 'page_size', - 'page_token': 'page_token', - 'login_session_id': 'login_session_id', - }, - 'location_map': { - 'subject': 'query', - 'page_size': 'query', - 'page_token': 'query', - 'login_session_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_trusted_o_auth2_jwt_grant_issuers_endpoint = _Endpoint( - settings={ - 'response_type': (TrustedOAuth2JwtGrantIssuers,), - 'auth': [], - 'endpoint_path': '/admin/trust/grants/jwt-bearer/issuers', - 'operation_id': 'list_trusted_o_auth2_jwt_grant_issuers', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'max_items', - 'default_items', - 'issuer', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'max_items': - (int,), - 'default_items': - (int,), - 'issuer': - (str,), - }, - 'attribute_map': { - 'max_items': 'MaxItems', - 'default_items': 'DefaultItems', - 'issuer': 'issuer', - }, - 'location_map': { - 'max_items': 'query', - 'default_items': 'query', - 'issuer': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.o_auth2_authorize_endpoint = _Endpoint( - settings={ - 'response_type': (ErrorOAuth2,), - 'auth': [], - 'endpoint_path': '/oauth2/auth', - 'operation_id': 'o_auth2_authorize', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.oauth2_token_exchange_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2TokenExchange,), - 'auth': [ - 'basic', - 'oauth2' - ], - 'endpoint_path': '/oauth2/token', - 'operation_id': 'oauth2_token_exchange', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'grant_type', - 'client_id', - 'code', - 'redirect_uri', - 'refresh_token', - ], - 'required': [ - 'grant_type', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'grant_type': - (str,), - 'client_id': - (str,), - 'code': - (str,), - 'redirect_uri': - (str,), - 'refresh_token': - (str,), - }, - 'attribute_map': { - 'grant_type': 'grant_type', - 'client_id': 'client_id', - 'code': 'code', - 'redirect_uri': 'redirect_uri', - 'refresh_token': 'refresh_token', - }, - 'location_map': { - 'grant_type': 'form', - 'client_id': 'form', - 'code': 'form', - 'redirect_uri': 'form', - 'refresh_token': 'form', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/x-www-form-urlencoded' - ] - }, - api_client=api_client - ) - self.patch_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/admin/clients/{id}', - 'operation_id': 'patch_o_auth2_client', - 'http_method': 'PATCH', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'json_patch_document', - ], - 'required': [ - 'id', - 'json_patch_document', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'json_patch_document': - (JsonPatchDocument,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'json_patch_document': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.reject_o_auth2_consent_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2RedirectTo,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/consent/reject', - 'operation_id': 'reject_o_auth2_consent_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'consent_challenge', - 'reject_o_auth2_request', - ], - 'required': [ - 'consent_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'consent_challenge': - (str,), - 'reject_o_auth2_request': - (RejectOAuth2Request,), - }, - 'attribute_map': { - 'consent_challenge': 'consent_challenge', - }, - 'location_map': { - 'consent_challenge': 'query', - 'reject_o_auth2_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.reject_o_auth2_login_request_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2RedirectTo,), - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/login/reject', - 'operation_id': 'reject_o_auth2_login_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'login_challenge', - 'reject_o_auth2_request', - ], - 'required': [ - 'login_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'login_challenge': - (str,), - 'reject_o_auth2_request': - (RejectOAuth2Request,), - }, - 'attribute_map': { - 'login_challenge': 'login_challenge', - }, - 'location_map': { - 'login_challenge': 'query', - 'reject_o_auth2_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.reject_o_auth2_logout_request_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/requests/logout/reject', - 'operation_id': 'reject_o_auth2_logout_request', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'logout_challenge', - ], - 'required': [ - 'logout_challenge', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'logout_challenge': - (str,), - }, - 'attribute_map': { - 'logout_challenge': 'logout_challenge', - }, - 'location_map': { - 'logout_challenge': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_o_auth2_consent_sessions_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/sessions/consent', - 'operation_id': 'revoke_o_auth2_consent_sessions', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'subject', - 'client', - 'all', - ], - 'required': [ - 'subject', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'subject': - (str,), - 'client': - (str,), - 'all': - (bool,), - }, - 'attribute_map': { - 'subject': 'subject', - 'client': 'client', - 'all': 'all', - }, - 'location_map': { - 'subject': 'query', - 'client': 'query', - 'all': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_o_auth2_login_sessions_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/admin/oauth2/auth/sessions/login', - 'operation_id': 'revoke_o_auth2_login_sessions', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'subject', - 'sid', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'subject': - (str,), - 'sid': - (str,), - }, - 'attribute_map': { - 'subject': 'subject', - 'sid': 'sid', - }, - 'location_map': { - 'subject': 'query', - 'sid': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_o_auth2_token_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'basic', - 'oauth2' - ], - 'endpoint_path': '/oauth2/revoke', - 'operation_id': 'revoke_o_auth2_token', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'token', - 'client_id', - 'client_secret', - ], - 'required': [ - 'token', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'token': - (str,), - 'client_id': - (str,), - 'client_secret': - (str,), - }, - 'attribute_map': { - 'token': 'token', - 'client_id': 'client_id', - 'client_secret': 'client_secret', - }, - 'location_map': { - 'token': 'form', - 'client_id': 'form', - 'client_secret': 'form', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/x-www-form-urlencoded' - ] - }, - api_client=api_client - ) - self.set_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/admin/clients/{id}', - 'operation_id': 'set_o_auth2_client', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'o_auth2_client', - ], - 'required': [ - 'id', - 'o_auth2_client', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'o_auth2_client': - (OAuth2Client,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'o_auth2_client': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.set_o_auth2_client_lifespans_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/admin/clients/{id}/lifespans', - 'operation_id': 'set_o_auth2_client_lifespans', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'o_auth2_client_token_lifespans', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'o_auth2_client_token_lifespans': - (OAuth2ClientTokenLifespans,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'o_auth2_client_token_lifespans': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.trust_o_auth2_jwt_grant_issuer_endpoint = _Endpoint( - settings={ - 'response_type': (TrustedOAuth2JwtGrantIssuer,), - 'auth': [], - 'endpoint_path': '/admin/trust/grants/jwt-bearer/issuers', - 'operation_id': 'trust_o_auth2_jwt_grant_issuer', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'trust_o_auth2_jwt_grant_issuer', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'trust_o_auth2_jwt_grant_issuer': - (TrustOAuth2JwtGrantIssuer,), - }, - 'attribute_map': { - }, - 'location_map': { - 'trust_o_auth2_jwt_grant_issuer': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def accept_o_auth2_consent_request( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + accept_o_auth2_consent_request: Optional[AcceptOAuth2ConsentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2RedirectTo: + """Accept OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param accept_o_auth2_consent_request: + :type accept_o_auth2_consent_request: AcceptOAuth2ConsentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + accept_o_auth2_consent_request=accept_o_auth2_consent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def accept_o_auth2_consent_request_with_http_info( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + accept_o_auth2_consent_request: Optional[AcceptOAuth2ConsentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2RedirectTo]: + """Accept OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param accept_o_auth2_consent_request: + :type accept_o_auth2_consent_request: AcceptOAuth2ConsentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + accept_o_auth2_consent_request=accept_o_auth2_consent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def accept_o_auth2_consent_request_without_preload_content( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + accept_o_auth2_consent_request: Optional[AcceptOAuth2ConsentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param accept_o_auth2_consent_request: + :type accept_o_auth2_consent_request: AcceptOAuth2ConsentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + accept_o_auth2_consent_request=accept_o_auth2_consent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _accept_o_auth2_consent_request_serialize( self, consent_challenge, - **kwargs - ): - """Accept OAuth 2.0 Consent Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.accept_o_auth2_consent_request(consent_challenge, async_req=True) - >>> result = thread.get() - - Args: - consent_challenge (str): OAuth 2.0 Consent Request Challenge - - Keyword Args: - accept_o_auth2_consent_request (AcceptOAuth2ConsentRequest): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2RedirectTo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['consent_challenge'] = \ - consent_challenge - return self.accept_o_auth2_consent_request_endpoint.call_with_http_info(**kwargs) - + accept_o_auth2_consent_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if consent_challenge is not None: + + _query_params.append(('consent_challenge', consent_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + if accept_o_auth2_consent_request is not None: + _body_params = accept_o_auth2_consent_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/consent/accept', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def accept_o_auth2_login_request( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + accept_o_auth2_login_request: Optional[AcceptOAuth2LoginRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2RedirectTo: + """Accept OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param accept_o_auth2_login_request: + :type accept_o_auth2_login_request: AcceptOAuth2LoginRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_login_request_serialize( + login_challenge=login_challenge, + accept_o_auth2_login_request=accept_o_auth2_login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def accept_o_auth2_login_request_with_http_info( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + accept_o_auth2_login_request: Optional[AcceptOAuth2LoginRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2RedirectTo]: + """Accept OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param accept_o_auth2_login_request: + :type accept_o_auth2_login_request: AcceptOAuth2LoginRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_login_request_serialize( + login_challenge=login_challenge, + accept_o_auth2_login_request=accept_o_auth2_login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def accept_o_auth2_login_request_without_preload_content( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + accept_o_auth2_login_request: Optional[AcceptOAuth2LoginRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param accept_o_auth2_login_request: + :type accept_o_auth2_login_request: AcceptOAuth2LoginRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_login_request_serialize( + login_challenge=login_challenge, + accept_o_auth2_login_request=accept_o_auth2_login_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _accept_o_auth2_login_request_serialize( self, login_challenge, - **kwargs - ): - """Accept OAuth 2.0 Login Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.accept_o_auth2_login_request(login_challenge, async_req=True) - >>> result = thread.get() - - Args: - login_challenge (str): OAuth 2.0 Login Request Challenge - - Keyword Args: - accept_o_auth2_login_request (AcceptOAuth2LoginRequest): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2RedirectTo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['login_challenge'] = \ - login_challenge - return self.accept_o_auth2_login_request_endpoint.call_with_http_info(**kwargs) - + accept_o_auth2_login_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if login_challenge is not None: + + _query_params.append(('login_challenge', login_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + if accept_o_auth2_login_request is not None: + _body_params = accept_o_auth2_login_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/login/accept', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def accept_o_auth2_logout_request( + self, + logout_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Logout Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2RedirectTo: + """Accept OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + + :param logout_challenge: OAuth 2.0 Logout Request Challenge (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def accept_o_auth2_logout_request_with_http_info( + self, + logout_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Logout Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2RedirectTo]: + """Accept OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + + :param logout_challenge: OAuth 2.0 Logout Request Challenge (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def accept_o_auth2_logout_request_without_preload_content( + self, + logout_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Logout Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + + :param logout_challenge: OAuth 2.0 Logout Request Challenge (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._accept_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _accept_o_auth2_logout_request_serialize( self, logout_challenge, - **kwargs - ): - """Accept OAuth 2.0 Session Logout Request # noqa: E501 - - When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.accept_o_auth2_logout_request(logout_challenge, async_req=True) - >>> result = thread.get() - - Args: - logout_challenge (str): OAuth 2.0 Logout Request Challenge - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2RedirectTo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['logout_challenge'] = \ - logout_challenge - return self.accept_o_auth2_logout_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if logout_challenge is not None: + + _query_params.append(('logout_challenge', logout_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/logout/accept', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def create_o_auth2_client( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Create OAuth 2.0 Client + + Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_o_auth2_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_o_auth2_client_with_http_info( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Create OAuth 2.0 Client + + Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_o_auth2_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_o_auth2_client_without_preload_content( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create OAuth 2.0 Client + + Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_o_auth2_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_o_auth2_client_serialize( self, o_auth2_client, - **kwargs - ): - """Create OAuth 2.0 Client # noqa: E501 - - Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_o_auth2_client(o_auth2_client, async_req=True) - >>> result = thread.get() - - Args: - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['o_auth2_client'] = \ - o_auth2_client - return self.create_o_auth2_client_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if o_auth2_client is not None: + _body_params = o_auth2_client + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/admin/clients', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_o_auth2_client( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete OAuth 2.0 Client + + Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_o_auth2_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete OAuth 2.0 Client + + Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_o_auth2_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete OAuth 2.0 Client + + Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_o_auth2_client_serialize( self, id, - **kwargs - ): - """Delete OAuth 2.0 Client # noqa: E501 - - Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_o_auth2_client(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the OAuth 2.0 Client. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.delete_o_auth2_client_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/clients/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_o_auth2_token( + self, + client_id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + + This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + + :param client_id: OAuth 2.0 Client ID (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_token_serialize( + client_id=client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_o_auth2_token_with_http_info( + self, + client_id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + + This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + + :param client_id: OAuth 2.0 Client ID (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_token_serialize( + client_id=client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_o_auth2_token_without_preload_content( + self, + client_id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + + This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + + :param client_id: OAuth 2.0 Client ID (required) + :type client_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_o_auth2_token_serialize( + client_id=client_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_o_auth2_token_serialize( self, client_id, - **kwargs - ): - """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client # noqa: E501 - - This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_o_auth2_token(client_id, async_req=True) - >>> result = thread.get() - - Args: - client_id (str): OAuth 2.0 Client ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['client_id'] = \ - client_id - return self.delete_o_auth2_token_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if client_id is not None: + + _query_params.append(('client_id', client_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/oauth2/tokens', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_trusted_o_auth2_jwt_grant_issuer( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_trusted_o_auth2_jwt_grant_issuer_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_trusted_o_auth2_jwt_grant_issuer_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_trusted_o_auth2_jwt_grant_issuer_serialize( self, id, - **kwargs - ): - """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - - Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_trusted_o_auth2_jwt_grant_issuer(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the desired grant - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.delete_trusted_o_auth2_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/trust/grants/jwt-bearer/issuers/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_o_auth2_client( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Get an OAuth 2.0 Client + + Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_o_auth2_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Get an OAuth 2.0 Client + + Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_o_auth2_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an OAuth 2.0 Client + + Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_o_auth2_client_serialize( self, id, - **kwargs - ): - """Get an OAuth 2.0 Client # noqa: E501 - - Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_o_auth2_client(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the OAuth 2.0 Client. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.get_o_auth2_client_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/clients/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_o_auth2_consent_request( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2ConsentRequest: + """Get OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2ConsentRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_o_auth2_consent_request_with_http_info( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2ConsentRequest]: + """Get OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2ConsentRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_o_auth2_consent_request_without_preload_content( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2ConsentRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_o_auth2_consent_request_serialize( self, consent_challenge, - **kwargs - ): - """Get OAuth 2.0 Consent Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_o_auth2_consent_request(consent_challenge, async_req=True) - >>> result = thread.get() - - Args: - consent_challenge (str): OAuth 2.0 Consent Request Challenge - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2ConsentRequest - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['consent_challenge'] = \ - consent_challenge - return self.get_o_auth2_consent_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if consent_challenge is not None: + + _query_params.append(('consent_challenge', consent_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/oauth2/auth/requests/consent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_o_auth2_login_request( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2LoginRequest: + """Get OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_login_request_serialize( + login_challenge=login_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LoginRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_o_auth2_login_request_with_http_info( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2LoginRequest]: + """Get OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_login_request_serialize( + login_challenge=login_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LoginRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_o_auth2_login_request_without_preload_content( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_login_request_serialize( + login_challenge=login_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LoginRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_o_auth2_login_request_serialize( self, login_challenge, - **kwargs - ): - """Get OAuth 2.0 Login Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_o_auth2_login_request(login_challenge, async_req=True) - >>> result = thread.get() - - Args: - login_challenge (str): OAuth 2.0 Login Request Challenge - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2LoginRequest - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['login_challenge'] = \ - login_challenge - return self.get_o_auth2_login_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if login_challenge is not None: + + _query_params.append(('login_challenge', login_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/oauth2/auth/requests/login', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_o_auth2_logout_request( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2LogoutRequest: + """Get OAuth 2.0 Session Logout Request + + Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LogoutRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_o_auth2_logout_request_with_http_info( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2LogoutRequest]: + """Get OAuth 2.0 Session Logout Request + + Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LogoutRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_o_auth2_logout_request_without_preload_content( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OAuth 2.0 Session Logout Request + + Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2LogoutRequest", + '410': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_o_auth2_logout_request_serialize( self, logout_challenge, - **kwargs - ): - """Get OAuth 2.0 Session Logout Request # noqa: E501 - - Use this endpoint to fetch an Ory OAuth 2.0 logout request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_o_auth2_logout_request(logout_challenge, async_req=True) - >>> result = thread.get() - - Args: - logout_challenge (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2LogoutRequest - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['logout_challenge'] = \ - logout_challenge - return self.get_o_auth2_logout_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if logout_challenge is not None: + + _query_params.append(('logout_challenge', logout_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/oauth2/auth/requests/logout', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_trusted_o_auth2_jwt_grant_issuer( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TrustedOAuth2JwtGrantIssuer: + """Get Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_trusted_o_auth2_jwt_grant_issuer_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TrustedOAuth2JwtGrantIssuer]: + """Get Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_trusted_o_auth2_jwt_grant_issuer_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the desired grant")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Trusted OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + + :param id: The id of the desired grant (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_trusted_o_auth2_jwt_grant_issuer_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_trusted_o_auth2_jwt_grant_issuer_serialize( self, id, - **kwargs - ): - """Get Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - - Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_trusted_o_auth2_jwt_grant_issuer(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the desired grant - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - TrustedOAuth2JwtGrantIssuer - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.get_trusted_o_auth2_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/trust/grants/jwt-bearer/issuers/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def introspect_o_auth2_token( + self, + token: Annotated[StrictStr, Field(description="The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.")], + scope: Annotated[Optional[StrictStr], Field(description="An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IntrospectedOAuth2Token: + """Introspect OAuth2 Access and Refresh Tokens + + The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + + :param token: The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) + :type token: str + :param scope: An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. + :type scope: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._introspect_o_auth2_token_serialize( + token=token, + scope=scope, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntrospectedOAuth2Token", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def introspect_o_auth2_token_with_http_info( + self, + token: Annotated[StrictStr, Field(description="The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.")], + scope: Annotated[Optional[StrictStr], Field(description="An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IntrospectedOAuth2Token]: + """Introspect OAuth2 Access and Refresh Tokens + + The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + + :param token: The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) + :type token: str + :param scope: An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. + :type scope: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._introspect_o_auth2_token_serialize( + token=token, + scope=scope, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntrospectedOAuth2Token", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def introspect_o_auth2_token_without_preload_content( + self, + token: Annotated[StrictStr, Field(description="The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.")], + scope: Annotated[Optional[StrictStr], Field(description="An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Introspect OAuth2 Access and Refresh Tokens + + The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + + :param token: The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. (required) + :type token: str + :param scope: An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. + :type scope: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._introspect_o_auth2_token_serialize( + token=token, + scope=scope, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IntrospectedOAuth2Token", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _introspect_o_auth2_token_serialize( self, token, - **kwargs - ): - """Introspect OAuth2 Access and Refresh Tokens # noqa: E501 - - The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.introspect_o_auth2_token(token, async_req=True) - >>> result = thread.get() - - Args: - token (str): The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. - - Keyword Args: - scope (str): An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - IntrospectedOAuth2Token - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['token'] = \ - token - return self.introspect_o_auth2_token_endpoint.call_with_http_info(**kwargs) - + scope, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if scope is not None: + _form_params.append(('scope', scope)) + if token is not None: + _form_params.append(('token', token)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/admin/oauth2/introspect', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_o_auth2_clients( self, - **kwargs - ): - """List OAuth 2.0 Clients # noqa: E501 - - This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_o_auth2_clients(async_req=True) - >>> result = thread.get() - - - Keyword Args: - page_size (int): Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" - client_name (str): The name of the clients to filter by.. [optional] - owner (str): The owner of the clients to filter by.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [OAuth2Client] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_o_auth2_clients_endpoint.call_with_http_info(**kwargs) + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + client_name: Annotated[Optional[StrictStr], Field(description="The name of the clients to filter by.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="The owner of the clients to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OAuth2Client]: + """List OAuth 2.0 Clients + + This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param client_name: The name of the clients to filter by. + :type client_name: str + :param owner: The owner of the clients to filter by. + :type owner: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_clients_serialize( + page_size=page_size, + page_token=page_token, + client_name=client_name, + owner=owner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2Client]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_o_auth2_clients_with_http_info( + self, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + client_name: Annotated[Optional[StrictStr], Field(description="The name of the clients to filter by.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="The owner of the clients to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OAuth2Client]]: + """List OAuth 2.0 Clients + + This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param client_name: The name of the clients to filter by. + :type client_name: str + :param owner: The owner of the clients to filter by. + :type owner: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_clients_serialize( + page_size=page_size, + page_token=page_token, + client_name=client_name, + owner=owner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2Client]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_o_auth2_clients_without_preload_content( + self, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + client_name: Annotated[Optional[StrictStr], Field(description="The name of the clients to filter by.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="The owner of the clients to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List OAuth 2.0 Clients + + This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param client_name: The name of the clients to filter by. + :type client_name: str + :param owner: The owner of the clients to filter by. + :type owner: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_clients_serialize( + page_size=page_size, + page_token=page_token, + client_name=client_name, + owner=owner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2Client]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_o_auth2_clients_serialize( + self, + page_size, + page_token, + client_name, + owner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if page_token is not None: + + _query_params.append(('page_token', page_token)) + + if client_name is not None: + + _query_params.append(('client_name', client_name)) + + if owner is not None: + + _query_params.append(('owner', owner)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/clients', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_o_auth2_consent_sessions( + self, + subject: Annotated[StrictStr, Field(description="The subject to list the consent sessions for.")], + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + login_session_id: Annotated[Optional[StrictStr], Field(description="The login session id to list the consent sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OAuth2ConsentSession]: + """List OAuth 2.0 Consent Sessions of a Subject + + This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + + :param subject: The subject to list the consent sessions for. (required) + :type subject: str + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param login_session_id: The login session id to list the consent sessions for. + :type login_session_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_consent_sessions_serialize( + subject=subject, + page_size=page_size, + page_token=page_token, + login_session_id=login_session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2ConsentSession]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_o_auth2_consent_sessions_with_http_info( + self, + subject: Annotated[StrictStr, Field(description="The subject to list the consent sessions for.")], + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + login_session_id: Annotated[Optional[StrictStr], Field(description="The login session id to list the consent sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OAuth2ConsentSession]]: + """List OAuth 2.0 Consent Sessions of a Subject + + This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + + :param subject: The subject to list the consent sessions for. (required) + :type subject: str + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param login_session_id: The login session id to list the consent sessions for. + :type login_session_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_consent_sessions_serialize( + subject=subject, + page_size=page_size, + page_token=page_token, + login_session_id=login_session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2ConsentSession]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_o_auth2_consent_sessions_without_preload_content( + self, + subject: Annotated[StrictStr, Field(description="The subject to list the consent sessions for.")], + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + page_token: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None, + login_session_id: Annotated[Optional[StrictStr], Field(description="The login session id to list the consent sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List OAuth 2.0 Consent Sessions of a Subject + + This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + + :param subject: The subject to list the consent sessions for. (required) + :type subject: str + :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_size: int + :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + :type page_token: str + :param login_session_id: The login session id to list the consent sessions for. + :type login_session_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_o_auth2_consent_sessions_serialize( + subject=subject, + page_size=page_size, + page_token=page_token, + login_session_id=login_session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OAuth2ConsentSession]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_o_auth2_consent_sessions_serialize( self, subject, - **kwargs - ): - """List OAuth 2.0 Consent Sessions of a Subject # noqa: E501 - - This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_o_auth2_consent_sessions(subject, async_req=True) - >>> result = thread.get() - - Args: - subject (str): The subject to list the consent sessions for. - - Keyword Args: - page_size (int): Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" - login_session_id (str): The login session id to list the consent sessions for.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2ConsentSessions - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['subject'] = \ - subject - return self.list_o_auth2_consent_sessions_endpoint.call_with_http_info(**kwargs) + page_size, + page_token, + login_session_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if page_token is not None: + + _query_params.append(('page_token', page_token)) + + if subject is not None: + + _query_params.append(('subject', subject)) + + if login_session_id is not None: + + _query_params.append(('login_session_id', login_session_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/oauth2/auth/sessions/consent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_trusted_o_auth2_jwt_grant_issuers( self, - **kwargs - ): - """List Trusted OAuth2 JWT Bearer Grant Type Issuers # noqa: E501 - - Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_trusted_o_auth2_jwt_grant_issuers(async_req=True) - >>> result = thread.get() - - - Keyword Args: - max_items (int): [optional] - default_items (int): [optional] - issuer (str): If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - TrustedOAuth2JwtGrantIssuers - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_trusted_o_auth2_jwt_grant_issuers_endpoint.call_with_http_info(**kwargs) + max_items: Optional[StrictInt] = None, + default_items: Optional[StrictInt] = None, + issuer: Annotated[Optional[StrictStr], Field(description="If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[TrustedOAuth2JwtGrantIssuer]: + """List Trusted OAuth2 JWT Bearer Grant Type Issuers + + Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + :param max_items: + :type max_items: int + :param default_items: + :type default_items: int + :param issuer: If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + :type issuer: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_trusted_o_auth2_jwt_grant_issuers_serialize( + max_items=max_items, + default_items=default_items, + issuer=issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TrustedOAuth2JwtGrantIssuer]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_trusted_o_auth2_jwt_grant_issuers_with_http_info( + self, + max_items: Optional[StrictInt] = None, + default_items: Optional[StrictInt] = None, + issuer: Annotated[Optional[StrictStr], Field(description="If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[TrustedOAuth2JwtGrantIssuer]]: + """List Trusted OAuth2 JWT Bearer Grant Type Issuers + + Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + :param max_items: + :type max_items: int + :param default_items: + :type default_items: int + :param issuer: If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + :type issuer: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_trusted_o_auth2_jwt_grant_issuers_serialize( + max_items=max_items, + default_items=default_items, + issuer=issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TrustedOAuth2JwtGrantIssuer]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_trusted_o_auth2_jwt_grant_issuers_without_preload_content( + self, + max_items: Optional[StrictInt] = None, + default_items: Optional[StrictInt] = None, + issuer: Annotated[Optional[StrictStr], Field(description="If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Trusted OAuth2 JWT Bearer Grant Type Issuers + + Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + :param max_items: + :type max_items: int + :param default_items: + :type default_items: int + :param issuer: If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + :type issuer: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_trusted_o_auth2_jwt_grant_issuers_serialize( + max_items=max_items, + default_items=default_items, + issuer=issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TrustedOAuth2JwtGrantIssuer]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_trusted_o_auth2_jwt_grant_issuers_serialize( + self, + max_items, + default_items, + issuer, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if max_items is not None: + + _query_params.append(('MaxItems', max_items)) + + if default_items is not None: + + _query_params.append(('DefaultItems', default_items)) + + if issuer is not None: + + _query_params.append(('issuer', issuer)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/admin/trust/grants/jwt-bearer/issuers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def o_auth2_authorize( self, - **kwargs - ): - """OAuth 2.0 Authorize Endpoint # noqa: E501 - - Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.o_auth2_authorize(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ErrorOAuth2 - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.o_auth2_authorize_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ErrorOAuth2: + """OAuth 2.0 Authorize Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._o_auth2_authorize_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def o_auth2_authorize_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ErrorOAuth2]: + """OAuth 2.0 Authorize Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._o_auth2_authorize_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def o_auth2_authorize_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OAuth 2.0 Authorize Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._o_auth2_authorize_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _o_auth2_authorize_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/auth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def oauth2_token_exchange( + self, + grant_type: StrictStr, + client_id: Optional[StrictStr] = None, + code: Optional[StrictStr] = None, + redirect_uri: Optional[StrictStr] = None, + refresh_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2TokenExchange: + """The OAuth 2.0 Token Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param grant_type: (required) + :type grant_type: str + :param client_id: + :type client_id: str + :param code: + :type code: str + :param redirect_uri: + :type redirect_uri: str + :param refresh_token: + :type refresh_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth2_token_exchange_serialize( + grant_type=grant_type, + client_id=client_id, + code=code, + redirect_uri=redirect_uri, + refresh_token=refresh_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2TokenExchange", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def oauth2_token_exchange_with_http_info( + self, + grant_type: StrictStr, + client_id: Optional[StrictStr] = None, + code: Optional[StrictStr] = None, + redirect_uri: Optional[StrictStr] = None, + refresh_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2TokenExchange]: + """The OAuth 2.0 Token Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param grant_type: (required) + :type grant_type: str + :param client_id: + :type client_id: str + :param code: + :type code: str + :param redirect_uri: + :type redirect_uri: str + :param refresh_token: + :type refresh_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth2_token_exchange_serialize( + grant_type=grant_type, + client_id=client_id, + code=code, + redirect_uri=redirect_uri, + refresh_token=refresh_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2TokenExchange", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def oauth2_token_exchange_without_preload_content( + self, + grant_type: StrictStr, + client_id: Optional[StrictStr] = None, + code: Optional[StrictStr] = None, + redirect_uri: Optional[StrictStr] = None, + refresh_token: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """The OAuth 2.0 Token Endpoint + + Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + + :param grant_type: (required) + :type grant_type: str + :param client_id: + :type client_id: str + :param code: + :type code: str + :param redirect_uri: + :type redirect_uri: str + :param refresh_token: + :type refresh_token: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth2_token_exchange_serialize( + grant_type=grant_type, + client_id=client_id, + code=code, + redirect_uri=redirect_uri, + refresh_token=refresh_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2TokenExchange", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _oauth2_token_exchange_serialize( self, grant_type, - **kwargs - ): - """The OAuth 2.0 Token Endpoint # noqa: E501 - - Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.oauth2_token_exchange(grant_type, async_req=True) - >>> result = thread.get() - - Args: - grant_type (str): - - Keyword Args: - client_id (str): [optional] - code (str): [optional] - redirect_uri (str): [optional] - refresh_token (str): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2TokenExchange - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['grant_type'] = \ - grant_type - return self.oauth2_token_exchange_endpoint.call_with_http_info(**kwargs) - + client_id, + code, + redirect_uri, + refresh_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if client_id is not None: + _form_params.append(('client_id', client_id)) + if code is not None: + _form_params.append(('code', code)) + if grant_type is not None: + _form_params.append(('grant_type', grant_type)) + if redirect_uri is not None: + _form_params.append(('redirect_uri', redirect_uri)) + if refresh_token is not None: + _form_params.append(('refresh_token', refresh_token)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'basic', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/oauth2/token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def patch_o_auth2_client( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + json_patch: Annotated[List[JsonPatch], Field(description="OAuth 2.0 Client JSON Patch Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Patch OAuth 2.0 Client + + Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param json_patch: OAuth 2.0 Client JSON Patch Body (required) + :type json_patch: List[JsonPatch] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_o_auth2_client_serialize( + id=id, + json_patch=json_patch, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def patch_o_auth2_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + json_patch: Annotated[List[JsonPatch], Field(description="OAuth 2.0 Client JSON Patch Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Patch OAuth 2.0 Client + + Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param json_patch: OAuth 2.0 Client JSON Patch Body (required) + :type json_patch: List[JsonPatch] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_o_auth2_client_serialize( + id=id, + json_patch=json_patch, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def patch_o_auth2_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + json_patch: Annotated[List[JsonPatch], Field(description="OAuth 2.0 Client JSON Patch Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Patch OAuth 2.0 Client + + Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param json_patch: OAuth 2.0 Client JSON Patch Body (required) + :type json_patch: List[JsonPatch] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_o_auth2_client_serialize( + id=id, + json_patch=json_patch, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _patch_o_auth2_client_serialize( self, id, - json_patch_document, - **kwargs - ): - """Patch OAuth 2.0 Client # noqa: E501 - - Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.patch_o_auth2_client(id, json_patch_document, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the OAuth 2.0 Client. - json_patch_document (JsonPatchDocument): OAuth 2.0 Client JSON Patch Body - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['json_patch_document'] = \ - json_patch_document - return self.patch_o_auth2_client_endpoint.call_with_http_info(**kwargs) - + json_patch, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'JsonPatch': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if json_patch is not None: + _body_params = json_patch + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/admin/clients/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def reject_o_auth2_consent_request( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2RedirectTo: + """Reject OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def reject_o_auth2_consent_request_with_http_info( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2RedirectTo]: + """Reject OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def reject_o_auth2_consent_request_without_preload_content( + self, + consent_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reject OAuth 2.0 Consent Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + + :param consent_challenge: OAuth 2.0 Consent Request Challenge (required) + :type consent_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_consent_request_serialize( + consent_challenge=consent_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reject_o_auth2_consent_request_serialize( self, consent_challenge, - **kwargs - ): - """Reject OAuth 2.0 Consent Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reject_o_auth2_consent_request(consent_challenge, async_req=True) - >>> result = thread.get() - - Args: - consent_challenge (str): OAuth 2.0 Consent Request Challenge - - Keyword Args: - reject_o_auth2_request (RejectOAuth2Request): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2RedirectTo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['consent_challenge'] = \ - consent_challenge - return self.reject_o_auth2_consent_request_endpoint.call_with_http_info(**kwargs) - + reject_o_auth2_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if consent_challenge is not None: + + _query_params.append(('consent_challenge', consent_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + if reject_o_auth2_request is not None: + _body_params = reject_o_auth2_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/consent/reject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def reject_o_auth2_login_request( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2RedirectTo: + """Reject OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_login_request_serialize( + login_challenge=login_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def reject_o_auth2_login_request_with_http_info( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2RedirectTo]: + """Reject OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_login_request_serialize( + login_challenge=login_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def reject_o_auth2_login_request_without_preload_content( + self, + login_challenge: Annotated[StrictStr, Field(description="OAuth 2.0 Login Request Challenge")], + reject_o_auth2_request: Optional[RejectOAuth2Request] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reject OAuth 2.0 Login Request + + When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + + :param login_challenge: OAuth 2.0 Login Request Challenge (required) + :type login_challenge: str + :param reject_o_auth2_request: + :type reject_o_auth2_request: RejectOAuth2Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_login_request_serialize( + login_challenge=login_challenge, + reject_o_auth2_request=reject_o_auth2_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2RedirectTo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reject_o_auth2_login_request_serialize( self, login_challenge, - **kwargs - ): - """Reject OAuth 2.0 Login Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reject_o_auth2_login_request(login_challenge, async_req=True) - >>> result = thread.get() - - Args: - login_challenge (str): OAuth 2.0 Login Request Challenge - - Keyword Args: - reject_o_auth2_request (RejectOAuth2Request): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2RedirectTo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['login_challenge'] = \ - login_challenge - return self.reject_o_auth2_login_request_endpoint.call_with_http_info(**kwargs) - + reject_o_auth2_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if login_challenge is not None: + + _query_params.append(('login_challenge', login_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + if reject_o_auth2_request is not None: + _body_params = reject_o_auth2_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/login/reject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def reject_o_auth2_logout_request( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Reject OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def reject_o_auth2_logout_request_with_http_info( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Reject OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def reject_o_auth2_logout_request_without_preload_content( + self, + logout_challenge: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reject OAuth 2.0 Session Logout Request + + When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + + :param logout_challenge: (required) + :type logout_challenge: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reject_o_auth2_logout_request_serialize( + logout_challenge=logout_challenge, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reject_o_auth2_logout_request_serialize( self, logout_challenge, - **kwargs - ): - """Reject OAuth 2.0 Session Logout Request # noqa: E501 - - When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reject_o_auth2_logout_request(logout_challenge, async_req=True) - >>> result = thread.get() - - Args: - logout_challenge (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['logout_challenge'] = \ - logout_challenge - return self.reject_o_auth2_logout_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if logout_challenge is not None: + + _query_params.append(('logout_challenge', logout_challenge)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/oauth2/auth/requests/logout/reject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def revoke_o_auth2_consent_sessions( + self, + subject: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted.")], + client: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.")] = None, + all: Annotated[Optional[StrictBool], Field(description="Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke OAuth 2.0 Consent Sessions of a Subject + + This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + + :param subject: OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) + :type subject: str + :param client: OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. + :type client: str + :param all: Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + :type all: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_consent_sessions_serialize( + subject=subject, + client=client, + all=all, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_o_auth2_consent_sessions_with_http_info( + self, + subject: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted.")], + client: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.")] = None, + all: Annotated[Optional[StrictBool], Field(description="Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke OAuth 2.0 Consent Sessions of a Subject + + This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + + :param subject: OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) + :type subject: str + :param client: OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. + :type client: str + :param all: Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + :type all: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_consent_sessions_serialize( + subject=subject, + client=client, + all=all, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_o_auth2_consent_sessions_without_preload_content( + self, + subject: Annotated[StrictStr, Field(description="OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted.")], + client: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.")] = None, + all: Annotated[Optional[StrictBool], Field(description="Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke OAuth 2.0 Consent Sessions of a Subject + + This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + + :param subject: OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) + :type subject: str + :param client: OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. + :type client: str + :param all: Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + :type all: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_consent_sessions_serialize( + subject=subject, + client=client, + all=all, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_o_auth2_consent_sessions_serialize( self, subject, - **kwargs - ): - """Revoke OAuth 2.0 Consent Sessions of a Subject # noqa: E501 - - This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revoke_o_auth2_consent_sessions(subject, async_req=True) - >>> result = thread.get() - - Args: - subject (str): OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. - - Keyword Args: - client (str): OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.. [optional] - all (bool): Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['subject'] = \ - subject - return self.revoke_o_auth2_consent_sessions_endpoint.call_with_http_info(**kwargs) + client, + all, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if subject is not None: + + _query_params.append(('subject', subject)) + + if client is not None: + + _query_params.append(('client', client)) + + if all is not None: + + _query_params.append(('all', all)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/oauth2/auth/sessions/consent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def revoke_o_auth2_login_sessions( self, - **kwargs - ): - """Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID # noqa: E501 - - This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revoke_o_auth2_login_sessions(async_req=True) - >>> result = thread.get() - - - Keyword Args: - subject (str): OAuth 2.0 Subject The subject to revoke authentication sessions for.. [optional] - sid (str): OAuth 2.0 Subject The subject to revoke authentication sessions for.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.revoke_o_auth2_login_sessions_endpoint.call_with_http_info(**kwargs) + subject: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + sid: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + + This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + + :param subject: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type subject: str + :param sid: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type sid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_login_sessions_serialize( + subject=subject, + sid=sid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_o_auth2_login_sessions_with_http_info( + self, + subject: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + sid: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + + This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + + :param subject: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type subject: str + :param sid: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type sid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_login_sessions_serialize( + subject=subject, + sid=sid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_o_auth2_login_sessions_without_preload_content( + self, + subject: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + sid: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 Subject The subject to revoke authentication sessions for.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + + This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + + :param subject: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type subject: str + :param sid: OAuth 2.0 Subject The subject to revoke authentication sessions for. + :type sid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_login_sessions_serialize( + subject=subject, + sid=sid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_o_auth2_login_sessions_serialize( + self, + subject, + sid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if subject is not None: + + _query_params.append(('subject', subject)) + + if sid is not None: + + _query_params.append(('sid', sid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/admin/oauth2/auth/sessions/login', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def revoke_o_auth2_token( + self, + token: StrictStr, + client_id: Optional[StrictStr] = None, + client_secret: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke OAuth 2.0 Access or Refresh Token + + Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + + :param token: (required) + :type token: str + :param client_id: + :type client_id: str + :param client_secret: + :type client_secret: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_token_serialize( + token=token, + client_id=client_id, + client_secret=client_secret, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_o_auth2_token_with_http_info( + self, + token: StrictStr, + client_id: Optional[StrictStr] = None, + client_secret: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke OAuth 2.0 Access or Refresh Token + + Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + + :param token: (required) + :type token: str + :param client_id: + :type client_id: str + :param client_secret: + :type client_secret: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_token_serialize( + token=token, + client_id=client_id, + client_secret=client_secret, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_o_auth2_token_without_preload_content( + self, + token: StrictStr, + client_id: Optional[StrictStr] = None, + client_secret: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke OAuth 2.0 Access or Refresh Token + + Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + + :param token: (required) + :type token: str + :param client_id: + :type client_id: str + :param client_secret: + :type client_secret: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_o_auth2_token_serialize( + token=token, + client_id=client_id, + client_secret=client_secret, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_o_auth2_token_serialize( self, token, - **kwargs - ): - """Revoke OAuth 2.0 Access or Refresh Token # noqa: E501 - - Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revoke_o_auth2_token(token, async_req=True) - >>> result = thread.get() - - Args: - token (str): - - Keyword Args: - client_id (str): [optional] - client_secret (str): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['token'] = \ - token - return self.revoke_o_auth2_token_endpoint.call_with_http_info(**kwargs) - + client_id, + client_secret, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if client_id is not None: + _form_params.append(('client_id', client_id)) + if client_secret is not None: + _form_params.append(('client_secret', client_secret)) + if token is not None: + _form_params.append(('token', token)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'basic', + 'oauth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/oauth2/revoke', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def set_o_auth2_client( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Set OAuth 2.0 Client + + Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '400': "ErrorOAuth2", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_o_auth2_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Set OAuth 2.0 Client + + Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '400': "ErrorOAuth2", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_o_auth2_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set OAuth 2.0 Client + + Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '400': "ErrorOAuth2", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_o_auth2_client_serialize( self, id, o_auth2_client, - **kwargs - ): - """Set OAuth 2.0 Client # noqa: E501 - - Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_o_auth2_client(id, o_auth2_client, async_req=True) - >>> result = thread.get() - - Args: - id (str): OAuth 2.0 Client ID - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['o_auth2_client'] = \ - o_auth2_client - return self.set_o_auth2_client_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if o_auth2_client is not None: + _body_params = o_auth2_client + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/clients/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def set_o_auth2_client_lifespans( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client_token_lifespans: Optional[OAuth2ClientTokenLifespans] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Set OAuth2 Client Token Lifespans + + Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client_token_lifespans: + :type o_auth2_client_token_lifespans: OAuth2ClientTokenLifespans + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_lifespans_serialize( + id=id, + o_auth2_client_token_lifespans=o_auth2_client_token_lifespans, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_o_auth2_client_lifespans_with_http_info( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client_token_lifespans: Optional[OAuth2ClientTokenLifespans] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Set OAuth2 Client Token Lifespans + + Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client_token_lifespans: + :type o_auth2_client_token_lifespans: OAuth2ClientTokenLifespans + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_lifespans_serialize( + id=id, + o_auth2_client_token_lifespans=o_auth2_client_token_lifespans, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_o_auth2_client_lifespans_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client_token_lifespans: Optional[OAuth2ClientTokenLifespans] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set OAuth2 Client Token Lifespans + + Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client_token_lifespans: + :type o_auth2_client_token_lifespans: OAuth2ClientTokenLifespans + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_o_auth2_client_lifespans_serialize( + id=id, + o_auth2_client_token_lifespans=o_auth2_client_token_lifespans, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_o_auth2_client_lifespans_serialize( self, id, - **kwargs - ): - """Set OAuth2 Client Token Lifespans # noqa: E501 - - Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_o_auth2_client_lifespans(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): OAuth 2.0 Client ID - - Keyword Args: - o_auth2_client_token_lifespans (OAuth2ClientTokenLifespans): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.set_o_auth2_client_lifespans_endpoint.call_with_http_info(**kwargs) - + o_auth2_client_token_lifespans, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if o_auth2_client_token_lifespans is not None: + _body_params = o_auth2_client_token_lifespans + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/admin/clients/{id}/lifespans', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def trust_o_auth2_jwt_grant_issuer( self, - **kwargs - ): - """Trust OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - - Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.trust_o_auth2_jwt_grant_issuer(async_req=True) - >>> result = thread.get() - - - Keyword Args: - trust_o_auth2_jwt_grant_issuer (TrustOAuth2JwtGrantIssuer): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - TrustedOAuth2JwtGrantIssuer - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.trust_o_auth2_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + trust_o_auth2_jwt_grant_issuer: Optional[TrustOAuth2JwtGrantIssuer] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TrustedOAuth2JwtGrantIssuer: + """Trust OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + + :param trust_o_auth2_jwt_grant_issuer: + :type trust_o_auth2_jwt_grant_issuer: TrustOAuth2JwtGrantIssuer + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trust_o_auth2_jwt_grant_issuer_serialize( + trust_o_auth2_jwt_grant_issuer=trust_o_auth2_jwt_grant_issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def trust_o_auth2_jwt_grant_issuer_with_http_info( + self, + trust_o_auth2_jwt_grant_issuer: Optional[TrustOAuth2JwtGrantIssuer] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TrustedOAuth2JwtGrantIssuer]: + """Trust OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + + :param trust_o_auth2_jwt_grant_issuer: + :type trust_o_auth2_jwt_grant_issuer: TrustOAuth2JwtGrantIssuer + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trust_o_auth2_jwt_grant_issuer_serialize( + trust_o_auth2_jwt_grant_issuer=trust_o_auth2_jwt_grant_issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def trust_o_auth2_jwt_grant_issuer_without_preload_content( + self, + trust_o_auth2_jwt_grant_issuer: Optional[TrustOAuth2JwtGrantIssuer] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Trust OAuth2 JWT Bearer Grant Type Issuer + + Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + + :param trust_o_auth2_jwt_grant_issuer: + :type trust_o_auth2_jwt_grant_issuer: TrustOAuth2JwtGrantIssuer + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trust_o_auth2_jwt_grant_issuer_serialize( + trust_o_auth2_jwt_grant_issuer=trust_o_auth2_jwt_grant_issuer, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TrustedOAuth2JwtGrantIssuer", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _trust_o_auth2_jwt_grant_issuer_serialize( + self, + trust_o_auth2_jwt_grant_issuer, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trust_o_auth2_jwt_grant_issuer is not None: + _body_params = trust_o_auth2_jwt_grant_issuer + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/admin/trust/grants/jwt-bearer/issuers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/clients/hydra/python/ory_hydra_client/api/oidc_api.py b/clients/hydra/python/ory_hydra_client/api/oidc_api.py index 6302612fc58..430efc492a4 100644 --- a/clients/hydra/python/ory_hydra_client/api/oidc_api.py +++ b/clients/hydra/python/ory_hydra_client/api/oidc_api.py @@ -1,1079 +1,2123 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.oidc_configuration import OidcConfiguration +from ory_hydra_client.models.oidc_user_info import OidcUserInfo +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse +from ory_hydra_client.api_client import ApiClient, RequestSerialized +from ory_hydra_client.api_response import ApiResponse +from ory_hydra_client.rest import RESTResponseType -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.api_client import ApiClient, Endpoint as _Endpoint -from ory_hydra_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from ory_hydra_client.model.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.oidc_configuration import OidcConfiguration -from ory_hydra_client.model.oidc_user_info import OidcUserInfo -from ory_hydra_client.model.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse -from ory_hydra_client.model.verifiable_credential_response import VerifiableCredentialResponse - - -class OidcApi(object): + +class OidcApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.create_oidc_dynamic_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/oauth2/register', - 'operation_id': 'create_oidc_dynamic_client', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'o_auth2_client', - ], - 'required': [ - 'o_auth2_client', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'o_auth2_client': - (OAuth2Client,), - }, - 'attribute_map': { - }, - 'location_map': { - 'o_auth2_client': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_verifiable_credential_endpoint = _Endpoint( - settings={ - 'response_type': (VerifiableCredentialResponse,), - 'auth': [], - 'endpoint_path': '/credentials', - 'operation_id': 'create_verifiable_credential', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'create_verifiable_credential_request_body', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'create_verifiable_credential_request_body': - (CreateVerifiableCredentialRequestBody,), - }, - 'attribute_map': { - }, - 'location_map': { - 'create_verifiable_credential_request_body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ + + + @validate_call + def create_oidc_dynamic_client( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="Dynamic Client Registration Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Register OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + + :param o_auth2_client: Dynamic Client Registration Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_oidc_dynamic_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_oidc_dynamic_client_with_http_info( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="Dynamic Client Registration Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Register OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + + :param o_auth2_client: Dynamic Client Registration Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_oidc_dynamic_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_oidc_dynamic_client_without_preload_content( + self, + o_auth2_client: Annotated[OAuth2Client, Field(description="Dynamic Client Registration Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Register OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + + :param o_auth2_client: Dynamic Client Registration Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_oidc_dynamic_client_serialize( + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OAuth2Client", + '400': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_oidc_dynamic_client_serialize( + self, + o_auth2_client, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if o_auth2_client is not None: + _body_params = o_auth2_client + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' ] - }, - api_client=api_client - ) - self.delete_oidc_dynamic_client_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearer' - ], - 'endpoint_path': '/oauth2/register/{id}', - 'operation_id': 'delete_oidc_dynamic_client', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/oauth2/register', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_verifiable_credential( + self, + create_verifiable_credential_request_body: Optional[CreateVerifiableCredentialRequestBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VerifiableCredentialResponse: + """Issues a Verifiable Credential + + This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + + :param create_verifiable_credential_request_body: + :type create_verifiable_credential_request_body: CreateVerifiableCredentialRequestBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_verifiable_credential_serialize( + create_verifiable_credential_request_body=create_verifiable_credential_request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VerifiableCredentialResponse", + '400': "VerifiableCredentialPrimingResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_verifiable_credential_with_http_info( + self, + create_verifiable_credential_request_body: Optional[CreateVerifiableCredentialRequestBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VerifiableCredentialResponse]: + """Issues a Verifiable Credential + + This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + + :param create_verifiable_credential_request_body: + :type create_verifiable_credential_request_body: CreateVerifiableCredentialRequestBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_verifiable_credential_serialize( + create_verifiable_credential_request_body=create_verifiable_credential_request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VerifiableCredentialResponse", + '400': "VerifiableCredentialPrimingResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_verifiable_credential_without_preload_content( + self, + create_verifiable_credential_request_body: Optional[CreateVerifiableCredentialRequestBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Issues a Verifiable Credential + + This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + + :param create_verifiable_credential_request_body: + :type create_verifiable_credential_request_body: CreateVerifiableCredentialRequestBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_verifiable_credential_serialize( + create_verifiable_credential_request_body=create_verifiable_credential_request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VerifiableCredentialResponse", + '400': "VerifiableCredentialPrimingResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_verifiable_credential_serialize( + self, + create_verifiable_credential_request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_verifiable_credential_request_body is not None: + _body_params = create_verifiable_credential_request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.discover_oidc_configuration_endpoint = _Endpoint( - settings={ - 'response_type': (OidcConfiguration,), - 'auth': [], - 'endpoint_path': '/.well-known/openid-configuration', - 'operation_id': 'discover_oidc_configuration', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_oidc_dynamic_client( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + + This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_oidc_dynamic_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + + This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_oidc_dynamic_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + + This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_oidc_dynamic_client_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_oidc_dynamic_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [ - 'bearer' - ], - 'endpoint_path': '/oauth2/register/{id}', - 'operation_id': 'get_oidc_dynamic_client', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/oauth2/register/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def discover_oidc_configuration( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OidcConfiguration: + """OpenID Connect Discovery + + A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_oidc_configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcConfiguration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def discover_oidc_configuration_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OidcConfiguration]: + """OpenID Connect Discovery + + A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_oidc_configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcConfiguration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def discover_oidc_configuration_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OpenID Connect Discovery + + A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_oidc_configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcConfiguration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _discover_oidc_configuration_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_oidc_user_info_endpoint = _Endpoint( - settings={ - 'response_type': (OidcUserInfo,), - 'auth': [ - 'oauth2' - ], - 'endpoint_path': '/userinfo', - 'operation_id': 'get_oidc_user_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/.well-known/openid-configuration', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_oidc_dynamic_client( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Get OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_oidc_dynamic_client_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Get OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_oidc_dynamic_client_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The id of the OAuth 2.0 Client.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OAuth2 Client using OpenID Dynamic Client Registration + + This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + + :param id: The id of the OAuth 2.0 Client. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_dynamic_client_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_oidc_dynamic_client_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_oidc_session_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/oauth2/sessions/logout', - 'operation_id': 'revoke_oidc_session', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.set_oidc_dynamic_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [ - 'bearer' - ], - 'endpoint_path': '/oauth2/register/{id}', - 'operation_id': 'set_oidc_dynamic_client', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'o_auth2_client', - ], - 'required': [ - 'id', - 'o_auth2_client', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'o_auth2_client': - (OAuth2Client,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'o_auth2_client': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/register/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_oidc_user_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OidcUserInfo: + """OpenID Connect Userinfo + + This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcUserInfo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_oidc_user_info_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OidcUserInfo]: + """OpenID Connect Userinfo + + This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcUserInfo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_oidc_user_info_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OpenID Connect Userinfo + + This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_oidc_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OidcUserInfo", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_oidc_user_info_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ 'application/json' ] - }, - api_client=api_client + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'oauth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/userinfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - def create_oidc_dynamic_client( + + + + @validate_call + def revoke_oidc_session( self, - o_auth2_client, - **kwargs - ): - """Register OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 - - This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_oidc_dynamic_client(o_auth2_client, async_req=True) - >>> result = thread.get() - - Args: - o_auth2_client (OAuth2Client): Dynamic Client Registration Request Body - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['o_auth2_client'] = \ - o_auth2_client - return self.create_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """OpenID Connect Front- and Back-channel Enabled Logout - def create_verifiable_credential( + This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_oidc_session_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_oidc_session_with_http_info( self, - **kwargs - ): - """Issues a Verifiable Credential # noqa: E501 - - This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_verifiable_credential(async_req=True) - >>> result = thread.get() - - - Keyword Args: - create_verifiable_credential_request_body (CreateVerifiableCredentialRequestBody): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - VerifiableCredentialResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.create_verifiable_credential_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """OpenID Connect Front- and Back-channel Enabled Logout - def delete_oidc_dynamic_client( + This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_oidc_session_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_oidc_session_without_preload_content( self, - id, - **kwargs - ): - """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol # noqa: E501 - - This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_oidc_dynamic_client(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the OAuth 2.0 Client. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.delete_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OpenID Connect Front- and Back-channel Enabled Logout - def discover_oidc_configuration( + This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_oidc_session_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_oidc_session_serialize( self, - **kwargs - ): - """OpenID Connect Discovery # noqa: E501 - - A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.discover_oidc_configuration(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OidcConfiguration - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.discover_oidc_configuration_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - def get_oidc_dynamic_client( + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/oauth2/sessions/logout', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_oidc_dynamic_client( self, - id, - **kwargs - ): - """Get OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 - - This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_oidc_dynamic_client(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The id of the OAuth 2.0 Client. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.get_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OAuth2Client: + """Set OAuth2 Client using OpenID Dynamic Client Registration - def get_oidc_user_info( + This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_oidc_dynamic_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_oidc_dynamic_client_with_http_info( self, - **kwargs - ): - """OpenID Connect Userinfo # noqa: E501 - - This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_oidc_user_info(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OidcUserInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_oidc_user_info_endpoint.call_with_http_info(**kwargs) + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OAuth2Client]: + """Set OAuth2 Client using OpenID Dynamic Client Registration - def revoke_oidc_session( + This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_oidc_dynamic_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_oidc_dynamic_client_without_preload_content( self, - **kwargs - ): - """OpenID Connect Front- and Back-channel Enabled Logout # noqa: E501 - - This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revoke_oidc_session(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.revoke_oidc_session_endpoint.call_with_http_info(**kwargs) + id: Annotated[StrictStr, Field(description="OAuth 2.0 Client ID")], + o_auth2_client: Annotated[OAuth2Client, Field(description="OAuth 2.0 Client Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set OAuth2 Client using OpenID Dynamic Client Registration - def set_oidc_dynamic_client( + This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + + :param id: OAuth 2.0 Client ID (required) + :type id: str + :param o_auth2_client: OAuth 2.0 Client Request Body (required) + :type o_auth2_client: OAuth2Client + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_oidc_dynamic_client_serialize( + id=id, + o_auth2_client=o_auth2_client, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OAuth2Client", + '404': "ErrorOAuth2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_oidc_dynamic_client_serialize( self, id, o_auth2_client, - **kwargs - ): - """Set OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 - - This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.set_oidc_dynamic_client(id, o_auth2_client, async_req=True) - >>> result = thread.get() - - Args: - id (str): OAuth 2.0 Client ID - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OAuth2Client - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['o_auth2_client'] = \ - o_auth2_client - return self.set_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if o_auth2_client is not None: + _body_params = o_auth2_client + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/oauth2/register/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/clients/hydra/python/ory_hydra_client/api/wellknown_api.py b/clients/hydra/python/ory_hydra_client/api/wellknown_api.py index 700a27f8807..f3d20f2a72d 100644 --- a/clients/hydra/python/ory_hydra_client/api/wellknown_api.py +++ b/clients/hydra/python/ory_hydra_client/api/wellknown_api.py @@ -1,160 +1,280 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet -from ory_hydra_client.api_client import ApiClient, Endpoint as _Endpoint -from ory_hydra_client.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet +from ory_hydra_client.api_client import ApiClient, RequestSerialized +from ory_hydra_client.api_response import ApiResponse +from ory_hydra_client.rest import RESTResponseType -class WellknownApi(object): +class WellknownApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.discover_json_web_keys_endpoint = _Endpoint( - settings={ - 'response_type': (JsonWebKeySet,), - 'auth': [], - 'endpoint_path': '/.well-known/jwks.json', - 'operation_id': 'discover_json_web_keys', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def discover_json_web_keys( self, - **kwargs - ): - """Discover Well-Known JSON Web Keys # noqa: E501 - - This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.discover_json_web_keys(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - JsonWebKeySet - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JsonWebKeySet: + """Discover Well-Known JSON Web Keys + + This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_json_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def discover_json_web_keys_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JsonWebKeySet]: + """Discover Well-Known JSON Web Keys + + This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_json_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + + @validate_call + def discover_json_web_keys_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Discover Well-Known JSON Web Keys + + This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._discover_json_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JsonWebKeySet", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + return response_data.response + + + def _discover_json_web_keys_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/.well-known/jwks.json', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.discover_json_web_keys_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/hydra/python/ory_hydra_client/api_client.py b/clients/hydra/python/ory_hydra_client/api_client.py index fe92d2e62fb..d1db19b2733 100644 --- a/clients/hydra/python/ory_hydra_client/api_client.py +++ b/clients/hydra/python/ory_hydra_client/api_client.py @@ -1,46 +1,48 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import datetime +from dateutil.parser import parse +from enum import Enum import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr -from ory_hydra_client import rest from ory_hydra_client.configuration import Configuration -from ory_hydra_client.exceptions import ApiTypeError, ApiValueError, ApiException -from ory_hydra_client.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from ory_hydra_client.api_response import ApiResponse, T as ApiResponseT +import ory_hydra_client.models +from ory_hydra_client import rest +from ory_hydra_client.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -48,28 +50,38 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -77,31 +89,14 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v2.2.0/python' + self.user_agent = 'OpenAPI-Generator/v2.2.1/python' + self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + pass @property def user_agent(self): @@ -115,27 +110,69 @@ def user_agent(self, value): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -146,14 +183,17 @@ def __call_api( header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( @@ -161,345 +201,264 @@ def __call_api( quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict)) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body, - request_auths=_request_auths) - # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ - return_data = response_data + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg - if not _preload_content: - return (return_data) - return return_data + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None content_type = response_data.getheader('content-type') if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance( - v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params - - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes + :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, - val in model_to_dict( - obj, - serialize=True).items()} - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError( - 'Unable to prepare type {} for serialization'.format( - obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object - try: - received_data = json.loads(response.data) - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. + return self.__deserialize(data, response_type) - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :param _request_auths: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auths: list, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type, _request_auths=_request_auths) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type, None, _request_auths)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(ory_hydra_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -508,10 +467,10 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -531,118 +490,169 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data - - def files_parameters(self, - files: typing.Optional[typing.Dict[str, - typing.List[io.IOBase]]] = None): - """Builds form parameters. + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) """ - if files is None: - return [] + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values - continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: return None - content_types = [x.lower() for x in content_types] + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + return content_types[0] - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, request_auths=None): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - :param request_auths: if set, the provided settings will - override the token in the configuration. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - if request_auths: - for auth_setting in request_auths: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) - return + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting - def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] @@ -653,245 +663,120 @@ def _apply_auth_params(self, headers, queries, resource_path, method, body, auth 'Authentication token must be in `query` or `header`' ) + def __deserialize_file(self, response): + """Deserializes body to file -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called - """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming', - '_request_auths' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str), - '_request_auths': (none_type, list) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) - - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. - if kwargs['_check_input_type'] is False: - return + handle file downloading + save response body into a tmp file and return the instance - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + with open(path, "wb") as f: + f.write(response.data) - return params + return path - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. - api_instance = JwkApi() - api_instance.create_json_web_key_set # this is an instance of the class Endpoint - api_instance.create_json_web_key_set() # this invokes api_instance.create_json_web_key_set.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.create_json_web_key_set.callable or self.callable in this class + :param data: str. + :param klass: class literal. + :return: int, long, float, str, bool. """ - return self.callable(self, *args, **kwargs) + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data - def call_with_http_info(self, **kwargs): + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. - self.__validate_inputs(kwargs) + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) - params = self.__gather_params(kwargs) + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if params['body'] != "": - content_types_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - if content_types_list: - params['header']['Content-Type'] = content_types_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - _request_auths=kwargs['_request_auths'], - collection_formats=params['collection_format']) + return klass.from_dict(data) diff --git a/clients/hydra/python/ory_hydra_client/api_response.py b/clients/hydra/python/ory_hydra_client/api_response.py new file mode 100644 index 00000000000..9bc7c11f6b9 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/clients/hydra/python/ory_hydra_client/apis/__init__.py b/clients/hydra/python/ory_hydra_client/apis/__init__.py deleted file mode 100644 index a31599613f7..00000000000 --- a/clients/hydra/python/ory_hydra_client/apis/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from ory_hydra_client.api.jwk_api import JwkApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from ory_hydra_client.api.jwk_api import JwkApi -from ory_hydra_client.api.metadata_api import MetadataApi -from ory_hydra_client.api.o_auth2_api import OAuth2Api -from ory_hydra_client.api.oidc_api import OidcApi -from ory_hydra_client.api.wellknown_api import WellknownApi diff --git a/clients/hydra/python/ory_hydra_client/configuration.py b/clients/hydra/python/ory_hydra_client/configuration.py index 66b6e61108a..ea235efd1df 100644 --- a/clients/hydra/python/ory_hydra_client/configuration.py +++ b/clients/hydra/python/ory_hydra_client/configuration.py @@ -1,23 +1,27 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 -from http import client as http_client -from ory_hydra_client.exceptions import ApiValueError - +import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -25,46 +29,23 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. +class Configuration: + """This class contains various settings of the API client. - :param host: Base url + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -73,9 +54,11 @@ class Configuration(object): configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. + The validation of enums is performed for variables with defined enum + values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + in PEM format. + :param retries: Number of retries for API requests. :Example: @@ -100,14 +83,16 @@ class Configuration(object): def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", + access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, ssl_ca_cert=None, - ): + retries=None, + *, + debug: Optional[bool] = None + ) -> None: """Constructor """ self._base_path = "http://localhost" if host is None else host @@ -121,11 +106,13 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -145,8 +132,9 @@ def __init__(self, host=None, self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ self.logger = {} """Logging Settings """ @@ -158,13 +146,16 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -185,6 +176,10 @@ def __init__(self, host=None, self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -194,26 +189,32 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ def __deepcopy__(self, memo): cls = self.__class__ @@ -231,13 +232,6 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -248,21 +242,31 @@ def set_default(cls, default): :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod def get_default_copy(cls): - """Return new instance of configuration. + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -316,15 +320,15 @@ def debug(self, value): # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -418,8 +422,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v2.2.0\n"\ - "SDK Package Version: v2.2.0".\ + "Version of the API: v2.2.1\n"\ + "SDK Package Version: v2.2.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/clients/hydra/python/ory_hydra_client/exceptions.py b/clients/hydra/python/ory_hydra_client/exceptions.py index 96681fc7fad..5a68437079c 100644 --- a/clients/hydra/python/ory_hydra_client/exceptions.py +++ b/clients/hydra/python/ory_hydra_client/exceptions.py @@ -1,13 +1,19 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -15,7 +21,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): + key_type=None) -> None: """ Raises an exception for TypeErrors Args: @@ -43,7 +49,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -61,7 +67,7 @@ def __init__(self, msg, path_to_item=None): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -80,7 +86,7 @@ def __init__(self, msg, path_to_item=None): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -98,54 +104,89 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" - error_message = "Status Code: {0}\n"\ + error_message = "({0})\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass + - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/clients/hydra/python/ory_hydra_client/model/__init__.py b/clients/hydra/python/ory_hydra_client/model/__init__.py deleted file mode 100644 index f5b07714fc3..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from ory_hydra_client.models import ModelA, ModelB diff --git a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py deleted file mode 100644 index 2cbe2c12936..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['AcceptOAuth2ConsentRequestSession'] = AcceptOAuth2ConsentRequestSession - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class AcceptOAuth2ConsentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'context': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'grant_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 - 'grant_scope': (StringSliceJSONFormat,), # noqa: E501 - 'handled_at': (datetime,), # noqa: E501 - 'remember': (bool,), # noqa: E501 - 'remember_for': (int,), # noqa: E501 - 'session': (AcceptOAuth2ConsentRequestSession,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'context': 'context', # noqa: E501 - 'grant_access_token_audience': 'grant_access_token_audience', # noqa: E501 - 'grant_scope': 'grant_scope', # noqa: E501 - 'handled_at': 'handled_at', # noqa: E501 - 'remember': 'remember', # noqa: E501 - 'remember_for': 'remember_for', # noqa: E501 - 'session': 'session', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AcceptOAuth2ConsentRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - grant_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - grant_scope (StringSliceJSONFormat): [optional] # noqa: E501 - handled_at (datetime): [optional] # noqa: E501 - remember (bool): Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. [optional] # noqa: E501 - remember_for (int): RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. [optional] # noqa: E501 - session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AcceptOAuth2ConsentRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - grant_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - grant_scope (StringSliceJSONFormat): [optional] # noqa: E501 - handled_at (datetime): [optional] # noqa: E501 - remember (bool): Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. [optional] # noqa: E501 - remember_for (int): RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. [optional] # noqa: E501 - session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py deleted file mode 100644 index 6640ca56f74..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class AcceptOAuth2ConsentRequestSession(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'access_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'id_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_token': 'access_token', # noqa: E501 - 'id_token': 'id_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AcceptOAuth2ConsentRequestSession - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (bool, date, datetime, dict, float, int, list, str, none_type): AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!. [optional] # noqa: E501 - id_token (bool, date, datetime, dict, float, int, list, str, none_type): IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care!. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AcceptOAuth2ConsentRequestSession - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (bool, date, datetime, dict, float, int, list, str, none_type): AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!. [optional] # noqa: E501 - id_token (bool, date, datetime, dict, float, int, list, str, none_type): IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care!. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py deleted file mode 100644 index af41e1a604a..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py +++ /dev/null @@ -1,308 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class AcceptOAuth2LoginRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'subject': (str,), # noqa: E501 - 'acr': (str,), # noqa: E501 - 'amr': (StringSliceJSONFormat,), # noqa: E501 - 'context': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'extend_session_lifespan': (bool,), # noqa: E501 - 'force_subject_identifier': (str,), # noqa: E501 - 'identity_provider_session_id': (str,), # noqa: E501 - 'remember': (bool,), # noqa: E501 - 'remember_for': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'subject': 'subject', # noqa: E501 - 'acr': 'acr', # noqa: E501 - 'amr': 'amr', # noqa: E501 - 'context': 'context', # noqa: E501 - 'extend_session_lifespan': 'extend_session_lifespan', # noqa: E501 - 'force_subject_identifier': 'force_subject_identifier', # noqa: E501 - 'identity_provider_session_id': 'identity_provider_session_id', # noqa: E501 - 'remember': 'remember', # noqa: E501 - 'remember_for': 'remember_for', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 - """AcceptOAuth2LoginRequest - a model defined in OpenAPI - - Args: - subject (str): Subject is the user ID of the end-user that authenticated. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr (str): ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. [optional] # noqa: E501 - amr (StringSliceJSONFormat): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - extend_session_lifespan (bool): Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.. [optional] # noqa: E501 - force_subject_identifier (str): ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.. [optional] # noqa: E501 - identity_provider_session_id (str): IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.. [optional] # noqa: E501 - remember (bool): Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.. [optional] # noqa: E501 - remember_for (int): RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.subject = subject - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, subject, *args, **kwargs): # noqa: E501 - """AcceptOAuth2LoginRequest - a model defined in OpenAPI - - Args: - subject (str): Subject is the user ID of the end-user that authenticated. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr (str): ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. [optional] # noqa: E501 - amr (StringSliceJSONFormat): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - extend_session_lifespan (bool): Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.. [optional] # noqa: E501 - force_subject_identifier (str): ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.. [optional] # noqa: E501 - identity_provider_session_id (str): IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.. [optional] # noqa: E501 - remember (bool): Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.. [optional] # noqa: E501 - remember_for (int): RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.subject = subject - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py b/clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py deleted file mode 100644 index cfbb2ac3881..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py +++ /dev/null @@ -1,282 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class CreateJsonWebKeySet(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'alg': (str,), # noqa: E501 - 'kid': (str,), # noqa: E501 - 'use': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alg': 'alg', # noqa: E501 - 'kid': 'kid', # noqa: E501 - 'use': 'use', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, alg, kid, use, *args, **kwargs): # noqa: E501 - """CreateJsonWebKeySet - a model defined in OpenAPI - - Args: - alg (str): JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. - kid (str): JSON Web Key ID The Key ID of the key to be created. - use (str): JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alg = alg - self.kid = kid - self.use = use - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, alg, kid, use, *args, **kwargs): # noqa: E501 - """CreateJsonWebKeySet - a model defined in OpenAPI - - Args: - alg (str): JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. - kid (str): JSON Web Key ID The Key ID of the key to be created. - use (str): JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alg = alg - self.kid = kid - self.use = use - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/create_verifiable_credential_request_body.py b/clients/hydra/python/ory_hydra_client/model/create_verifiable_credential_request_body.py deleted file mode 100644 index 8375617557f..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/create_verifiable_credential_request_body.py +++ /dev/null @@ -1,278 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.verifiable_credential_proof import VerifiableCredentialProof - globals()['VerifiableCredentialProof'] = VerifiableCredentialProof - - -class CreateVerifiableCredentialRequestBody(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'format': (str,), # noqa: E501 - 'proof': (VerifiableCredentialProof,), # noqa: E501 - 'types': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'format': 'format', # noqa: E501 - 'proof': 'proof', # noqa: E501 - 'types': 'types', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateVerifiableCredentialRequestBody - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - format (str): [optional] # noqa: E501 - proof (VerifiableCredentialProof): [optional] # noqa: E501 - types ([str]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateVerifiableCredentialRequestBody - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - format (str): [optional] # noqa: E501 - proof (VerifiableCredentialProof): [optional] # noqa: E501 - types ([str]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/credential_supported_draft00.py b/clients/hydra/python/ory_hydra_client/model/credential_supported_draft00.py deleted file mode 100644 index d6d477982a3..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/credential_supported_draft00.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class CredentialSupportedDraft00(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'cryptographic_binding_methods_supported': ([str],), # noqa: E501 - 'cryptographic_suites_supported': ([str],), # noqa: E501 - 'format': (str,), # noqa: E501 - 'types': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'cryptographic_binding_methods_supported': 'cryptographic_binding_methods_supported', # noqa: E501 - 'cryptographic_suites_supported': 'cryptographic_suites_supported', # noqa: E501 - 'format': 'format', # noqa: E501 - 'types': 'types', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CredentialSupportedDraft00 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cryptographic_binding_methods_supported ([str]): OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.. [optional] # noqa: E501 - cryptographic_suites_supported ([str]): OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.. [optional] # noqa: E501 - format (str): OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.. [optional] # noqa: E501 - types ([str]): OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CredentialSupportedDraft00 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cryptographic_binding_methods_supported ([str]): OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.. [optional] # noqa: E501 - cryptographic_suites_supported ([str]): OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.. [optional] # noqa: E501 - format (str): OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.. [optional] # noqa: E501 - types ([str]): OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/error_o_auth2.py b/clients/hydra/python/ory_hydra_client/model/error_o_auth2.py deleted file mode 100644 index 62f8ed451a6..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/error_o_auth2.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class ErrorOAuth2(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'error': (str,), # noqa: E501 - 'error_debug': (str,), # noqa: E501 - 'error_description': (str,), # noqa: E501 - 'error_hint': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'error': 'error', # noqa: E501 - 'error_debug': 'error_debug', # noqa: E501 - 'error_description': 'error_description', # noqa: E501 - 'error_hint': 'error_hint', # noqa: E501 - 'status_code': 'status_code', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ErrorOAuth2 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): Error. [optional] # noqa: E501 - error_debug (str): Error Debug Information Only available in dev mode.. [optional] # noqa: E501 - error_description (str): Error Description. [optional] # noqa: E501 - error_hint (str): Error Hint Helps the user identify the error cause.. [optional] # noqa: E501 - status_code (int): HTTP Status Code. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ErrorOAuth2 - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): Error. [optional] # noqa: E501 - error_debug (str): Error Debug Information Only available in dev mode.. [optional] # noqa: E501 - error_description (str): Error Description. [optional] # noqa: E501 - error_hint (str): Error Hint Helps the user identify the error cause.. [optional] # noqa: E501 - status_code (int): HTTP Status Code. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/generic_error.py b/clients/hydra/python/ory_hydra_client/model/generic_error.py deleted file mode 100644 index ac02890e1d3..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/generic_error.py +++ /dev/null @@ -1,298 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class GenericError(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'message': (str,), # noqa: E501 - 'code': (int,), # noqa: E501 - 'debug': (str,), # noqa: E501 - 'details': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'reason': (str,), # noqa: E501 - 'request': (str,), # noqa: E501 - 'status': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'message': 'message', # noqa: E501 - 'code': 'code', # noqa: E501 - 'debug': 'debug', # noqa: E501 - 'details': 'details', # noqa: E501 - 'id': 'id', # noqa: E501 - 'reason': 'reason', # noqa: E501 - 'request': 'request', # noqa: E501 - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 - """GenericError - a model defined in OpenAPI - - Args: - message (str): Error message The error's message. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - code (int): The status code. [optional] # noqa: E501 - debug (str): Debug information This field is often not exposed to protect against leaking sensitive information.. [optional] # noqa: E501 - details (bool, date, datetime, dict, float, int, list, str, none_type): Further error details. [optional] # noqa: E501 - id (str): The error ID Useful when trying to identify various errors in application logic.. [optional] # noqa: E501 - reason (str): A human-readable reason for the error. [optional] # noqa: E501 - request (str): The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.. [optional] # noqa: E501 - status (str): The status description. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, message, *args, **kwargs): # noqa: E501 - """GenericError - a model defined in OpenAPI - - Args: - message (str): Error message The error's message. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - code (int): The status code. [optional] # noqa: E501 - debug (str): Debug information This field is often not exposed to protect against leaking sensitive information.. [optional] # noqa: E501 - details (bool, date, datetime, dict, float, int, list, str, none_type): Further error details. [optional] # noqa: E501 - id (str): The error ID Useful when trying to identify various errors in application logic.. [optional] # noqa: E501 - reason (str): A human-readable reason for the error. [optional] # noqa: E501 - request (str): The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.. [optional] # noqa: E501 - status (str): The status description. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/get_version200_response.py b/clients/hydra/python/ory_hydra_client/model/get_version200_response.py deleted file mode 100644 index 829924cb598..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/get_version200_response.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class GetVersion200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'version': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'version': 'version', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GetVersion200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (str): The version of Ory Hydra.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GetVersion200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (str): The version of Ory Hydra.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py b/clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py deleted file mode 100644 index 254554469fd..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class HealthNotReadyStatus(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'errors': ({str: (str,)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'errors': 'errors', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """HealthNotReadyStatus - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - errors ({str: (str,)}): Errors contains a list of errors that caused the not ready status.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """HealthNotReadyStatus - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - errors ({str: (str,)}): Errors contains a list of errors that caused the not ready status.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/health_status.py b/clients/hydra/python/ory_hydra_client/model/health_status.py deleted file mode 100644 index beec4a5b66c..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/health_status.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class HealthStatus(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'status': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """HealthStatus - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - status (str): Status always contains \"ok\".. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """HealthStatus - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - status (str): Status always contains \"ok\".. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py b/clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py deleted file mode 100644 index ba639d29bd8..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py +++ /dev/null @@ -1,322 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class IntrospectedOAuth2Token(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'active': (bool,), # noqa: E501 - 'aud': ([str],), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'exp': (int,), # noqa: E501 - 'ext': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'iat': (int,), # noqa: E501 - 'iss': (str,), # noqa: E501 - 'nbf': (int,), # noqa: E501 - 'obfuscated_subject': (str,), # noqa: E501 - 'scope': (str,), # noqa: E501 - 'sub': (str,), # noqa: E501 - 'token_type': (str,), # noqa: E501 - 'token_use': (str,), # noqa: E501 - 'username': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'active': 'active', # noqa: E501 - 'aud': 'aud', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'exp': 'exp', # noqa: E501 - 'ext': 'ext', # noqa: E501 - 'iat': 'iat', # noqa: E501 - 'iss': 'iss', # noqa: E501 - 'nbf': 'nbf', # noqa: E501 - 'obfuscated_subject': 'obfuscated_subject', # noqa: E501 - 'scope': 'scope', # noqa: E501 - 'sub': 'sub', # noqa: E501 - 'token_type': 'token_type', # noqa: E501 - 'token_use': 'token_use', # noqa: E501 - 'username': 'username', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 - """IntrospectedOAuth2Token - a model defined in OpenAPI - - Args: - active (bool): Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - aud ([str]): Audience contains a list of the token's intended audiences.. [optional] # noqa: E501 - client_id (str): ID is aclient identifier for the OAuth 2.0 client that requested this token.. [optional] # noqa: E501 - exp (int): Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.. [optional] # noqa: E501 - ext ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra is arbitrary data set by the session.. [optional] # noqa: E501 - iat (int): Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.. [optional] # noqa: E501 - iss (str): IssuerURL is a string representing the issuer of this token. [optional] # noqa: E501 - nbf (int): NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.. [optional] # noqa: E501 - obfuscated_subject (str): ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.. [optional] # noqa: E501 - scope (str): Scope is a JSON string containing a space-separated list of scopes associated with this token.. [optional] # noqa: E501 - sub (str): Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.. [optional] # noqa: E501 - token_type (str): TokenType is the introspected token's type, typically `Bearer`.. [optional] # noqa: E501 - token_use (str): TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.. [optional] # noqa: E501 - username (str): Username is a human-readable identifier for the resource owner who authorized this token.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.active = active - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, active, *args, **kwargs): # noqa: E501 - """IntrospectedOAuth2Token - a model defined in OpenAPI - - Args: - active (bool): Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - aud ([str]): Audience contains a list of the token's intended audiences.. [optional] # noqa: E501 - client_id (str): ID is aclient identifier for the OAuth 2.0 client that requested this token.. [optional] # noqa: E501 - exp (int): Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.. [optional] # noqa: E501 - ext ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Extra is arbitrary data set by the session.. [optional] # noqa: E501 - iat (int): Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.. [optional] # noqa: E501 - iss (str): IssuerURL is a string representing the issuer of this token. [optional] # noqa: E501 - nbf (int): NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.. [optional] # noqa: E501 - obfuscated_subject (str): ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.. [optional] # noqa: E501 - scope (str): Scope is a JSON string containing a space-separated list of scopes associated with this token.. [optional] # noqa: E501 - sub (str): Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.. [optional] # noqa: E501 - token_type (str): TokenType is the introspected token's type, typically `Bearer`.. [optional] # noqa: E501 - token_use (str): TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.. [optional] # noqa: E501 - username (str): Username is a human-readable identifier for the resource owner who authorized this token.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.active = active - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/is_ready200_response.py b/clients/hydra/python/ory_hydra_client/model/is_ready200_response.py deleted file mode 100644 index a2fdb512d57..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/is_ready200_response.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class IsReady200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'status': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IsReady200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - status (str): Always \"ok\".. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """IsReady200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - status (str): Always \"ok\".. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/is_ready503_response.py b/clients/hydra/python/ory_hydra_client/model/is_ready503_response.py deleted file mode 100644 index a04b8f6f560..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/is_ready503_response.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class IsReady503Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'errors': ({str: (str,)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'errors': 'errors', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IsReady503Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - errors ({str: (str,)}): Errors contains a list of errors that caused the not ready status.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """IsReady503Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - errors ({str: (str,)}): Errors contains a list of errors that caused the not ready status.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/json_patch.py b/clients/hydra/python/ory_hydra_client/model/json_patch.py deleted file mode 100644 index 871290ec6a7..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/json_patch.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class JsonPatch(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'op': (str,), # noqa: E501 - 'path': (str,), # noqa: E501 - '_from': (str,), # noqa: E501 - 'value': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'op': 'op', # noqa: E501 - 'path': 'path', # noqa: E501 - '_from': 'from', # noqa: E501 - 'value': 'value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, op, path, *args, **kwargs): # noqa: E501 - """JsonPatch - a model defined in OpenAPI - - Args: - op (str): The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". - path (str): The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - _from (str): This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. [optional] # noqa: E501 - value (bool, date, datetime, dict, float, int, list, str, none_type): The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.op = op - self.path = path - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, op, path, *args, **kwargs): # noqa: E501 - """JsonPatch - a model defined in OpenAPI - - Args: - op (str): The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". - path (str): The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - _from (str): This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. [optional] # noqa: E501 - value (bool, date, datetime, dict, float, int, list, str, none_type): The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.op = op - self.path = path - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/json_patch_document.py b/clients/hydra/python/ory_hydra_client/model/json_patch_document.py deleted file mode 100644 index a9d094141b5..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/json_patch_document.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.json_patch import JsonPatch - globals()['JsonPatch'] = JsonPatch - - -class JsonPatchDocument(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': ([JsonPatch],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """JsonPatchDocument - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 - - Keyword Args: - value ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """JsonPatchDocument - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 - - Keyword Args: - value ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/clients/hydra/python/ory_hydra_client/model/json_web_key.py b/clients/hydra/python/ory_hydra_client/model/json_web_key.py deleted file mode 100644 index 317da110604..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/json_web_key.py +++ /dev/null @@ -1,340 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class JsonWebKey(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'alg': (str,), # noqa: E501 - 'kid': (str,), # noqa: E501 - 'kty': (str,), # noqa: E501 - 'use': (str,), # noqa: E501 - 'crv': (str,), # noqa: E501 - 'd': (str,), # noqa: E501 - 'dp': (str,), # noqa: E501 - 'dq': (str,), # noqa: E501 - 'e': (str,), # noqa: E501 - 'k': (str,), # noqa: E501 - 'n': (str,), # noqa: E501 - 'p': (str,), # noqa: E501 - 'q': (str,), # noqa: E501 - 'qi': (str,), # noqa: E501 - 'x': (str,), # noqa: E501 - 'x5c': ([str],), # noqa: E501 - 'y': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alg': 'alg', # noqa: E501 - 'kid': 'kid', # noqa: E501 - 'kty': 'kty', # noqa: E501 - 'use': 'use', # noqa: E501 - 'crv': 'crv', # noqa: E501 - 'd': 'd', # noqa: E501 - 'dp': 'dp', # noqa: E501 - 'dq': 'dq', # noqa: E501 - 'e': 'e', # noqa: E501 - 'k': 'k', # noqa: E501 - 'n': 'n', # noqa: E501 - 'p': 'p', # noqa: E501 - 'q': 'q', # noqa: E501 - 'qi': 'qi', # noqa: E501 - 'x': 'x', # noqa: E501 - 'x5c': 'x5c', # noqa: E501 - 'y': 'y', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, alg, kid, kty, use, *args, **kwargs): # noqa: E501 - """JsonWebKey - a model defined in OpenAPI - - Args: - alg (str): The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. - kid (str): The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. - kty (str): The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. - use (str): Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - crv (str): [optional] # noqa: E501 - d (str): [optional] # noqa: E501 - dp (str): [optional] # noqa: E501 - dq (str): [optional] # noqa: E501 - e (str): [optional] # noqa: E501 - k (str): [optional] # noqa: E501 - n (str): [optional] # noqa: E501 - p (str): [optional] # noqa: E501 - q (str): [optional] # noqa: E501 - qi (str): [optional] # noqa: E501 - x (str): [optional] # noqa: E501 - x5c ([str]): The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.. [optional] # noqa: E501 - y (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alg = alg - self.kid = kid - self.kty = kty - self.use = use - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, alg, kid, kty, use, *args, **kwargs): # noqa: E501 - """JsonWebKey - a model defined in OpenAPI - - Args: - alg (str): The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. - kid (str): The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. - kty (str): The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. - use (str): Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - crv (str): [optional] # noqa: E501 - d (str): [optional] # noqa: E501 - dp (str): [optional] # noqa: E501 - dq (str): [optional] # noqa: E501 - e (str): [optional] # noqa: E501 - k (str): [optional] # noqa: E501 - n (str): [optional] # noqa: E501 - p (str): [optional] # noqa: E501 - q (str): [optional] # noqa: E501 - qi (str): [optional] # noqa: E501 - x (str): [optional] # noqa: E501 - x5c ([str]): The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.. [optional] # noqa: E501 - y (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alg = alg - self.kid = kid - self.kty = kty - self.use = use - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/json_web_key_set.py b/clients/hydra/python/ory_hydra_client/model/json_web_key_set.py deleted file mode 100644 index 959f43efa88..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/json_web_key_set.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.json_web_key import JsonWebKey - globals()['JsonWebKey'] = JsonWebKey - - -class JsonWebKeySet(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'keys': ([JsonWebKey],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'keys': 'keys', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """JsonWebKeySet - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - keys ([JsonWebKey]): List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """JsonWebKeySet - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - keys ([JsonWebKey]): List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/null_duration.py b/clients/hydra/python/ory_hydra_client/model/null_duration.py deleted file mode 100644 index 0b32b34a7ac..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/null_duration.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class NullDuration(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('value',): { - 'regex': { - 'pattern': r'', # noqa: E501 - }, - }, - } - - additional_properties_type = None - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """NullDuration - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): # noqa: E501 - - Keyword Args: - value (str): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """NullDuration - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): # noqa: E501 - - Keyword Args: - value (str): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_client.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_client.py deleted file mode 100644 index 68f92bc38a3..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_client.py +++ /dev/null @@ -1,460 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.null_duration import NullDuration - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['NullDuration'] = NullDuration - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class OAuth2Client(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'access_token_strategy': (str,), # noqa: E501 - 'allowed_cors_origins': (StringSliceJSONFormat,), # noqa: E501 - 'audience': (StringSliceJSONFormat,), # noqa: E501 - 'authorization_code_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'authorization_code_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'authorization_code_grant_refresh_token_lifespan': (NullDuration,), # noqa: E501 - 'backchannel_logout_session_required': (bool,), # noqa: E501 - 'backchannel_logout_uri': (str,), # noqa: E501 - 'client_credentials_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'client_id': (str,), # noqa: E501 - 'client_name': (str,), # noqa: E501 - 'client_secret': (str,), # noqa: E501 - 'client_secret_expires_at': (int,), # noqa: E501 - 'client_uri': (str,), # noqa: E501 - 'contacts': (StringSliceJSONFormat,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'frontchannel_logout_session_required': (bool,), # noqa: E501 - 'frontchannel_logout_uri': (str,), # noqa: E501 - 'grant_types': (StringSliceJSONFormat,), # noqa: E501 - 'implicit_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'implicit_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'jwks': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'jwks_uri': (str,), # noqa: E501 - 'jwt_bearer_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'logo_uri': (str,), # noqa: E501 - 'metadata': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'owner': (str,), # noqa: E501 - 'policy_uri': (str,), # noqa: E501 - 'post_logout_redirect_uris': (StringSliceJSONFormat,), # noqa: E501 - 'redirect_uris': (StringSliceJSONFormat,), # noqa: E501 - 'refresh_token_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'refresh_token_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'refresh_token_grant_refresh_token_lifespan': (NullDuration,), # noqa: E501 - 'registration_access_token': (str,), # noqa: E501 - 'registration_client_uri': (str,), # noqa: E501 - 'request_object_signing_alg': (str,), # noqa: E501 - 'request_uris': (StringSliceJSONFormat,), # noqa: E501 - 'response_types': (StringSliceJSONFormat,), # noqa: E501 - 'scope': (str,), # noqa: E501 - 'sector_identifier_uri': (str,), # noqa: E501 - 'skip_consent': (bool,), # noqa: E501 - 'skip_logout_consent': (bool,), # noqa: E501 - 'subject_type': (str,), # noqa: E501 - 'token_endpoint_auth_method': (str,), # noqa: E501 - 'token_endpoint_auth_signing_alg': (str,), # noqa: E501 - 'tos_uri': (str,), # noqa: E501 - 'updated_at': (datetime,), # noqa: E501 - 'userinfo_signed_response_alg': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_token_strategy': 'access_token_strategy', # noqa: E501 - 'allowed_cors_origins': 'allowed_cors_origins', # noqa: E501 - 'audience': 'audience', # noqa: E501 - 'authorization_code_grant_access_token_lifespan': 'authorization_code_grant_access_token_lifespan', # noqa: E501 - 'authorization_code_grant_id_token_lifespan': 'authorization_code_grant_id_token_lifespan', # noqa: E501 - 'authorization_code_grant_refresh_token_lifespan': 'authorization_code_grant_refresh_token_lifespan', # noqa: E501 - 'backchannel_logout_session_required': 'backchannel_logout_session_required', # noqa: E501 - 'backchannel_logout_uri': 'backchannel_logout_uri', # noqa: E501 - 'client_credentials_grant_access_token_lifespan': 'client_credentials_grant_access_token_lifespan', # noqa: E501 - 'client_id': 'client_id', # noqa: E501 - 'client_name': 'client_name', # noqa: E501 - 'client_secret': 'client_secret', # noqa: E501 - 'client_secret_expires_at': 'client_secret_expires_at', # noqa: E501 - 'client_uri': 'client_uri', # noqa: E501 - 'contacts': 'contacts', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'frontchannel_logout_session_required': 'frontchannel_logout_session_required', # noqa: E501 - 'frontchannel_logout_uri': 'frontchannel_logout_uri', # noqa: E501 - 'grant_types': 'grant_types', # noqa: E501 - 'implicit_grant_access_token_lifespan': 'implicit_grant_access_token_lifespan', # noqa: E501 - 'implicit_grant_id_token_lifespan': 'implicit_grant_id_token_lifespan', # noqa: E501 - 'jwks': 'jwks', # noqa: E501 - 'jwks_uri': 'jwks_uri', # noqa: E501 - 'jwt_bearer_grant_access_token_lifespan': 'jwt_bearer_grant_access_token_lifespan', # noqa: E501 - 'logo_uri': 'logo_uri', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'owner': 'owner', # noqa: E501 - 'policy_uri': 'policy_uri', # noqa: E501 - 'post_logout_redirect_uris': 'post_logout_redirect_uris', # noqa: E501 - 'redirect_uris': 'redirect_uris', # noqa: E501 - 'refresh_token_grant_access_token_lifespan': 'refresh_token_grant_access_token_lifespan', # noqa: E501 - 'refresh_token_grant_id_token_lifespan': 'refresh_token_grant_id_token_lifespan', # noqa: E501 - 'refresh_token_grant_refresh_token_lifespan': 'refresh_token_grant_refresh_token_lifespan', # noqa: E501 - 'registration_access_token': 'registration_access_token', # noqa: E501 - 'registration_client_uri': 'registration_client_uri', # noqa: E501 - 'request_object_signing_alg': 'request_object_signing_alg', # noqa: E501 - 'request_uris': 'request_uris', # noqa: E501 - 'response_types': 'response_types', # noqa: E501 - 'scope': 'scope', # noqa: E501 - 'sector_identifier_uri': 'sector_identifier_uri', # noqa: E501 - 'skip_consent': 'skip_consent', # noqa: E501 - 'skip_logout_consent': 'skip_logout_consent', # noqa: E501 - 'subject_type': 'subject_type', # noqa: E501 - 'token_endpoint_auth_method': 'token_endpoint_auth_method', # noqa: E501 - 'token_endpoint_auth_signing_alg': 'token_endpoint_auth_signing_alg', # noqa: E501 - 'tos_uri': 'tos_uri', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'userinfo_signed_response_alg': 'userinfo_signed_response_alg', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2Client - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token_strategy (str): OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.. [optional] # noqa: E501 - allowed_cors_origins (StringSliceJSONFormat): [optional] # noqa: E501 - audience (StringSliceJSONFormat): [optional] # noqa: E501 - authorization_code_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - backchannel_logout_session_required (bool): OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.. [optional] # noqa: E501 - backchannel_logout_uri (str): OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. [optional] # noqa: E501 - client_credentials_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - client_id (str): OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.. [optional] # noqa: E501 - client_name (str): OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.. [optional] # noqa: E501 - client_secret (str): OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.. [optional] # noqa: E501 - client_secret_expires_at (int): OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.. [optional] # noqa: E501 - client_uri (str): OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.. [optional] # noqa: E501 - contacts (StringSliceJSONFormat): [optional] # noqa: E501 - created_at (datetime): OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.. [optional] # noqa: E501 - frontchannel_logout_session_required (bool): OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.. [optional] # noqa: E501 - frontchannel_logout_uri (str): OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.. [optional] # noqa: E501 - grant_types (StringSliceJSONFormat): [optional] # noqa: E501 - implicit_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - jwks (bool, date, datetime, dict, float, int, list, str, none_type): OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.. [optional] # noqa: E501 - jwks_uri (str): OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.. [optional] # noqa: E501 - jwt_bearer_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - logo_uri (str): OAuth 2.0 Client Logo URI A URL string referencing the client's logo.. [optional] # noqa: E501 - metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - owner (str): OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.. [optional] # noqa: E501 - policy_uri (str): OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.. [optional] # noqa: E501 - post_logout_redirect_uris (StringSliceJSONFormat): [optional] # noqa: E501 - redirect_uris (StringSliceJSONFormat): [optional] # noqa: E501 - refresh_token_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - registration_access_token (str): OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.. [optional] # noqa: E501 - registration_client_uri (str): OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - request_object_signing_alg (str): OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.. [optional] # noqa: E501 - request_uris (StringSliceJSONFormat): [optional] # noqa: E501 - response_types (StringSliceJSONFormat): [optional] # noqa: E501 - scope (str): OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.. [optional] # noqa: E501 - sector_identifier_uri (str): OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.. [optional] # noqa: E501 - skip_consent (bool): SkipConsent skips the consent screen for this client. This field can only be set from the admin API.. [optional] # noqa: E501 - skip_logout_consent (bool): SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.. [optional] # noqa: E501 - subject_type (str): OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.. [optional] # noqa: E501 - token_endpoint_auth_method (str): OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.. [optional] if omitted the server will use the default value of "client_secret_basic" # noqa: E501 - token_endpoint_auth_signing_alg (str): OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.. [optional] # noqa: E501 - tos_uri (str): OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.. [optional] # noqa: E501 - updated_at (datetime): OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.. [optional] # noqa: E501 - userinfo_signed_response_alg (str): OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2Client - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token_strategy (str): OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.. [optional] # noqa: E501 - allowed_cors_origins (StringSliceJSONFormat): [optional] # noqa: E501 - audience (StringSliceJSONFormat): [optional] # noqa: E501 - authorization_code_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - backchannel_logout_session_required (bool): OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.. [optional] # noqa: E501 - backchannel_logout_uri (str): OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. [optional] # noqa: E501 - client_credentials_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - client_id (str): OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.. [optional] # noqa: E501 - client_name (str): OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.. [optional] # noqa: E501 - client_secret (str): OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.. [optional] # noqa: E501 - client_secret_expires_at (int): OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.. [optional] # noqa: E501 - client_uri (str): OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.. [optional] # noqa: E501 - contacts (StringSliceJSONFormat): [optional] # noqa: E501 - created_at (datetime): OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.. [optional] # noqa: E501 - frontchannel_logout_session_required (bool): OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.. [optional] # noqa: E501 - frontchannel_logout_uri (str): OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.. [optional] # noqa: E501 - grant_types (StringSliceJSONFormat): [optional] # noqa: E501 - implicit_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - jwks (bool, date, datetime, dict, float, int, list, str, none_type): OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.. [optional] # noqa: E501 - jwks_uri (str): OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.. [optional] # noqa: E501 - jwt_bearer_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - logo_uri (str): OAuth 2.0 Client Logo URI A URL string referencing the client's logo.. [optional] # noqa: E501 - metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - owner (str): OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.. [optional] # noqa: E501 - policy_uri (str): OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.. [optional] # noqa: E501 - post_logout_redirect_uris (StringSliceJSONFormat): [optional] # noqa: E501 - redirect_uris (StringSliceJSONFormat): [optional] # noqa: E501 - refresh_token_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - registration_access_token (str): OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.. [optional] # noqa: E501 - registration_client_uri (str): OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - request_object_signing_alg (str): OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.. [optional] # noqa: E501 - request_uris (StringSliceJSONFormat): [optional] # noqa: E501 - response_types (StringSliceJSONFormat): [optional] # noqa: E501 - scope (str): OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.. [optional] # noqa: E501 - sector_identifier_uri (str): OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.. [optional] # noqa: E501 - skip_consent (bool): SkipConsent skips the consent screen for this client. This field can only be set from the admin API.. [optional] # noqa: E501 - skip_logout_consent (bool): SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.. [optional] # noqa: E501 - subject_type (str): OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.. [optional] # noqa: E501 - token_endpoint_auth_method (str): OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.. [optional] if omitted the server will use the default value of "client_secret_basic" # noqa: E501 - token_endpoint_auth_signing_alg (str): OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.. [optional] # noqa: E501 - tos_uri (str): OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.. [optional] # noqa: E501 - updated_at (datetime): OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.. [optional] # noqa: E501 - userinfo_signed_response_alg (str): OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py deleted file mode 100644 index 3715cd017ac..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.null_duration import NullDuration - globals()['NullDuration'] = NullDuration - - -class OAuth2ClientTokenLifespans(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'authorization_code_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'authorization_code_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'authorization_code_grant_refresh_token_lifespan': (NullDuration,), # noqa: E501 - 'client_credentials_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'implicit_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'implicit_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'jwt_bearer_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'refresh_token_grant_access_token_lifespan': (NullDuration,), # noqa: E501 - 'refresh_token_grant_id_token_lifespan': (NullDuration,), # noqa: E501 - 'refresh_token_grant_refresh_token_lifespan': (NullDuration,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'authorization_code_grant_access_token_lifespan': 'authorization_code_grant_access_token_lifespan', # noqa: E501 - 'authorization_code_grant_id_token_lifespan': 'authorization_code_grant_id_token_lifespan', # noqa: E501 - 'authorization_code_grant_refresh_token_lifespan': 'authorization_code_grant_refresh_token_lifespan', # noqa: E501 - 'client_credentials_grant_access_token_lifespan': 'client_credentials_grant_access_token_lifespan', # noqa: E501 - 'implicit_grant_access_token_lifespan': 'implicit_grant_access_token_lifespan', # noqa: E501 - 'implicit_grant_id_token_lifespan': 'implicit_grant_id_token_lifespan', # noqa: E501 - 'jwt_bearer_grant_access_token_lifespan': 'jwt_bearer_grant_access_token_lifespan', # noqa: E501 - 'refresh_token_grant_access_token_lifespan': 'refresh_token_grant_access_token_lifespan', # noqa: E501 - 'refresh_token_grant_id_token_lifespan': 'refresh_token_grant_id_token_lifespan', # noqa: E501 - 'refresh_token_grant_refresh_token_lifespan': 'refresh_token_grant_refresh_token_lifespan', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2ClientTokenLifespans - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - authorization_code_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - client_credentials_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - jwt_bearer_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2ClientTokenLifespans - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - authorization_code_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - authorization_code_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - client_credentials_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - implicit_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - jwt_bearer_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_access_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_id_token_lifespan (NullDuration): [optional] # noqa: E501 - refresh_token_grant_refresh_token_lifespan (NullDuration): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py deleted file mode 100644 index f247ad3e36a..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py +++ /dev/null @@ -1,328 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.o_auth2_client import OAuth2Client - from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['OAuth2Client'] = OAuth2Client - globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class OAuth2ConsentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'challenge': (str,), # noqa: E501 - 'acr': (str,), # noqa: E501 - 'amr': (StringSliceJSONFormat,), # noqa: E501 - 'client': (OAuth2Client,), # noqa: E501 - 'context': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'login_challenge': (str,), # noqa: E501 - 'login_session_id': (str,), # noqa: E501 - 'oidc_context': (OAuth2ConsentRequestOpenIDConnectContext,), # noqa: E501 - 'request_url': (str,), # noqa: E501 - 'requested_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 - 'requested_scope': (StringSliceJSONFormat,), # noqa: E501 - 'skip': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'challenge': 'challenge', # noqa: E501 - 'acr': 'acr', # noqa: E501 - 'amr': 'amr', # noqa: E501 - 'client': 'client', # noqa: E501 - 'context': 'context', # noqa: E501 - 'login_challenge': 'login_challenge', # noqa: E501 - 'login_session_id': 'login_session_id', # noqa: E501 - 'oidc_context': 'oidc_context', # noqa: E501 - 'request_url': 'request_url', # noqa: E501 - 'requested_access_token_audience': 'requested_access_token_audience', # noqa: E501 - 'requested_scope': 'requested_scope', # noqa: E501 - 'skip': 'skip', # noqa: E501 - 'subject': 'subject', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, challenge, *args, **kwargs): # noqa: E501 - """OAuth2ConsentRequest - a model defined in OpenAPI - - Args: - challenge (str): ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr (str): ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. [optional] # noqa: E501 - amr (StringSliceJSONFormat): [optional] # noqa: E501 - client (OAuth2Client): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - login_challenge (str): LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.. [optional] # noqa: E501 - login_session_id (str): LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. [optional] # noqa: E501 - oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [optional] # noqa: E501 - request_url (str): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.. [optional] # noqa: E501 - requested_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - requested_scope (StringSliceJSONFormat): [optional] # noqa: E501 - skip (bool): Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.. [optional] # noqa: E501 - subject (str): Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.challenge = challenge - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, challenge, *args, **kwargs): # noqa: E501 - """OAuth2ConsentRequest - a model defined in OpenAPI - - Args: - challenge (str): ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr (str): ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. [optional] # noqa: E501 - amr (StringSliceJSONFormat): [optional] # noqa: E501 - client (OAuth2Client): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - login_challenge (str): LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.. [optional] # noqa: E501 - login_session_id (str): LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. [optional] # noqa: E501 - oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [optional] # noqa: E501 - request_url (str): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.. [optional] # noqa: E501 - requested_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - requested_scope (StringSliceJSONFormat): [optional] # noqa: E501 - skip (bool): Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.. [optional] # noqa: E501 - subject (str): Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.challenge = challenge - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py deleted file mode 100644 index 597c72d159b..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class OAuth2ConsentRequestOpenIDConnectContext(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'acr_values': ([str],), # noqa: E501 - 'display': (str,), # noqa: E501 - 'id_token_hint_claims': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'login_hint': (str,), # noqa: E501 - 'ui_locales': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'acr_values': 'acr_values', # noqa: E501 - 'display': 'display', # noqa: E501 - 'id_token_hint_claims': 'id_token_hint_claims', # noqa: E501 - 'login_hint': 'login_hint', # noqa: E501 - 'ui_locales': 'ui_locales', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2ConsentRequestOpenIDConnectContext - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr_values ([str]): ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.. [optional] # noqa: E501 - display (str): Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.. [optional] # noqa: E501 - id_token_hint_claims ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.. [optional] # noqa: E501 - login_hint (str): LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.. [optional] # noqa: E501 - ui_locales ([str]): UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2ConsentRequestOpenIDConnectContext - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acr_values ([str]): ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.. [optional] # noqa: E501 - display (str): Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.. [optional] # noqa: E501 - id_token_hint_claims ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.. [optional] # noqa: E501 - login_hint (str): LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.. [optional] # noqa: E501 - ui_locales ([str]): UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py deleted file mode 100644 index f3cbbc2df57..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py +++ /dev/null @@ -1,308 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession - from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest - from ory_hydra_client.model.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['AcceptOAuth2ConsentRequestSession'] = AcceptOAuth2ConsentRequestSession - globals()['OAuth2ConsentRequest'] = OAuth2ConsentRequest - globals()['OAuth2ConsentSessionExpiresAt'] = OAuth2ConsentSessionExpiresAt - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class OAuth2ConsentSession(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'consent_request': (OAuth2ConsentRequest,), # noqa: E501 - 'context': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'expires_at': (OAuth2ConsentSessionExpiresAt,), # noqa: E501 - 'grant_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 - 'grant_scope': (StringSliceJSONFormat,), # noqa: E501 - 'handled_at': (datetime,), # noqa: E501 - 'remember': (bool,), # noqa: E501 - 'remember_for': (int,), # noqa: E501 - 'session': (AcceptOAuth2ConsentRequestSession,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'consent_request': 'consent_request', # noqa: E501 - 'context': 'context', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'grant_access_token_audience': 'grant_access_token_audience', # noqa: E501 - 'grant_scope': 'grant_scope', # noqa: E501 - 'handled_at': 'handled_at', # noqa: E501 - 'remember': 'remember', # noqa: E501 - 'remember_for': 'remember_for', # noqa: E501 - 'session': 'session', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2ConsentSession - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - consent_request (OAuth2ConsentRequest): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - expires_at (OAuth2ConsentSessionExpiresAt): [optional] # noqa: E501 - grant_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - grant_scope (StringSliceJSONFormat): [optional] # noqa: E501 - handled_at (datetime): [optional] # noqa: E501 - remember (bool): Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. [optional] # noqa: E501 - remember_for (int): Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. [optional] # noqa: E501 - session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2ConsentSession - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - consent_request (OAuth2ConsentRequest): [optional] # noqa: E501 - context (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - expires_at (OAuth2ConsentSessionExpiresAt): [optional] # noqa: E501 - grant_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - grant_scope (StringSliceJSONFormat): [optional] # noqa: E501 - handled_at (datetime): [optional] # noqa: E501 - remember (bool): Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. [optional] # noqa: E501 - remember_for (int): Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. [optional] # noqa: E501 - session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py deleted file mode 100644 index e071bfb070e..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class OAuth2ConsentSessionExpiresAt(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'access_token': (datetime,), # noqa: E501 - 'authorize_code': (datetime,), # noqa: E501 - 'id_token': (datetime,), # noqa: E501 - 'par_context': (datetime,), # noqa: E501 - 'refresh_token': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_token': 'access_token', # noqa: E501 - 'authorize_code': 'authorize_code', # noqa: E501 - 'id_token': 'id_token', # noqa: E501 - 'par_context': 'par_context', # noqa: E501 - 'refresh_token': 'refresh_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2ConsentSessionExpiresAt - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (datetime): [optional] # noqa: E501 - authorize_code (datetime): [optional] # noqa: E501 - id_token (datetime): [optional] # noqa: E501 - par_context (datetime): [optional] # noqa: E501 - refresh_token (datetime): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2ConsentSessionExpiresAt - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (datetime): [optional] # noqa: E501 - authorize_code (datetime): [optional] # noqa: E501 - id_token (datetime): [optional] # noqa: E501 - par_context (datetime): [optional] # noqa: E501 - refresh_token (datetime): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py deleted file mode 100644 index c4b29c53843..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.o_auth2_consent_session import OAuth2ConsentSession - globals()['OAuth2ConsentSession'] = OAuth2ConsentSession - - -class OAuth2ConsentSessions(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': ([OAuth2ConsentSession],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """OAuth2ConsentSessions - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([OAuth2ConsentSession]): List of OAuth 2.0 Consent Sessions. # noqa: E501 - - Keyword Args: - value ([OAuth2ConsentSession]): List of OAuth 2.0 Consent Sessions. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """OAuth2ConsentSessions - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([OAuth2ConsentSession]): List of OAuth 2.0 Consent Sessions. # noqa: E501 - - Keyword Args: - value ([OAuth2ConsentSession]): List of OAuth 2.0 Consent Sessions. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py deleted file mode 100644 index 8450e8254bb..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py +++ /dev/null @@ -1,320 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.o_auth2_client import OAuth2Client - from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext - from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - globals()['OAuth2Client'] = OAuth2Client - globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext - globals()['StringSliceJSONFormat'] = StringSliceJSONFormat - - -class OAuth2LoginRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'challenge': (str,), # noqa: E501 - 'client': (OAuth2Client,), # noqa: E501 - 'request_url': (str,), # noqa: E501 - 'skip': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'oidc_context': (OAuth2ConsentRequestOpenIDConnectContext,), # noqa: E501 - 'requested_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 - 'requested_scope': (StringSliceJSONFormat,), # noqa: E501 - 'session_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'challenge': 'challenge', # noqa: E501 - 'client': 'client', # noqa: E501 - 'request_url': 'request_url', # noqa: E501 - 'skip': 'skip', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'oidc_context': 'oidc_context', # noqa: E501 - 'requested_access_token_audience': 'requested_access_token_audience', # noqa: E501 - 'requested_scope': 'requested_scope', # noqa: E501 - 'session_id': 'session_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, challenge, client, request_url, skip, subject, *args, **kwargs): # noqa: E501 - """OAuth2LoginRequest - a model defined in OpenAPI - - Args: - challenge (str): ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. - client (OAuth2Client): - request_url (str): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - skip (bool): Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. - subject (str): Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [optional] # noqa: E501 - requested_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - requested_scope (StringSliceJSONFormat): [optional] # noqa: E501 - session_id (str): SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.challenge = challenge - self.client = client - self.request_url = request_url - self.skip = skip - self.subject = subject - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, challenge, client, request_url, skip, subject, *args, **kwargs): # noqa: E501 - """OAuth2LoginRequest - a model defined in OpenAPI - - Args: - challenge (str): ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. - client (OAuth2Client): - request_url (str): RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - skip (bool): Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. - subject (str): Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [optional] # noqa: E501 - requested_access_token_audience (StringSliceJSONFormat): [optional] # noqa: E501 - requested_scope (StringSliceJSONFormat): [optional] # noqa: E501 - session_id (str): SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.challenge = challenge - self.client = client - self.request_url = request_url - self.skip = skip - self.subject = subject - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py deleted file mode 100644 index 77dbcbf959c..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py +++ /dev/null @@ -1,290 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.o_auth2_client import OAuth2Client - globals()['OAuth2Client'] = OAuth2Client - - -class OAuth2LogoutRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'challenge': (str,), # noqa: E501 - 'client': (OAuth2Client,), # noqa: E501 - 'request_url': (str,), # noqa: E501 - 'rp_initiated': (bool,), # noqa: E501 - 'sid': (str,), # noqa: E501 - 'subject': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'challenge': 'challenge', # noqa: E501 - 'client': 'client', # noqa: E501 - 'request_url': 'request_url', # noqa: E501 - 'rp_initiated': 'rp_initiated', # noqa: E501 - 'sid': 'sid', # noqa: E501 - 'subject': 'subject', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2LogoutRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - challenge (str): Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.. [optional] # noqa: E501 - client (OAuth2Client): [optional] # noqa: E501 - request_url (str): RequestURL is the original Logout URL requested.. [optional] # noqa: E501 - rp_initiated (bool): RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.. [optional] # noqa: E501 - sid (str): SessionID is the login session ID that was requested to log out.. [optional] # noqa: E501 - subject (str): Subject is the user for whom the logout was request.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2LogoutRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - challenge (str): Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.. [optional] # noqa: E501 - client (OAuth2Client): [optional] # noqa: E501 - request_url (str): RequestURL is the original Logout URL requested.. [optional] # noqa: E501 - rp_initiated (bool): RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.. [optional] # noqa: E501 - sid (str): SessionID is the login session ID that was requested to log out.. [optional] # noqa: E501 - subject (str): Subject is the user for whom the logout was request.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py deleted file mode 100644 index 7661e0b6671..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class OAuth2RedirectTo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'redirect_to': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'redirect_to': 'redirect_to', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, redirect_to, *args, **kwargs): # noqa: E501 - """OAuth2RedirectTo - a model defined in OpenAPI - - Args: - redirect_to (str): RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.redirect_to = redirect_to - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, redirect_to, *args, **kwargs): # noqa: E501 - """OAuth2RedirectTo - a model defined in OpenAPI - - Args: - redirect_to (str): RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.redirect_to = redirect_to - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py deleted file mode 100644 index 98f0ab05518..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class OAuth2TokenExchange(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'access_token': (str,), # noqa: E501 - 'expires_in': (int,), # noqa: E501 - 'id_token': (str,), # noqa: E501 - 'refresh_token': (str,), # noqa: E501 - 'scope': (str,), # noqa: E501 - 'token_type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_token': 'access_token', # noqa: E501 - 'expires_in': 'expires_in', # noqa: E501 - 'id_token': 'id_token', # noqa: E501 - 'refresh_token': 'refresh_token', # noqa: E501 - 'scope': 'scope', # noqa: E501 - 'token_type': 'token_type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OAuth2TokenExchange - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (str): The access token issued by the authorization server.. [optional] # noqa: E501 - expires_in (int): The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.. [optional] # noqa: E501 - id_token (str): To retrieve a refresh token request the id_token scope.. [optional] # noqa: E501 - refresh_token (str): The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.. [optional] # noqa: E501 - scope (str): The scope of the access token. [optional] # noqa: E501 - token_type (str): The type of the token issued. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OAuth2TokenExchange - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_token (str): The access token issued by the authorization server.. [optional] # noqa: E501 - expires_in (int): The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.. [optional] # noqa: E501 - id_token (str): To retrieve a refresh token request the id_token scope.. [optional] # noqa: E501 - refresh_token (str): The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.. [optional] # noqa: E501 - scope (str): The scope of the access token. [optional] # noqa: E501 - token_type (str): The type of the token issued. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py b/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py deleted file mode 100644 index 6fe3654e9da..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py +++ /dev/null @@ -1,412 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.credential_supported_draft00 import CredentialSupportedDraft00 - globals()['CredentialSupportedDraft00'] = CredentialSupportedDraft00 - - -class OidcConfiguration(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'authorization_endpoint': (str,), # noqa: E501 - 'id_token_signed_response_alg': ([str],), # noqa: E501 - 'id_token_signing_alg_values_supported': ([str],), # noqa: E501 - 'issuer': (str,), # noqa: E501 - 'jwks_uri': (str,), # noqa: E501 - 'response_types_supported': ([str],), # noqa: E501 - 'subject_types_supported': ([str],), # noqa: E501 - 'token_endpoint': (str,), # noqa: E501 - 'userinfo_signed_response_alg': ([str],), # noqa: E501 - 'backchannel_logout_session_supported': (bool,), # noqa: E501 - 'backchannel_logout_supported': (bool,), # noqa: E501 - 'claims_parameter_supported': (bool,), # noqa: E501 - 'claims_supported': ([str],), # noqa: E501 - 'code_challenge_methods_supported': ([str],), # noqa: E501 - 'credentials_endpoint_draft_00': (str,), # noqa: E501 - 'credentials_supported_draft_00': ([CredentialSupportedDraft00],), # noqa: E501 - 'end_session_endpoint': (str,), # noqa: E501 - 'frontchannel_logout_session_supported': (bool,), # noqa: E501 - 'frontchannel_logout_supported': (bool,), # noqa: E501 - 'grant_types_supported': ([str],), # noqa: E501 - 'registration_endpoint': (str,), # noqa: E501 - 'request_object_signing_alg_values_supported': ([str],), # noqa: E501 - 'request_parameter_supported': (bool,), # noqa: E501 - 'request_uri_parameter_supported': (bool,), # noqa: E501 - 'require_request_uri_registration': (bool,), # noqa: E501 - 'response_modes_supported': ([str],), # noqa: E501 - 'revocation_endpoint': (str,), # noqa: E501 - 'scopes_supported': ([str],), # noqa: E501 - 'token_endpoint_auth_methods_supported': ([str],), # noqa: E501 - 'userinfo_endpoint': (str,), # noqa: E501 - 'userinfo_signing_alg_values_supported': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'authorization_endpoint': 'authorization_endpoint', # noqa: E501 - 'id_token_signed_response_alg': 'id_token_signed_response_alg', # noqa: E501 - 'id_token_signing_alg_values_supported': 'id_token_signing_alg_values_supported', # noqa: E501 - 'issuer': 'issuer', # noqa: E501 - 'jwks_uri': 'jwks_uri', # noqa: E501 - 'response_types_supported': 'response_types_supported', # noqa: E501 - 'subject_types_supported': 'subject_types_supported', # noqa: E501 - 'token_endpoint': 'token_endpoint', # noqa: E501 - 'userinfo_signed_response_alg': 'userinfo_signed_response_alg', # noqa: E501 - 'backchannel_logout_session_supported': 'backchannel_logout_session_supported', # noqa: E501 - 'backchannel_logout_supported': 'backchannel_logout_supported', # noqa: E501 - 'claims_parameter_supported': 'claims_parameter_supported', # noqa: E501 - 'claims_supported': 'claims_supported', # noqa: E501 - 'code_challenge_methods_supported': 'code_challenge_methods_supported', # noqa: E501 - 'credentials_endpoint_draft_00': 'credentials_endpoint_draft_00', # noqa: E501 - 'credentials_supported_draft_00': 'credentials_supported_draft_00', # noqa: E501 - 'end_session_endpoint': 'end_session_endpoint', # noqa: E501 - 'frontchannel_logout_session_supported': 'frontchannel_logout_session_supported', # noqa: E501 - 'frontchannel_logout_supported': 'frontchannel_logout_supported', # noqa: E501 - 'grant_types_supported': 'grant_types_supported', # noqa: E501 - 'registration_endpoint': 'registration_endpoint', # noqa: E501 - 'request_object_signing_alg_values_supported': 'request_object_signing_alg_values_supported', # noqa: E501 - 'request_parameter_supported': 'request_parameter_supported', # noqa: E501 - 'request_uri_parameter_supported': 'request_uri_parameter_supported', # noqa: E501 - 'require_request_uri_registration': 'require_request_uri_registration', # noqa: E501 - 'response_modes_supported': 'response_modes_supported', # noqa: E501 - 'revocation_endpoint': 'revocation_endpoint', # noqa: E501 - 'scopes_supported': 'scopes_supported', # noqa: E501 - 'token_endpoint_auth_methods_supported': 'token_endpoint_auth_methods_supported', # noqa: E501 - 'userinfo_endpoint': 'userinfo_endpoint', # noqa: E501 - 'userinfo_signing_alg_values_supported': 'userinfo_signing_alg_values_supported', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, authorization_endpoint, id_token_signed_response_alg, id_token_signing_alg_values_supported, issuer, jwks_uri, response_types_supported, subject_types_supported, token_endpoint, userinfo_signed_response_alg, *args, **kwargs): # noqa: E501 - """OidcConfiguration - a model defined in OpenAPI - - Args: - authorization_endpoint (str): OAuth 2.0 Authorization Endpoint URL - id_token_signed_response_alg ([str]): OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. - id_token_signing_alg_values_supported ([str]): OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. - issuer (str): OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. - jwks_uri (str): OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. - response_types_supported ([str]): OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. - subject_types_supported ([str]): OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - token_endpoint (str): OAuth 2.0 Token Endpoint URL - userinfo_signed_response_alg ([str]): OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - backchannel_logout_session_supported (bool): OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP. [optional] # noqa: E501 - backchannel_logout_supported (bool): OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. [optional] # noqa: E501 - claims_parameter_supported (bool): OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. [optional] # noqa: E501 - claims_supported ([str]): OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.. [optional] # noqa: E501 - code_challenge_methods_supported ([str]): OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. [optional] # noqa: E501 - credentials_endpoint_draft_00 (str): OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.. [optional] # noqa: E501 - credentials_supported_draft_00 ([CredentialSupportedDraft00]): OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.. [optional] # noqa: E501 - end_session_endpoint (str): OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.. [optional] # noqa: E501 - frontchannel_logout_session_supported (bool): OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.. [optional] # noqa: E501 - frontchannel_logout_supported (bool): OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. [optional] # noqa: E501 - grant_types_supported ([str]): OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. [optional] # noqa: E501 - registration_endpoint (str): OpenID Connect Dynamic Client Registration Endpoint URL. [optional] # noqa: E501 - request_object_signing_alg_values_supported ([str]): OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).. [optional] # noqa: E501 - request_parameter_supported (bool): OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. [optional] # noqa: E501 - request_uri_parameter_supported (bool): OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.. [optional] # noqa: E501 - require_request_uri_registration (bool): OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.. [optional] # noqa: E501 - response_modes_supported ([str]): OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. [optional] # noqa: E501 - revocation_endpoint (str): OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.. [optional] # noqa: E501 - scopes_supported ([str]): OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used. [optional] # noqa: E501 - token_endpoint_auth_methods_supported ([str]): OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0. [optional] # noqa: E501 - userinfo_endpoint (str): OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.. [optional] # noqa: E501 - userinfo_signing_alg_values_supported ([str]): OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.authorization_endpoint = authorization_endpoint - self.id_token_signed_response_alg = id_token_signed_response_alg - self.id_token_signing_alg_values_supported = id_token_signing_alg_values_supported - self.issuer = issuer - self.jwks_uri = jwks_uri - self.response_types_supported = response_types_supported - self.subject_types_supported = subject_types_supported - self.token_endpoint = token_endpoint - self.userinfo_signed_response_alg = userinfo_signed_response_alg - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, authorization_endpoint, id_token_signed_response_alg, id_token_signing_alg_values_supported, issuer, jwks_uri, response_types_supported, subject_types_supported, token_endpoint, userinfo_signed_response_alg, *args, **kwargs): # noqa: E501 - """OidcConfiguration - a model defined in OpenAPI - - Args: - authorization_endpoint (str): OAuth 2.0 Authorization Endpoint URL - id_token_signed_response_alg ([str]): OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. - id_token_signing_alg_values_supported ([str]): OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. - issuer (str): OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. - jwks_uri (str): OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. - response_types_supported ([str]): OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. - subject_types_supported ([str]): OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - token_endpoint (str): OAuth 2.0 Token Endpoint URL - userinfo_signed_response_alg ([str]): OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - backchannel_logout_session_supported (bool): OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP. [optional] # noqa: E501 - backchannel_logout_supported (bool): OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. [optional] # noqa: E501 - claims_parameter_supported (bool): OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. [optional] # noqa: E501 - claims_supported ([str]): OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.. [optional] # noqa: E501 - code_challenge_methods_supported ([str]): OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. [optional] # noqa: E501 - credentials_endpoint_draft_00 (str): OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.. [optional] # noqa: E501 - credentials_supported_draft_00 ([CredentialSupportedDraft00]): OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.. [optional] # noqa: E501 - end_session_endpoint (str): OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.. [optional] # noqa: E501 - frontchannel_logout_session_supported (bool): OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.. [optional] # noqa: E501 - frontchannel_logout_supported (bool): OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. [optional] # noqa: E501 - grant_types_supported ([str]): OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. [optional] # noqa: E501 - registration_endpoint (str): OpenID Connect Dynamic Client Registration Endpoint URL. [optional] # noqa: E501 - request_object_signing_alg_values_supported ([str]): OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).. [optional] # noqa: E501 - request_parameter_supported (bool): OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. [optional] # noqa: E501 - request_uri_parameter_supported (bool): OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.. [optional] # noqa: E501 - require_request_uri_registration (bool): OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.. [optional] # noqa: E501 - response_modes_supported ([str]): OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. [optional] # noqa: E501 - revocation_endpoint (str): OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.. [optional] # noqa: E501 - scopes_supported ([str]): OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used. [optional] # noqa: E501 - token_endpoint_auth_methods_supported ([str]): OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0. [optional] # noqa: E501 - userinfo_endpoint (str): OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.. [optional] # noqa: E501 - userinfo_signing_alg_values_supported ([str]): OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.authorization_endpoint = authorization_endpoint - self.id_token_signed_response_alg = id_token_signed_response_alg - self.id_token_signing_alg_values_supported = id_token_signing_alg_values_supported - self.issuer = issuer - self.jwks_uri = jwks_uri - self.response_types_supported = response_types_supported - self.subject_types_supported = subject_types_supported - self.token_endpoint = token_endpoint - self.userinfo_signed_response_alg = userinfo_signed_response_alg - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/oidc_user_info.py b/clients/hydra/python/ory_hydra_client/model/oidc_user_info.py deleted file mode 100644 index 3efe78010c4..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/oidc_user_info.py +++ /dev/null @@ -1,336 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class OidcUserInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'birthdate': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'email_verified': (bool,), # noqa: E501 - 'family_name': (str,), # noqa: E501 - 'gender': (str,), # noqa: E501 - 'given_name': (str,), # noqa: E501 - 'locale': (str,), # noqa: E501 - 'middle_name': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'nickname': (str,), # noqa: E501 - 'phone_number': (str,), # noqa: E501 - 'phone_number_verified': (bool,), # noqa: E501 - 'picture': (str,), # noqa: E501 - 'preferred_username': (str,), # noqa: E501 - 'profile': (str,), # noqa: E501 - 'sub': (str,), # noqa: E501 - 'updated_at': (int,), # noqa: E501 - 'website': (str,), # noqa: E501 - 'zoneinfo': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'birthdate': 'birthdate', # noqa: E501 - 'email': 'email', # noqa: E501 - 'email_verified': 'email_verified', # noqa: E501 - 'family_name': 'family_name', # noqa: E501 - 'gender': 'gender', # noqa: E501 - 'given_name': 'given_name', # noqa: E501 - 'locale': 'locale', # noqa: E501 - 'middle_name': 'middle_name', # noqa: E501 - 'name': 'name', # noqa: E501 - 'nickname': 'nickname', # noqa: E501 - 'phone_number': 'phone_number', # noqa: E501 - 'phone_number_verified': 'phone_number_verified', # noqa: E501 - 'picture': 'picture', # noqa: E501 - 'preferred_username': 'preferred_username', # noqa: E501 - 'profile': 'profile', # noqa: E501 - 'sub': 'sub', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'website': 'website', # noqa: E501 - 'zoneinfo': 'zoneinfo', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OidcUserInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - birthdate (str): End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.. [optional] # noqa: E501 - email (str): End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.. [optional] # noqa: E501 - email_verified (bool): True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.. [optional] # noqa: E501 - family_name (str): Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.. [optional] # noqa: E501 - gender (str): End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.. [optional] # noqa: E501 - given_name (str): Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.. [optional] # noqa: E501 - locale (str): End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.. [optional] # noqa: E501 - middle_name (str): Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.. [optional] # noqa: E501 - name (str): End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.. [optional] # noqa: E501 - nickname (str): Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.. [optional] # noqa: E501 - phone_number (str): End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.. [optional] # noqa: E501 - phone_number_verified (bool): True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.. [optional] # noqa: E501 - picture (str): URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.. [optional] # noqa: E501 - preferred_username (str): Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.. [optional] # noqa: E501 - profile (str): URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.. [optional] # noqa: E501 - sub (str): Subject - Identifier for the End-User at the IssuerURL.. [optional] # noqa: E501 - updated_at (int): Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.. [optional] # noqa: E501 - website (str): URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.. [optional] # noqa: E501 - zoneinfo (str): String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OidcUserInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - birthdate (str): End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.. [optional] # noqa: E501 - email (str): End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.. [optional] # noqa: E501 - email_verified (bool): True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.. [optional] # noqa: E501 - family_name (str): Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.. [optional] # noqa: E501 - gender (str): End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.. [optional] # noqa: E501 - given_name (str): Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.. [optional] # noqa: E501 - locale (str): End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.. [optional] # noqa: E501 - middle_name (str): Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.. [optional] # noqa: E501 - name (str): End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.. [optional] # noqa: E501 - nickname (str): Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.. [optional] # noqa: E501 - phone_number (str): End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.. [optional] # noqa: E501 - phone_number_verified (bool): True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.. [optional] # noqa: E501 - picture (str): URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.. [optional] # noqa: E501 - preferred_username (str): Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.. [optional] # noqa: E501 - profile (str): URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.. [optional] # noqa: E501 - sub (str): Subject - Identifier for the End-User at the IssuerURL.. [optional] # noqa: E501 - updated_at (int): Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.. [optional] # noqa: E501 - website (str): URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.. [optional] # noqa: E501 - zoneinfo (str): String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/pagination.py b/clients/hydra/python/ory_hydra_client/model/pagination.py deleted file mode 100644 index 3546c880822..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/pagination.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class Pagination(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('page_size',): { - 'inclusive_maximum': 1000, - 'inclusive_minimum': 1, - }, - ('page_token',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'page_size': (int,), # noqa: E501 - 'page_token': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'page_size': 'page_size', # noqa: E501 - 'page_token': 'page_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Pagination - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Pagination - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/pagination_headers.py b/clients/hydra/python/ory_hydra_client/model/pagination_headers.py deleted file mode 100644 index 9b1d3da2499..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/pagination_headers.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class PaginationHeaders(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'link': (str,), # noqa: E501 - 'x_total_count': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'link': 'link', # noqa: E501 - 'x_total_count': 'x-total-count', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaginationHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. [optional] # noqa: E501 - x_total_count (str): The total number of clients. in: header. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaginationHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. [optional] # noqa: E501 - x_total_count (str): The total number of clients. in: header. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py b/clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py deleted file mode 100644 index 3d127b75d29..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class RejectOAuth2Request(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'error': (str,), # noqa: E501 - 'error_debug': (str,), # noqa: E501 - 'error_description': (str,), # noqa: E501 - 'error_hint': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'error': 'error', # noqa: E501 - 'error_debug': 'error_debug', # noqa: E501 - 'error_description': 'error_description', # noqa: E501 - 'error_hint': 'error_hint', # noqa: E501 - 'status_code': 'status_code', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RejectOAuth2Request - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.. [optional] # noqa: E501 - error_debug (str): Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.. [optional] # noqa: E501 - error_description (str): Description of the error in a human readable format.. [optional] # noqa: E501 - error_hint (str): Hint to help resolve the error.. [optional] # noqa: E501 - status_code (int): Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RejectOAuth2Request - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.. [optional] # noqa: E501 - error_debug (str): Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.. [optional] # noqa: E501 - error_description (str): Description of the error in a human readable format.. [optional] # noqa: E501 - error_hint (str): Hint to help resolve the error.. [optional] # noqa: E501 - status_code (int): Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/rfc6749_error_json.py b/clients/hydra/python/ory_hydra_client/model/rfc6749_error_json.py deleted file mode 100644 index df5e81b2909..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/rfc6749_error_json.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class RFC6749ErrorJson(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'error': (str,), # noqa: E501 - 'error_debug': (str,), # noqa: E501 - 'error_description': (str,), # noqa: E501 - 'error_hint': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'error': 'error', # noqa: E501 - 'error_debug': 'error_debug', # noqa: E501 - 'error_description': 'error_description', # noqa: E501 - 'error_hint': 'error_hint', # noqa: E501 - 'status_code': 'status_code', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RFC6749ErrorJson - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): [optional] # noqa: E501 - error_debug (str): [optional] # noqa: E501 - error_description (str): [optional] # noqa: E501 - error_hint (str): [optional] # noqa: E501 - status_code (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RFC6749ErrorJson - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): [optional] # noqa: E501 - error_debug (str): [optional] # noqa: E501 - error_description (str): [optional] # noqa: E501 - error_hint (str): [optional] # noqa: E501 - status_code (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py b/clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py deleted file mode 100644 index a849301e9c6..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class StringSliceJSONFormat(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': ([str],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """StringSliceJSONFormat - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): # noqa: E501 - - Keyword Args: - value ([str]): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """StringSliceJSONFormat - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): # noqa: E501 - - Keyword Args: - value ([str]): # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/clients/hydra/python/ory_hydra_client/model/token_pagination.py b/clients/hydra/python/ory_hydra_client/model/token_pagination.py deleted file mode 100644 index e40e6fec005..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/token_pagination.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class TokenPagination(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('page_size',): { - 'inclusive_maximum': 1000, - 'inclusive_minimum': 1, - }, - ('page_token',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'page_size': (int,), # noqa: E501 - 'page_token': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'page_size': 'page_size', # noqa: E501 - 'page_token': 'page_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TokenPagination - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TokenPagination - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py b/clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py deleted file mode 100644 index 5a1eda5cd83..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class TokenPaginationHeaders(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'link': (str,), # noqa: E501 - 'x_total_count': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'link': 'link', # noqa: E501 - 'x_total_count': 'x-total-count', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TokenPaginationHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. [optional] # noqa: E501 - x_total_count (str): The total number of clients. in: header. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TokenPaginationHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. [optional] # noqa: E501 - x_total_count (str): The total number of clients. in: header. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py b/clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py deleted file mode 100644 index 47904cf96c4..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class TokenPaginationRequestParameters(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('page_size',): { - 'inclusive_maximum': 500, - 'inclusive_minimum': 1, - }, - ('page_token',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'page_size': (int,), # noqa: E501 - 'page_token': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'page_size': 'page_size', # noqa: E501 - 'page_token': 'page_token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TokenPaginationRequestParameters - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TokenPaginationRequestParameters - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - page_size (int): Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of 250 # noqa: E501 - page_token (str): Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).. [optional] if omitted the server will use the default value of "1" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py b/clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py deleted file mode 100644 index f04897e29d0..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class TokenPaginationResponseHeaders(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'link': (str,), # noqa: E501 - 'x_total_count': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'link': 'link', # noqa: E501 - 'x_total_count': 'x-total-count', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TokenPaginationResponseHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: ; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\". [optional] # noqa: E501 - x_total_count (int): The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TokenPaginationResponseHeaders - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - link (str): The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: ; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\". [optional] # noqa: E501 - x_total_count (int): The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py deleted file mode 100644 index 1641e3613a5..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py +++ /dev/null @@ -1,302 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.json_web_key import JsonWebKey - globals()['JsonWebKey'] = JsonWebKey - - -class TrustOAuth2JwtGrantIssuer(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'expires_at': (datetime,), # noqa: E501 - 'issuer': (str,), # noqa: E501 - 'jwk': (JsonWebKey,), # noqa: E501 - 'scope': ([str],), # noqa: E501 - 'allow_any_subject': (bool,), # noqa: E501 - 'subject': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'expires_at': 'expires_at', # noqa: E501 - 'issuer': 'issuer', # noqa: E501 - 'jwk': 'jwk', # noqa: E501 - 'scope': 'scope', # noqa: E501 - 'allow_any_subject': 'allow_any_subject', # noqa: E501 - 'subject': 'subject', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, expires_at, issuer, jwk, scope, *args, **kwargs): # noqa: E501 - """TrustOAuth2JwtGrantIssuer - a model defined in OpenAPI - - Args: - expires_at (datetime): The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - issuer (str): The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - jwk (JsonWebKey): - scope ([str]): The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_any_subject (bool): The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. [optional] # noqa: E501 - subject (str): The \"subject\" identifies the principal that is the subject of the JWT.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.expires_at = expires_at - self.issuer = issuer - self.jwk = jwk - self.scope = scope - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, expires_at, issuer, jwk, scope, *args, **kwargs): # noqa: E501 - """TrustOAuth2JwtGrantIssuer - a model defined in OpenAPI - - Args: - expires_at (datetime): The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - issuer (str): The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - jwk (JsonWebKey): - scope ([str]): The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_any_subject (bool): The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. [optional] # noqa: E501 - subject (str): The \"subject\" identifies the principal that is the subject of the JWT.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.expires_at = expires_at - self.issuer = issuer - self.jwk = jwk - self.scope = scope - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py deleted file mode 100644 index b684046f68c..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py +++ /dev/null @@ -1,298 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey - globals()['TrustedOAuth2JwtGrantJsonWebKey'] = TrustedOAuth2JwtGrantJsonWebKey - - -class TrustedOAuth2JwtGrantIssuer(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'allow_any_subject': (bool,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'issuer': (str,), # noqa: E501 - 'public_key': (TrustedOAuth2JwtGrantJsonWebKey,), # noqa: E501 - 'scope': ([str],), # noqa: E501 - 'subject': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'allow_any_subject': 'allow_any_subject', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'id': 'id', # noqa: E501 - 'issuer': 'issuer', # noqa: E501 - 'public_key': 'public_key', # noqa: E501 - 'scope': 'scope', # noqa: E501 - 'subject': 'subject', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TrustedOAuth2JwtGrantIssuer - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_any_subject (bool): The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. [optional] # noqa: E501 - created_at (datetime): The \"created_at\" indicates, when grant was created.. [optional] # noqa: E501 - expires_at (datetime): The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".. [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - issuer (str): The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).. [optional] # noqa: E501 - public_key (TrustedOAuth2JwtGrantJsonWebKey): [optional] # noqa: E501 - scope ([str]): The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]). [optional] # noqa: E501 - subject (str): The \"subject\" identifies the principal that is the subject of the JWT.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TrustedOAuth2JwtGrantIssuer - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - allow_any_subject (bool): The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. [optional] # noqa: E501 - created_at (datetime): The \"created_at\" indicates, when grant was created.. [optional] # noqa: E501 - expires_at (datetime): The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".. [optional] # noqa: E501 - id (str): [optional] # noqa: E501 - issuer (str): The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).. [optional] # noqa: E501 - public_key (TrustedOAuth2JwtGrantJsonWebKey): [optional] # noqa: E501 - scope ([str]): The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]). [optional] # noqa: E501 - subject (str): The \"subject\" identifies the principal that is the subject of the JWT.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py deleted file mode 100644 index 4a439ae1e53..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - -def lazy_import(): - from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer - globals()['TrustedOAuth2JwtGrantIssuer'] = TrustedOAuth2JwtGrantIssuer - - -class TrustedOAuth2JwtGrantIssuers(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': ([TrustedOAuth2JwtGrantIssuer],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """TrustedOAuth2JwtGrantIssuers - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([TrustedOAuth2JwtGrantIssuer]): OAuth2 JWT Bearer Grant Type Issuer Trust Relationships. # noqa: E501 - - Keyword Args: - value ([TrustedOAuth2JwtGrantIssuer]): OAuth2 JWT Bearer Grant Type Issuer Trust Relationships. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """TrustedOAuth2JwtGrantIssuers - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([TrustedOAuth2JwtGrantIssuer]): OAuth2 JWT Bearer Grant Type Issuer Trust Relationships. # noqa: E501 - - Keyword Args: - value ([TrustedOAuth2JwtGrantIssuer]): OAuth2 JWT Bearer Grant Type Issuer Trust Relationships. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py deleted file mode 100644 index 987e5533d8e..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class TrustedOAuth2JwtGrantJsonWebKey(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'kid': (str,), # noqa: E501 - 'set': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'kid': 'kid', # noqa: E501 - 'set': 'set', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TrustedOAuth2JwtGrantJsonWebKey - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - kid (str): The \"key_id\" is key unique identifier (same as kid header in jws/jwt).. [optional] # noqa: E501 - set (str): The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TrustedOAuth2JwtGrantJsonWebKey - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - kid (str): The \"key_id\" is key unique identifier (same as kid header in jws/jwt).. [optional] # noqa: E501 - set (str): The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_priming_response.py b/clients/hydra/python/ory_hydra_client/model/verifiable_credential_priming_response.py deleted file mode 100644 index 3fbcb758282..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_priming_response.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class VerifiableCredentialPrimingResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'c_nonce': (str,), # noqa: E501 - 'c_nonce_expires_in': (int,), # noqa: E501 - 'error': (str,), # noqa: E501 - 'error_debug': (str,), # noqa: E501 - 'error_description': (str,), # noqa: E501 - 'error_hint': (str,), # noqa: E501 - 'format': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'c_nonce': 'c_nonce', # noqa: E501 - 'c_nonce_expires_in': 'c_nonce_expires_in', # noqa: E501 - 'error': 'error', # noqa: E501 - 'error_debug': 'error_debug', # noqa: E501 - 'error_description': 'error_description', # noqa: E501 - 'error_hint': 'error_hint', # noqa: E501 - 'format': 'format', # noqa: E501 - 'status_code': 'status_code', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """VerifiableCredentialPrimingResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - c_nonce (str): [optional] # noqa: E501 - c_nonce_expires_in (int): [optional] # noqa: E501 - error (str): [optional] # noqa: E501 - error_debug (str): [optional] # noqa: E501 - error_description (str): [optional] # noqa: E501 - error_hint (str): [optional] # noqa: E501 - format (str): [optional] # noqa: E501 - status_code (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """VerifiableCredentialPrimingResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - c_nonce (str): [optional] # noqa: E501 - c_nonce_expires_in (int): [optional] # noqa: E501 - error (str): [optional] # noqa: E501 - error_debug (str): [optional] # noqa: E501 - error_description (str): [optional] # noqa: E501 - error_hint (str): [optional] # noqa: E501 - format (str): [optional] # noqa: E501 - status_code (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_proof.py b/clients/hydra/python/ory_hydra_client/model/verifiable_credential_proof.py deleted file mode 100644 index e5200e21660..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_proof.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class VerifiableCredentialProof(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'jwt': (str,), # noqa: E501 - 'proof_type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'jwt': 'jwt', # noqa: E501 - 'proof_type': 'proof_type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """VerifiableCredentialProof - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - jwt (str): [optional] # noqa: E501 - proof_type (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """VerifiableCredentialProof - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - jwt (str): [optional] # noqa: E501 - proof_type (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_response.py b/clients/hydra/python/ory_hydra_client/model/verifiable_credential_response.py deleted file mode 100644 index f6126ef4b90..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/verifiable_credential_response.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class VerifiableCredentialResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'credential_draft_00': (str,), # noqa: E501 - 'format': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'credential_draft_00': 'credential_draft_00', # noqa: E501 - 'format': 'format', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """VerifiableCredentialResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - credential_draft_00 (str): [optional] # noqa: E501 - format (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """VerifiableCredentialResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - credential_draft_00 (str): [optional] # noqa: E501 - format (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model/version.py b/clients/hydra/python/ory_hydra_client/model/version.py deleted file mode 100644 index b824392f989..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/version.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from ory_hydra_client.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from ory_hydra_client.exceptions import ApiAttributeError - - - -class Version(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'version': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'version': 'version', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Version - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (str): Version is the service's version.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Version - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (str): Version is the service's version.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/clients/hydra/python/ory_hydra_client/model_utils.py b/clients/hydra/python/ory_hydra_client/model_utils.py deleted file mode 100644 index 82f2f09ba97..00000000000 --- a/clients/hydra/python/ory_hydra_client/model_utils.py +++ /dev/null @@ -1,2059 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile -import uuid - -from dateutil.parser import parse - -from ory_hydra_client.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (int, float), - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) - if filename is not None: - filename = filename.group(1) - else: - filename = "default_" + str(uuid.uuid4()) - - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): - return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + list( - filter( - lambda x: prop_name in x.openapi_types, composed_instances)) - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/clients/hydra/python/ory_hydra_client/models/__init__.py b/clients/hydra/python/ory_hydra_client/models/__init__.py index 7f3e453dabe..b6735aa8178 100644 --- a/clients/hydra/python/ory_hydra_client/models/__init__.py +++ b/clients/hydra/python/ory_hydra_client/models/__init__.py @@ -1,60 +1,61 @@ +# coding: utf-8 + # flake8: noqa +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from ory_hydra_client.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) -from ory_hydra_client.model.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest -from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession -from ory_hydra_client.model.accept_o_auth2_login_request import AcceptOAuth2LoginRequest -from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet -from ory_hydra_client.model.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody -from ory_hydra_client.model.credential_supported_draft00 import CredentialSupportedDraft00 -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.get_version200_response import GetVersion200Response -from ory_hydra_client.model.health_not_ready_status import HealthNotReadyStatus -from ory_hydra_client.model.health_status import HealthStatus -from ory_hydra_client.model.introspected_o_auth2_token import IntrospectedOAuth2Token -from ory_hydra_client.model.is_ready200_response import IsReady200Response -from ory_hydra_client.model.is_ready503_response import IsReady503Response -from ory_hydra_client.model.json_patch import JsonPatch -from ory_hydra_client.model.json_patch_document import JsonPatchDocument -from ory_hydra_client.model.json_web_key import JsonWebKey -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -from ory_hydra_client.model.null_duration import NullDuration -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans -from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest -from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext -from ory_hydra_client.model.o_auth2_consent_session import OAuth2ConsentSession -from ory_hydra_client.model.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt -from ory_hydra_client.model.o_auth2_consent_sessions import OAuth2ConsentSessions -from ory_hydra_client.model.o_auth2_login_request import OAuth2LoginRequest -from ory_hydra_client.model.o_auth2_logout_request import OAuth2LogoutRequest -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo -from ory_hydra_client.model.o_auth2_token_exchange import OAuth2TokenExchange -from ory_hydra_client.model.oidc_configuration import OidcConfiguration -from ory_hydra_client.model.oidc_user_info import OidcUserInfo -from ory_hydra_client.model.pagination import Pagination -from ory_hydra_client.model.pagination_headers import PaginationHeaders -from ory_hydra_client.model.rfc6749_error_json import RFC6749ErrorJson -from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -from ory_hydra_client.model.token_pagination import TokenPagination -from ory_hydra_client.model.token_pagination_headers import TokenPaginationHeaders -from ory_hydra_client.model.token_pagination_request_parameters import TokenPaginationRequestParameters -from ory_hydra_client.model.token_pagination_response_headers import TokenPaginationResponseHeaders -from ory_hydra_client.model.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuers import TrustedOAuth2JwtGrantIssuers -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey -from ory_hydra_client.model.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse -from ory_hydra_client.model.verifiable_credential_proof import VerifiableCredentialProof -from ory_hydra_client.model.verifiable_credential_response import VerifiableCredentialResponse -from ory_hydra_client.model.version import Version +# import models into model package +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody +from ory_hydra_client.models.credential_supported_draft00 import CredentialSupportedDraft00 +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.models.generic_error import GenericError +from ory_hydra_client.models.get_version200_response import GetVersion200Response +from ory_hydra_client.models.health_not_ready_status import HealthNotReadyStatus +from ory_hydra_client.models.health_status import HealthStatus +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token +from ory_hydra_client.models.is_ready200_response import IsReady200Response +from ory_hydra_client.models.is_ready503_response import IsReady503Response +from ory_hydra_client.models.json_patch import JsonPatch +from ory_hydra_client.models.json_web_key import JsonWebKey +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession +from ory_hydra_client.models.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange +from ory_hydra_client.models.oidc_configuration import OidcConfiguration +from ory_hydra_client.models.oidc_user_info import OidcUserInfo +from ory_hydra_client.models.pagination import Pagination +from ory_hydra_client.models.pagination_headers import PaginationHeaders +from ory_hydra_client.models.rfc6749_error_json import RFC6749ErrorJson +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request +from ory_hydra_client.models.token_pagination import TokenPagination +from ory_hydra_client.models.token_pagination_headers import TokenPaginationHeaders +from ory_hydra_client.models.token_pagination_request_parameters import TokenPaginationRequestParameters +from ory_hydra_client.models.token_pagination_response_headers import TokenPaginationResponseHeaders +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey +from ory_hydra_client.models.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse +from ory_hydra_client.models.verifiable_credential_proof import VerifiableCredentialProof +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse +from ory_hydra_client.models.version import Version diff --git a/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request.py b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request.py new file mode 100644 index 00000000000..4f773489f2f --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession +from typing import Optional, Set +from typing_extensions import Self + +class AcceptOAuth2ConsentRequest(BaseModel): + """ + AcceptOAuth2ConsentRequest + """ # noqa: E501 + context: Optional[Any] = None + grant_access_token_audience: Optional[List[StrictStr]] = None + grant_scope: Optional[List[StrictStr]] = None + handled_at: Optional[datetime] = None + remember: Optional[StrictBool] = Field(default=None, description="Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.") + remember_for: Optional[StrictInt] = Field(default=None, description="RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.") + session: Optional[AcceptOAuth2ConsentRequestSession] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["context", "grant_access_token_audience", "grant_scope", "handled_at", "remember", "remember_for", "session"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptOAuth2ConsentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if context (nullable) is None + # and model_fields_set contains the field + if self.context is None and "context" in self.model_fields_set: + _dict['context'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptOAuth2ConsentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "context": obj.get("context"), + "grant_access_token_audience": obj.get("grant_access_token_audience"), + "grant_scope": obj.get("grant_scope"), + "handled_at": obj.get("handled_at"), + "remember": obj.get("remember"), + "remember_for": obj.get("remember_for"), + "session": AcceptOAuth2ConsentRequestSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request_session.py b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request_session.py new file mode 100644 index 00000000000..9092ef2e67a --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_consent_request_session.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AcceptOAuth2ConsentRequestSession(BaseModel): + """ + AcceptOAuth2ConsentRequestSession + """ # noqa: E501 + access_token: Optional[Any] = Field(default=None, description="AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!") + id_token: Optional[Any] = Field(default=None, description="IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care!") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_token", "id_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptOAuth2ConsentRequestSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if access_token (nullable) is None + # and model_fields_set contains the field + if self.access_token is None and "access_token" in self.model_fields_set: + _dict['access_token'] = None + + # set to None if id_token (nullable) is None + # and model_fields_set contains the field + if self.id_token is None and "id_token" in self.model_fields_set: + _dict['id_token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptOAuth2ConsentRequestSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "id_token": obj.get("id_token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_login_request.py b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_login_request.py new file mode 100644 index 00000000000..0ac2ddccd6e --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/accept_o_auth2_login_request.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AcceptOAuth2LoginRequest(BaseModel): + """ + AcceptOAuth2LoginRequest + """ # noqa: E501 + acr: Optional[StrictStr] = Field(default=None, description="ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.") + amr: Optional[List[StrictStr]] = None + context: Optional[Any] = None + extend_session_lifespan: Optional[StrictBool] = Field(default=None, description="Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.") + force_subject_identifier: Optional[StrictStr] = Field(default=None, description="ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.") + identity_provider_session_id: Optional[StrictStr] = Field(default=None, description="IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.") + remember: Optional[StrictBool] = Field(default=None, description="Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.") + remember_for: Optional[StrictInt] = Field(default=None, description="RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).") + subject: StrictStr = Field(description="Subject is the user ID of the end-user that authenticated.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["acr", "amr", "context", "extend_session_lifespan", "force_subject_identifier", "identity_provider_session_id", "remember", "remember_for", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptOAuth2LoginRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if context (nullable) is None + # and model_fields_set contains the field + if self.context is None and "context" in self.model_fields_set: + _dict['context'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptOAuth2LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acr": obj.get("acr"), + "amr": obj.get("amr"), + "context": obj.get("context"), + "extend_session_lifespan": obj.get("extend_session_lifespan"), + "force_subject_identifier": obj.get("force_subject_identifier"), + "identity_provider_session_id": obj.get("identity_provider_session_id"), + "remember": obj.get("remember"), + "remember_for": obj.get("remember_for"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/create_json_web_key_set.py b/clients/hydra/python/ory_hydra_client/models/create_json_web_key_set.py new file mode 100644 index 00000000000..62a88638d6f --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/create_json_web_key_set.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateJsonWebKeySet(BaseModel): + """ + Create JSON Web Key Set Request Body + """ # noqa: E501 + alg: StrictStr = Field(description="JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.") + kid: StrictStr = Field(description="JSON Web Key ID The Key ID of the key to be created.") + use: StrictStr = Field(description="JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\".") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["alg", "kid", "use"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateJsonWebKeySet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateJsonWebKeySet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alg": obj.get("alg"), + "kid": obj.get("kid"), + "use": obj.get("use") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/create_verifiable_credential_request_body.py b/clients/hydra/python/ory_hydra_client/models/create_verifiable_credential_request_body.py new file mode 100644 index 00000000000..fd9896eec68 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/create_verifiable_credential_request_body.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.verifiable_credential_proof import VerifiableCredentialProof +from typing import Optional, Set +from typing_extensions import Self + +class CreateVerifiableCredentialRequestBody(BaseModel): + """ + CreateVerifiableCredentialRequestBody + """ # noqa: E501 + format: Optional[StrictStr] = None + proof: Optional[VerifiableCredentialProof] = None + types: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["format", "proof", "types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateVerifiableCredentialRequestBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of proof + if self.proof: + _dict['proof'] = self.proof.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateVerifiableCredentialRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "format": obj.get("format"), + "proof": VerifiableCredentialProof.from_dict(obj["proof"]) if obj.get("proof") is not None else None, + "types": obj.get("types") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/credential_supported_draft00.py b/clients/hydra/python/ory_hydra_client/models/credential_supported_draft00.py new file mode 100644 index 00000000000..26b3f54e3ea --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/credential_supported_draft00.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CredentialSupportedDraft00(BaseModel): + """ + Includes information about the supported verifiable credentials. + """ # noqa: E501 + cryptographic_binding_methods_supported: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.") + cryptographic_suites_supported: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.") + format: Optional[StrictStr] = Field(default=None, description="OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.") + types: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cryptographic_binding_methods_supported", "cryptographic_suites_supported", "format", "types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CredentialSupportedDraft00 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CredentialSupportedDraft00 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cryptographic_binding_methods_supported": obj.get("cryptographic_binding_methods_supported"), + "cryptographic_suites_supported": obj.get("cryptographic_suites_supported"), + "format": obj.get("format"), + "types": obj.get("types") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/error_o_auth2.py b/clients/hydra/python/ory_hydra_client/models/error_o_auth2.py new file mode 100644 index 00000000000..ba7102de19d --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/error_o_auth2.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ErrorOAuth2(BaseModel): + """ + Error + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="Error") + error_debug: Optional[StrictStr] = Field(default=None, description="Error Debug Information Only available in dev mode.") + error_description: Optional[StrictStr] = Field(default=None, description="Error Description") + error_hint: Optional[StrictStr] = Field(default=None, description="Error Hint Helps the user identify the error cause.") + status_code: Optional[StrictInt] = Field(default=None, description="HTTP Status Code") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "error_debug", "error_description", "error_hint", "status_code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorOAuth2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorOAuth2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_debug": obj.get("error_debug"), + "error_description": obj.get("error_description"), + "error_hint": obj.get("error_hint"), + "status_code": obj.get("status_code") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/generic_error.py b/clients/hydra/python/ory_hydra_client/models/generic_error.py new file mode 100644 index 00000000000..eb5fcc280ae --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/generic_error.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GenericError(BaseModel): + """ + GenericError + """ # noqa: E501 + code: Optional[StrictInt] = Field(default=None, description="The status code") + debug: Optional[StrictStr] = Field(default=None, description="Debug information This field is often not exposed to protect against leaking sensitive information.") + details: Optional[Any] = Field(default=None, description="Further error details") + id: Optional[StrictStr] = Field(default=None, description="The error ID Useful when trying to identify various errors in application logic.") + message: StrictStr = Field(description="Error message The error's message.") + reason: Optional[StrictStr] = Field(default=None, description="A human-readable reason for the error") + request: Optional[StrictStr] = Field(default=None, description="The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.") + status: Optional[StrictStr] = Field(default=None, description="The status description") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "debug", "details", "id", "message", "reason", "request", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GenericError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if details (nullable) is None + # and model_fields_set contains the field + if self.details is None and "details" in self.model_fields_set: + _dict['details'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenericError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "debug": obj.get("debug"), + "details": obj.get("details"), + "id": obj.get("id"), + "message": obj.get("message"), + "reason": obj.get("reason"), + "request": obj.get("request"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/get_version200_response.py b/clients/hydra/python/ory_hydra_client/models/get_version200_response.py new file mode 100644 index 00000000000..610ee4ea552 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/get_version200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GetVersion200Response(BaseModel): + """ + GetVersion200Response + """ # noqa: E501 + version: Optional[StrictStr] = Field(default=None, description="The version of Ory Hydra.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetVersion200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetVersion200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/health_not_ready_status.py b/clients/hydra/python/ory_hydra_client/models/health_not_ready_status.py new file mode 100644 index 00000000000..03b123c3290 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/health_not_ready_status.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class HealthNotReadyStatus(BaseModel): + """ + HealthNotReadyStatus + """ # noqa: E501 + errors: Optional[Dict[str, StrictStr]] = Field(default=None, description="Errors contains a list of errors that caused the not ready status.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthNotReadyStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthNotReadyStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "errors": obj.get("errors") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/health_status.py b/clients/hydra/python/ory_hydra_client/models/health_status.py new file mode 100644 index 00000000000..4a574b99600 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/health_status.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class HealthStatus(BaseModel): + """ + HealthStatus + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="Status always contains \"ok\".") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/introspected_o_auth2_token.py b/clients/hydra/python/ory_hydra_client/models/introspected_o_auth2_token.py new file mode 100644 index 00000000000..d5c894a5a8b --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/introspected_o_auth2_token.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IntrospectedOAuth2Token(BaseModel): + """ + Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + """ # noqa: E501 + active: StrictBool = Field(description="Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).") + aud: Optional[List[StrictStr]] = Field(default=None, description="Audience contains a list of the token's intended audiences.") + client_id: Optional[StrictStr] = Field(default=None, description="ID is aclient identifier for the OAuth 2.0 client that requested this token.") + exp: Optional[StrictInt] = Field(default=None, description="Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.") + ext: Optional[Dict[str, Any]] = Field(default=None, description="Extra is arbitrary data set by the session.") + iat: Optional[StrictInt] = Field(default=None, description="Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.") + iss: Optional[StrictStr] = Field(default=None, description="IssuerURL is a string representing the issuer of this token") + nbf: Optional[StrictInt] = Field(default=None, description="NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.") + obfuscated_subject: Optional[StrictStr] = Field(default=None, description="ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.") + scope: Optional[StrictStr] = Field(default=None, description="Scope is a JSON string containing a space-separated list of scopes associated with this token.") + sub: Optional[StrictStr] = Field(default=None, description="Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.") + token_type: Optional[StrictStr] = Field(default=None, description="TokenType is the introspected token's type, typically `Bearer`.") + token_use: Optional[StrictStr] = Field(default=None, description="TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.") + username: Optional[StrictStr] = Field(default=None, description="Username is a human-readable identifier for the resource owner who authorized this token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["active", "aud", "client_id", "exp", "ext", "iat", "iss", "nbf", "obfuscated_subject", "scope", "sub", "token_type", "token_use", "username"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntrospectedOAuth2Token from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntrospectedOAuth2Token from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "aud": obj.get("aud"), + "client_id": obj.get("client_id"), + "exp": obj.get("exp"), + "ext": obj.get("ext"), + "iat": obj.get("iat"), + "iss": obj.get("iss"), + "nbf": obj.get("nbf"), + "obfuscated_subject": obj.get("obfuscated_subject"), + "scope": obj.get("scope"), + "sub": obj.get("sub"), + "token_type": obj.get("token_type"), + "token_use": obj.get("token_use"), + "username": obj.get("username") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/is_ready200_response.py b/clients/hydra/python/ory_hydra_client/models/is_ready200_response.py new file mode 100644 index 00000000000..c98a267cc5c --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/is_ready200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IsReady200Response(BaseModel): + """ + IsReady200Response + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="Always \"ok\".") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsReady200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsReady200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/is_ready503_response.py b/clients/hydra/python/ory_hydra_client/models/is_ready503_response.py new file mode 100644 index 00000000000..29e999e1452 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/is_ready503_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IsReady503Response(BaseModel): + """ + IsReady503Response + """ # noqa: E501 + errors: Optional[Dict[str, StrictStr]] = Field(default=None, description="Errors contains a list of errors that caused the not ready status.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsReady503Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsReady503Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "errors": obj.get("errors") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/json_patch.py b/clients/hydra/python/ory_hydra_client/models/json_patch.py new file mode 100644 index 00000000000..73de2286889 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/json_patch.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class JsonPatch(BaseModel): + """ + A JSONPatch document as defined by RFC 6902 + """ # noqa: E501 + var_from: Optional[StrictStr] = Field(default=None, description="This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", alias="from") + op: StrictStr = Field(description="The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".") + path: StrictStr = Field(description="The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).") + value: Optional[Any] = Field(default=None, description="The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["from", "op", "path", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JsonPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "op": obj.get("op"), + "path": obj.get("path"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/json_web_key.py b/clients/hydra/python/ory_hydra_client/models/json_web_key.py new file mode 100644 index 00000000000..527de055d48 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/json_web_key.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class JsonWebKey(BaseModel): + """ + JsonWebKey + """ # noqa: E501 + alg: StrictStr = Field(description="The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.") + crv: Optional[StrictStr] = None + d: Optional[StrictStr] = None + dp: Optional[StrictStr] = None + dq: Optional[StrictStr] = None + e: Optional[StrictStr] = None + k: Optional[StrictStr] = None + kid: StrictStr = Field(description="The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.") + kty: StrictStr = Field(description="The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.") + n: Optional[StrictStr] = None + p: Optional[StrictStr] = None + q: Optional[StrictStr] = None + qi: Optional[StrictStr] = None + use: StrictStr = Field(description="Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).") + x: Optional[StrictStr] = None + x5c: Optional[List[StrictStr]] = Field(default=None, description="The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.") + y: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["alg", "crv", "d", "dp", "dq", "e", "k", "kid", "kty", "n", "p", "q", "qi", "use", "x", "x5c", "y"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JsonWebKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonWebKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alg": obj.get("alg"), + "crv": obj.get("crv"), + "d": obj.get("d"), + "dp": obj.get("dp"), + "dq": obj.get("dq"), + "e": obj.get("e"), + "k": obj.get("k"), + "kid": obj.get("kid"), + "kty": obj.get("kty"), + "n": obj.get("n"), + "p": obj.get("p"), + "q": obj.get("q"), + "qi": obj.get("qi"), + "use": obj.get("use"), + "x": obj.get("x"), + "x5c": obj.get("x5c"), + "y": obj.get("y") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/json_web_key_set.py b/clients/hydra/python/ory_hydra_client/models/json_web_key_set.py new file mode 100644 index 00000000000..cc712a7255a --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/json_web_key_set.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.json_web_key import JsonWebKey +from typing import Optional, Set +from typing_extensions import Self + +class JsonWebKeySet(BaseModel): + """ + JSON Web Key Set + """ # noqa: E501 + keys: Optional[List[JsonWebKey]] = Field(default=None, description="List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JsonWebKeySet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item in self.keys: + if _item: + _items.append(_item.to_dict()) + _dict['keys'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JsonWebKeySet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keys": [JsonWebKey.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_client.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_client.py new file mode 100644 index 00000000000..9088fb64939 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_client.py @@ -0,0 +1,307 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2Client(BaseModel): + """ + OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + """ # noqa: E501 + access_token_strategy: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.") + allowed_cors_origins: Optional[List[StrictStr]] = None + audience: Optional[List[StrictStr]] = None + authorization_code_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + authorization_code_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + authorization_code_grant_refresh_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + backchannel_logout_session_required: Optional[StrictBool] = Field(default=None, description="OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.") + backchannel_logout_uri: Optional[StrictStr] = Field(default=None, description="OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.") + client_credentials_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.") + client_name: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.") + client_secret: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.") + client_secret_expires_at: Optional[StrictInt] = Field(default=None, description="OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.") + client_uri: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.") + contacts: Optional[List[StrictStr]] = None + created_at: Optional[datetime] = Field(default=None, description="OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.") + frontchannel_logout_session_required: Optional[StrictBool] = Field(default=None, description="OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.") + frontchannel_logout_uri: Optional[StrictStr] = Field(default=None, description="OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.") + grant_types: Optional[List[StrictStr]] = None + implicit_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + implicit_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + jwks: Optional[Any] = Field(default=None, description="OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.") + jwks_uri: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.") + jwt_bearer_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + logo_uri: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Logo URI A URL string referencing the client's logo.") + metadata: Optional[Any] = None + owner: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.") + policy_uri: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.") + post_logout_redirect_uris: Optional[List[StrictStr]] = None + redirect_uris: Optional[List[StrictStr]] = None + refresh_token_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + refresh_token_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + refresh_token_grant_refresh_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + registration_access_token: Optional[StrictStr] = Field(default=None, description="OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.") + registration_client_uri: Optional[StrictStr] = Field(default=None, description="OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.") + request_object_signing_alg: Optional[StrictStr] = Field(default=None, description="OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.") + request_uris: Optional[List[StrictStr]] = None + response_types: Optional[List[StrictStr]] = None + scope: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.") + sector_identifier_uri: Optional[StrictStr] = Field(default=None, description="OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.") + skip_consent: Optional[StrictBool] = Field(default=None, description="SkipConsent skips the consent screen for this client. This field can only be set from the admin API.") + skip_logout_consent: Optional[StrictBool] = Field(default=None, description="SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.") + subject_type: Optional[StrictStr] = Field(default=None, description="OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.") + token_endpoint_auth_method: Optional[StrictStr] = Field(default='client_secret_basic', description="OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.") + token_endpoint_auth_signing_alg: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.") + tos_uri: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.") + updated_at: Optional[datetime] = Field(default=None, description="OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.") + userinfo_signed_response_alg: Optional[StrictStr] = Field(default=None, description="OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_token_strategy", "allowed_cors_origins", "audience", "authorization_code_grant_access_token_lifespan", "authorization_code_grant_id_token_lifespan", "authorization_code_grant_refresh_token_lifespan", "backchannel_logout_session_required", "backchannel_logout_uri", "client_credentials_grant_access_token_lifespan", "client_id", "client_name", "client_secret", "client_secret_expires_at", "client_uri", "contacts", "created_at", "frontchannel_logout_session_required", "frontchannel_logout_uri", "grant_types", "implicit_grant_access_token_lifespan", "implicit_grant_id_token_lifespan", "jwks", "jwks_uri", "jwt_bearer_grant_access_token_lifespan", "logo_uri", "metadata", "owner", "policy_uri", "post_logout_redirect_uris", "redirect_uris", "refresh_token_grant_access_token_lifespan", "refresh_token_grant_id_token_lifespan", "refresh_token_grant_refresh_token_lifespan", "registration_access_token", "registration_client_uri", "request_object_signing_alg", "request_uris", "response_types", "scope", "sector_identifier_uri", "skip_consent", "skip_logout_consent", "subject_type", "token_endpoint_auth_method", "token_endpoint_auth_signing_alg", "tos_uri", "updated_at", "userinfo_signed_response_alg"] + + @field_validator('authorization_code_grant_access_token_lifespan') + def authorization_code_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('authorization_code_grant_id_token_lifespan') + def authorization_code_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('authorization_code_grant_refresh_token_lifespan') + def authorization_code_grant_refresh_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('client_credentials_grant_access_token_lifespan') + def client_credentials_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('implicit_grant_access_token_lifespan') + def implicit_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('implicit_grant_id_token_lifespan') + def implicit_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('jwt_bearer_grant_access_token_lifespan') + def jwt_bearer_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_access_token_lifespan') + def refresh_token_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_id_token_lifespan') + def refresh_token_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_refresh_token_lifespan') + def refresh_token_grant_refresh_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2Client from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if jwks (nullable) is None + # and model_fields_set contains the field + if self.jwks is None and "jwks" in self.model_fields_set: + _dict['jwks'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2Client from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_token_strategy": obj.get("access_token_strategy"), + "allowed_cors_origins": obj.get("allowed_cors_origins"), + "audience": obj.get("audience"), + "authorization_code_grant_access_token_lifespan": obj.get("authorization_code_grant_access_token_lifespan"), + "authorization_code_grant_id_token_lifespan": obj.get("authorization_code_grant_id_token_lifespan"), + "authorization_code_grant_refresh_token_lifespan": obj.get("authorization_code_grant_refresh_token_lifespan"), + "backchannel_logout_session_required": obj.get("backchannel_logout_session_required"), + "backchannel_logout_uri": obj.get("backchannel_logout_uri"), + "client_credentials_grant_access_token_lifespan": obj.get("client_credentials_grant_access_token_lifespan"), + "client_id": obj.get("client_id"), + "client_name": obj.get("client_name"), + "client_secret": obj.get("client_secret"), + "client_secret_expires_at": obj.get("client_secret_expires_at"), + "client_uri": obj.get("client_uri"), + "contacts": obj.get("contacts"), + "created_at": obj.get("created_at"), + "frontchannel_logout_session_required": obj.get("frontchannel_logout_session_required"), + "frontchannel_logout_uri": obj.get("frontchannel_logout_uri"), + "grant_types": obj.get("grant_types"), + "implicit_grant_access_token_lifespan": obj.get("implicit_grant_access_token_lifespan"), + "implicit_grant_id_token_lifespan": obj.get("implicit_grant_id_token_lifespan"), + "jwks": obj.get("jwks"), + "jwks_uri": obj.get("jwks_uri"), + "jwt_bearer_grant_access_token_lifespan": obj.get("jwt_bearer_grant_access_token_lifespan"), + "logo_uri": obj.get("logo_uri"), + "metadata": obj.get("metadata"), + "owner": obj.get("owner"), + "policy_uri": obj.get("policy_uri"), + "post_logout_redirect_uris": obj.get("post_logout_redirect_uris"), + "redirect_uris": obj.get("redirect_uris"), + "refresh_token_grant_access_token_lifespan": obj.get("refresh_token_grant_access_token_lifespan"), + "refresh_token_grant_id_token_lifespan": obj.get("refresh_token_grant_id_token_lifespan"), + "refresh_token_grant_refresh_token_lifespan": obj.get("refresh_token_grant_refresh_token_lifespan"), + "registration_access_token": obj.get("registration_access_token"), + "registration_client_uri": obj.get("registration_client_uri"), + "request_object_signing_alg": obj.get("request_object_signing_alg"), + "request_uris": obj.get("request_uris"), + "response_types": obj.get("response_types"), + "scope": obj.get("scope"), + "sector_identifier_uri": obj.get("sector_identifier_uri"), + "skip_consent": obj.get("skip_consent"), + "skip_logout_consent": obj.get("skip_logout_consent"), + "subject_type": obj.get("subject_type"), + "token_endpoint_auth_method": obj.get("token_endpoint_auth_method") if obj.get("token_endpoint_auth_method") is not None else 'client_secret_basic', + "token_endpoint_auth_signing_alg": obj.get("token_endpoint_auth_signing_alg"), + "tos_uri": obj.get("tos_uri"), + "updated_at": obj.get("updated_at"), + "userinfo_signed_response_alg": obj.get("userinfo_signed_response_alg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_client_token_lifespans.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_client_token_lifespans.py new file mode 100644 index 00000000000..b6a364156bf --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_client_token_lifespans.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ClientTokenLifespans(BaseModel): + """ + Lifespans of different token types issued for this OAuth 2.0 Client. + """ # noqa: E501 + authorization_code_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + authorization_code_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + authorization_code_grant_refresh_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + client_credentials_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + implicit_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + implicit_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + jwt_bearer_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + refresh_token_grant_access_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + refresh_token_grant_id_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + refresh_token_grant_refresh_token_lifespan: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Specify a time duration in milliseconds, seconds, minutes, hours.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["authorization_code_grant_access_token_lifespan", "authorization_code_grant_id_token_lifespan", "authorization_code_grant_refresh_token_lifespan", "client_credentials_grant_access_token_lifespan", "implicit_grant_access_token_lifespan", "implicit_grant_id_token_lifespan", "jwt_bearer_grant_access_token_lifespan", "refresh_token_grant_access_token_lifespan", "refresh_token_grant_id_token_lifespan", "refresh_token_grant_refresh_token_lifespan"] + + @field_validator('authorization_code_grant_access_token_lifespan') + def authorization_code_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('authorization_code_grant_id_token_lifespan') + def authorization_code_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('authorization_code_grant_refresh_token_lifespan') + def authorization_code_grant_refresh_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('client_credentials_grant_access_token_lifespan') + def client_credentials_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('implicit_grant_access_token_lifespan') + def implicit_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('implicit_grant_id_token_lifespan') + def implicit_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('jwt_bearer_grant_access_token_lifespan') + def jwt_bearer_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_access_token_lifespan') + def refresh_token_grant_access_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_id_token_lifespan') + def refresh_token_grant_id_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + @field_validator('refresh_token_grant_refresh_token_lifespan') + def refresh_token_grant_refresh_token_lifespan_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^([0-9]+(ns|us|ms|s|m|h))*$", value): + raise ValueError(r"must validate the regular expression /^([0-9]+(ns|us|ms|s|m|h))*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ClientTokenLifespans from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ClientTokenLifespans from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authorization_code_grant_access_token_lifespan": obj.get("authorization_code_grant_access_token_lifespan"), + "authorization_code_grant_id_token_lifespan": obj.get("authorization_code_grant_id_token_lifespan"), + "authorization_code_grant_refresh_token_lifespan": obj.get("authorization_code_grant_refresh_token_lifespan"), + "client_credentials_grant_access_token_lifespan": obj.get("client_credentials_grant_access_token_lifespan"), + "implicit_grant_access_token_lifespan": obj.get("implicit_grant_access_token_lifespan"), + "implicit_grant_id_token_lifespan": obj.get("implicit_grant_id_token_lifespan"), + "jwt_bearer_grant_access_token_lifespan": obj.get("jwt_bearer_grant_access_token_lifespan"), + "refresh_token_grant_access_token_lifespan": obj.get("refresh_token_grant_access_token_lifespan"), + "refresh_token_grant_id_token_lifespan": obj.get("refresh_token_grant_id_token_lifespan"), + "refresh_token_grant_refresh_token_lifespan": obj.get("refresh_token_grant_refresh_token_lifespan") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request.py new file mode 100644 index 00000000000..3ab570d936e --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ConsentRequest(BaseModel): + """ + OAuth2ConsentRequest + """ # noqa: E501 + acr: Optional[StrictStr] = Field(default=None, description="ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.") + amr: Optional[List[StrictStr]] = None + challenge: StrictStr = Field(description="ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session.") + client: Optional[OAuth2Client] = None + context: Optional[Any] = None + login_challenge: Optional[StrictStr] = Field(default=None, description="LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.") + login_session_id: Optional[StrictStr] = Field(default=None, description="LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.") + oidc_context: Optional[OAuth2ConsentRequestOpenIDConnectContext] = None + request_url: Optional[StrictStr] = Field(default=None, description="RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.") + requested_access_token_audience: Optional[List[StrictStr]] = None + requested_scope: Optional[List[StrictStr]] = None + skip: Optional[StrictBool] = Field(default=None, description="Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.") + subject: Optional[StrictStr] = Field(default=None, description="Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["acr", "amr", "challenge", "client", "context", "login_challenge", "login_session_id", "oidc_context", "request_url", "requested_access_token_audience", "requested_scope", "skip", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ConsentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of client + if self.client: + _dict['client'] = self.client.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_context + if self.oidc_context: + _dict['oidc_context'] = self.oidc_context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if context (nullable) is None + # and model_fields_set contains the field + if self.context is None and "context" in self.model_fields_set: + _dict['context'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ConsentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acr": obj.get("acr"), + "amr": obj.get("amr"), + "challenge": obj.get("challenge"), + "client": OAuth2Client.from_dict(obj["client"]) if obj.get("client") is not None else None, + "context": obj.get("context"), + "login_challenge": obj.get("login_challenge"), + "login_session_id": obj.get("login_session_id"), + "oidc_context": OAuth2ConsentRequestOpenIDConnectContext.from_dict(obj["oidc_context"]) if obj.get("oidc_context") is not None else None, + "request_url": obj.get("request_url"), + "requested_access_token_audience": obj.get("requested_access_token_audience"), + "requested_scope": obj.get("requested_scope"), + "skip": obj.get("skip"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request_open_id_connect_context.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request_open_id_connect_context.py new file mode 100644 index 00000000000..8ac6ea86734 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_request_open_id_connect_context.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ConsentRequestOpenIDConnectContext(BaseModel): + """ + OAuth2ConsentRequestOpenIDConnectContext + """ # noqa: E501 + acr_values: Optional[List[StrictStr]] = Field(default=None, description="ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.") + display: Optional[StrictStr] = Field(default=None, description="Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.") + id_token_hint_claims: Optional[Dict[str, Any]] = Field(default=None, description="IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.") + login_hint: Optional[StrictStr] = Field(default=None, description="LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.") + ui_locales: Optional[List[StrictStr]] = Field(default=None, description="UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["acr_values", "display", "id_token_hint_claims", "login_hint", "ui_locales"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ConsentRequestOpenIDConnectContext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ConsentRequestOpenIDConnectContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acr_values": obj.get("acr_values"), + "display": obj.get("display"), + "id_token_hint_claims": obj.get("id_token_hint_claims"), + "login_hint": obj.get("login_hint"), + "ui_locales": obj.get("ui_locales") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session.py new file mode 100644 index 00000000000..5d5a5c9d2c2 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest +from ory_hydra_client.models.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ConsentSession(BaseModel): + """ + A completed OAuth 2.0 Consent Session. + """ # noqa: E501 + consent_request: Optional[OAuth2ConsentRequest] = None + context: Optional[Any] = None + expires_at: Optional[OAuth2ConsentSessionExpiresAt] = None + grant_access_token_audience: Optional[List[StrictStr]] = None + grant_scope: Optional[List[StrictStr]] = None + handled_at: Optional[datetime] = None + remember: Optional[StrictBool] = Field(default=None, description="Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.") + remember_for: Optional[StrictInt] = Field(default=None, description="Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.") + session: Optional[AcceptOAuth2ConsentRequestSession] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["consent_request", "context", "expires_at", "grant_access_token_audience", "grant_scope", "handled_at", "remember", "remember_for", "session"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ConsentSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of consent_request + if self.consent_request: + _dict['consent_request'] = self.consent_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of expires_at + if self.expires_at: + _dict['expires_at'] = self.expires_at.to_dict() + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if context (nullable) is None + # and model_fields_set contains the field + if self.context is None and "context" in self.model_fields_set: + _dict['context'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ConsentSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "consent_request": OAuth2ConsentRequest.from_dict(obj["consent_request"]) if obj.get("consent_request") is not None else None, + "context": obj.get("context"), + "expires_at": OAuth2ConsentSessionExpiresAt.from_dict(obj["expires_at"]) if obj.get("expires_at") is not None else None, + "grant_access_token_audience": obj.get("grant_access_token_audience"), + "grant_scope": obj.get("grant_scope"), + "handled_at": obj.get("handled_at"), + "remember": obj.get("remember"), + "remember_for": obj.get("remember_for"), + "session": AcceptOAuth2ConsentRequestSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session_expires_at.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session_expires_at.py new file mode 100644 index 00000000000..9a3a899f9c3 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_consent_session_expires_at.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ConsentSessionExpiresAt(BaseModel): + """ + OAuth2ConsentSessionExpiresAt + """ # noqa: E501 + access_token: Optional[datetime] = None + authorize_code: Optional[datetime] = None + id_token: Optional[datetime] = None + par_context: Optional[datetime] = None + refresh_token: Optional[datetime] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_token", "authorize_code", "id_token", "par_context", "refresh_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ConsentSessionExpiresAt from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ConsentSessionExpiresAt from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "authorize_code": obj.get("authorize_code"), + "id_token": obj.get("id_token"), + "par_context": obj.get("par_context"), + "refresh_token": obj.get("refresh_token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_login_request.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_login_request.py new file mode 100644 index 00000000000..30f8c76bacd --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_login_request.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2LoginRequest(BaseModel): + """ + OAuth2LoginRequest + """ # noqa: E501 + challenge: StrictStr = Field(description="ID is the identifier (\"login challenge\") of the login request. It is used to identify the session.") + client: OAuth2Client + oidc_context: Optional[OAuth2ConsentRequestOpenIDConnectContext] = None + request_url: StrictStr = Field(description="RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.") + requested_access_token_audience: Optional[List[StrictStr]] = None + requested_scope: Optional[List[StrictStr]] = None + session_id: Optional[StrictStr] = Field(default=None, description="SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.") + skip: StrictBool = Field(description="Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.") + subject: StrictStr = Field(description="Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["challenge", "client", "oidc_context", "request_url", "requested_access_token_audience", "requested_scope", "session_id", "skip", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2LoginRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of client + if self.client: + _dict['client'] = self.client.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_context + if self.oidc_context: + _dict['oidc_context'] = self.oidc_context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "challenge": obj.get("challenge"), + "client": OAuth2Client.from_dict(obj["client"]) if obj.get("client") is not None else None, + "oidc_context": OAuth2ConsentRequestOpenIDConnectContext.from_dict(obj["oidc_context"]) if obj.get("oidc_context") is not None else None, + "request_url": obj.get("request_url"), + "requested_access_token_audience": obj.get("requested_access_token_audience"), + "requested_scope": obj.get("requested_scope"), + "session_id": obj.get("session_id"), + "skip": obj.get("skip"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_logout_request.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_logout_request.py new file mode 100644 index 00000000000..7f0ccd34e03 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_logout_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.o_auth2_client import OAuth2Client +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2LogoutRequest(BaseModel): + """ + OAuth2LogoutRequest + """ # noqa: E501 + challenge: Optional[StrictStr] = Field(default=None, description="Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.") + client: Optional[OAuth2Client] = None + request_url: Optional[StrictStr] = Field(default=None, description="RequestURL is the original Logout URL requested.") + rp_initiated: Optional[StrictBool] = Field(default=None, description="RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.") + sid: Optional[StrictStr] = Field(default=None, description="SessionID is the login session ID that was requested to log out.") + subject: Optional[StrictStr] = Field(default=None, description="Subject is the user for whom the logout was request.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["challenge", "client", "request_url", "rp_initiated", "sid", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2LogoutRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of client + if self.client: + _dict['client'] = self.client.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2LogoutRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "challenge": obj.get("challenge"), + "client": OAuth2Client.from_dict(obj["client"]) if obj.get("client") is not None else None, + "request_url": obj.get("request_url"), + "rp_initiated": obj.get("rp_initiated"), + "sid": obj.get("sid"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_redirect_to.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_redirect_to.py new file mode 100644 index 00000000000..c8fae807b2b --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_redirect_to.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2RedirectTo(BaseModel): + """ + Contains a redirect URL used to complete a login, consent, or logout request. + """ # noqa: E501 + redirect_to: StrictStr = Field(description="RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["redirect_to"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2RedirectTo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2RedirectTo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redirect_to": obj.get("redirect_to") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/o_auth2_token_exchange.py b/clients/hydra/python/ory_hydra_client/models/o_auth2_token_exchange.py new file mode 100644 index 00000000000..c153f19f02b --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/o_auth2_token_exchange.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2TokenExchange(BaseModel): + """ + OAuth2 Token Exchange Result + """ # noqa: E501 + access_token: Optional[StrictStr] = Field(default=None, description="The access token issued by the authorization server.") + expires_in: Optional[StrictInt] = Field(default=None, description="The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.") + id_token: Optional[StrictStr] = Field(default=None, description="To retrieve a refresh token request the id_token scope.") + refresh_token: Optional[StrictStr] = Field(default=None, description="The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.") + scope: Optional[StrictStr] = Field(default=None, description="The scope of the access token") + token_type: Optional[StrictStr] = Field(default=None, description="The type of the token issued") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_token", "expires_in", "id_token", "refresh_token", "scope", "token_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2TokenExchange from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2TokenExchange from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "expires_in": obj.get("expires_in"), + "id_token": obj.get("id_token"), + "refresh_token": obj.get("refresh_token"), + "scope": obj.get("scope"), + "token_type": obj.get("token_type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/oidc_configuration.py b/clients/hydra/python/ory_hydra_client/models/oidc_configuration.py new file mode 100644 index 00000000000..31276b067e5 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/oidc_configuration.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.credential_supported_draft00 import CredentialSupportedDraft00 +from typing import Optional, Set +from typing_extensions import Self + +class OidcConfiguration(BaseModel): + """ + Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + """ # noqa: E501 + authorization_endpoint: StrictStr = Field(description="OAuth 2.0 Authorization Endpoint URL") + backchannel_logout_session_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP") + backchannel_logout_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.") + claims_parameter_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.") + claims_supported: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.") + code_challenge_methods_supported: Optional[List[StrictStr]] = Field(default=None, description="OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.") + credentials_endpoint_draft_00: Optional[StrictStr] = Field(default=None, description="OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.") + credentials_supported_draft_00: Optional[List[CredentialSupportedDraft00]] = Field(default=None, description="OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.") + end_session_endpoint: Optional[StrictStr] = Field(default=None, description="OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.") + frontchannel_logout_session_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.") + frontchannel_logout_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.") + grant_types_supported: Optional[List[StrictStr]] = Field(default=None, description="OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.") + id_token_signed_response_alg: List[StrictStr] = Field(description="OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens.") + id_token_signing_alg_values_supported: List[StrictStr] = Field(description="OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.") + issuer: StrictStr = Field(description="OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.") + jwks_uri: StrictStr = Field(description="OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.") + registration_endpoint: Optional[StrictStr] = Field(default=None, description="OpenID Connect Dynamic Client Registration Endpoint URL") + request_object_signing_alg_values_supported: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).") + request_parameter_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.") + request_uri_parameter_supported: Optional[StrictBool] = Field(default=None, description="OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.") + require_request_uri_registration: Optional[StrictBool] = Field(default=None, description="OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.") + response_modes_supported: Optional[List[StrictStr]] = Field(default=None, description="OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.") + response_types_supported: List[StrictStr] = Field(description="OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.") + revocation_endpoint: Optional[StrictStr] = Field(default=None, description="OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.") + scopes_supported: Optional[List[StrictStr]] = Field(default=None, description="OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used") + subject_types_supported: List[StrictStr] = Field(description="OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.") + token_endpoint: StrictStr = Field(description="OAuth 2.0 Token Endpoint URL") + token_endpoint_auth_methods_supported: Optional[List[StrictStr]] = Field(default=None, description="OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0") + userinfo_endpoint: Optional[StrictStr] = Field(default=None, description="OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.") + userinfo_signed_response_alg: List[StrictStr] = Field(description="OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses.") + userinfo_signing_alg_values_supported: Optional[List[StrictStr]] = Field(default=None, description="OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["authorization_endpoint", "backchannel_logout_session_supported", "backchannel_logout_supported", "claims_parameter_supported", "claims_supported", "code_challenge_methods_supported", "credentials_endpoint_draft_00", "credentials_supported_draft_00", "end_session_endpoint", "frontchannel_logout_session_supported", "frontchannel_logout_supported", "grant_types_supported", "id_token_signed_response_alg", "id_token_signing_alg_values_supported", "issuer", "jwks_uri", "registration_endpoint", "request_object_signing_alg_values_supported", "request_parameter_supported", "request_uri_parameter_supported", "require_request_uri_registration", "response_modes_supported", "response_types_supported", "revocation_endpoint", "scopes_supported", "subject_types_supported", "token_endpoint", "token_endpoint_auth_methods_supported", "userinfo_endpoint", "userinfo_signed_response_alg", "userinfo_signing_alg_values_supported"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OidcConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in credentials_supported_draft_00 (list) + _items = [] + if self.credentials_supported_draft_00: + for _item in self.credentials_supported_draft_00: + if _item: + _items.append(_item.to_dict()) + _dict['credentials_supported_draft_00'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OidcConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authorization_endpoint": obj.get("authorization_endpoint"), + "backchannel_logout_session_supported": obj.get("backchannel_logout_session_supported"), + "backchannel_logout_supported": obj.get("backchannel_logout_supported"), + "claims_parameter_supported": obj.get("claims_parameter_supported"), + "claims_supported": obj.get("claims_supported"), + "code_challenge_methods_supported": obj.get("code_challenge_methods_supported"), + "credentials_endpoint_draft_00": obj.get("credentials_endpoint_draft_00"), + "credentials_supported_draft_00": [CredentialSupportedDraft00.from_dict(_item) for _item in obj["credentials_supported_draft_00"]] if obj.get("credentials_supported_draft_00") is not None else None, + "end_session_endpoint": obj.get("end_session_endpoint"), + "frontchannel_logout_session_supported": obj.get("frontchannel_logout_session_supported"), + "frontchannel_logout_supported": obj.get("frontchannel_logout_supported"), + "grant_types_supported": obj.get("grant_types_supported"), + "id_token_signed_response_alg": obj.get("id_token_signed_response_alg"), + "id_token_signing_alg_values_supported": obj.get("id_token_signing_alg_values_supported"), + "issuer": obj.get("issuer"), + "jwks_uri": obj.get("jwks_uri"), + "registration_endpoint": obj.get("registration_endpoint"), + "request_object_signing_alg_values_supported": obj.get("request_object_signing_alg_values_supported"), + "request_parameter_supported": obj.get("request_parameter_supported"), + "request_uri_parameter_supported": obj.get("request_uri_parameter_supported"), + "require_request_uri_registration": obj.get("require_request_uri_registration"), + "response_modes_supported": obj.get("response_modes_supported"), + "response_types_supported": obj.get("response_types_supported"), + "revocation_endpoint": obj.get("revocation_endpoint"), + "scopes_supported": obj.get("scopes_supported"), + "subject_types_supported": obj.get("subject_types_supported"), + "token_endpoint": obj.get("token_endpoint"), + "token_endpoint_auth_methods_supported": obj.get("token_endpoint_auth_methods_supported"), + "userinfo_endpoint": obj.get("userinfo_endpoint"), + "userinfo_signed_response_alg": obj.get("userinfo_signed_response_alg"), + "userinfo_signing_alg_values_supported": obj.get("userinfo_signing_alg_values_supported") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/oidc_user_info.py b/clients/hydra/python/ory_hydra_client/models/oidc_user_info.py new file mode 100644 index 00000000000..9648cb2d845 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/oidc_user_info.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OidcUserInfo(BaseModel): + """ + OpenID Connect Userinfo + """ # noqa: E501 + birthdate: Optional[StrictStr] = Field(default=None, description="End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.") + email: Optional[StrictStr] = Field(default=None, description="End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.") + email_verified: Optional[StrictBool] = Field(default=None, description="True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.") + family_name: Optional[StrictStr] = Field(default=None, description="Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.") + gender: Optional[StrictStr] = Field(default=None, description="End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.") + given_name: Optional[StrictStr] = Field(default=None, description="Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.") + locale: Optional[StrictStr] = Field(default=None, description="End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.") + middle_name: Optional[StrictStr] = Field(default=None, description="Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.") + name: Optional[StrictStr] = Field(default=None, description="End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.") + nickname: Optional[StrictStr] = Field(default=None, description="Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.") + phone_number: Optional[StrictStr] = Field(default=None, description="End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.") + phone_number_verified: Optional[StrictBool] = Field(default=None, description="True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.") + picture: Optional[StrictStr] = Field(default=None, description="URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.") + preferred_username: Optional[StrictStr] = Field(default=None, description="Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.") + profile: Optional[StrictStr] = Field(default=None, description="URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.") + sub: Optional[StrictStr] = Field(default=None, description="Subject - Identifier for the End-User at the IssuerURL.") + updated_at: Optional[StrictInt] = Field(default=None, description="Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.") + website: Optional[StrictStr] = Field(default=None, description="URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.") + zoneinfo: Optional[StrictStr] = Field(default=None, description="String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["birthdate", "email", "email_verified", "family_name", "gender", "given_name", "locale", "middle_name", "name", "nickname", "phone_number", "phone_number_verified", "picture", "preferred_username", "profile", "sub", "updated_at", "website", "zoneinfo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OidcUserInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OidcUserInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "birthdate": obj.get("birthdate"), + "email": obj.get("email"), + "email_verified": obj.get("email_verified"), + "family_name": obj.get("family_name"), + "gender": obj.get("gender"), + "given_name": obj.get("given_name"), + "locale": obj.get("locale"), + "middle_name": obj.get("middle_name"), + "name": obj.get("name"), + "nickname": obj.get("nickname"), + "phone_number": obj.get("phone_number"), + "phone_number_verified": obj.get("phone_number_verified"), + "picture": obj.get("picture"), + "preferred_username": obj.get("preferred_username"), + "profile": obj.get("profile"), + "sub": obj.get("sub"), + "updated_at": obj.get("updated_at"), + "website": obj.get("website"), + "zoneinfo": obj.get("zoneinfo") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/pagination.py b/clients/hydra/python/ory_hydra_client/models/pagination.py new file mode 100644 index 00000000000..bdf453f1549 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/pagination.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Pagination(BaseModel): + """ + Pagination + """ # noqa: E501 + page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field(default=250, description="Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + page_token: Optional[Annotated[str, Field(strict=True)]] = Field(default='1', description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["page_size", "page_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Pagination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Pagination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page_size": obj.get("page_size") if obj.get("page_size") is not None else 250, + "page_token": obj.get("page_token") if obj.get("page_token") is not None else '1' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/pagination_headers.py b/clients/hydra/python/ory_hydra_client/models/pagination_headers.py new file mode 100644 index 00000000000..17b7016d90c --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/pagination_headers.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PaginationHeaders(BaseModel): + """ + PaginationHeaders + """ # noqa: E501 + link: Optional[StrictStr] = Field(default=None, description="The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header") + x_total_count: Optional[StrictStr] = Field(default=None, description="The total number of clients. in: header", alias="x-total-count") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["link", "x-total-count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationHeaders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "link": obj.get("link"), + "x-total-count": obj.get("x-total-count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/reject_o_auth2_request.py b/clients/hydra/python/ory_hydra_client/models/reject_o_auth2_request.py new file mode 100644 index 00000000000..4627dbdfedf --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/reject_o_auth2_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RejectOAuth2Request(BaseModel): + """ + RejectOAuth2Request + """ # noqa: E501 + error: Optional[StrictStr] = Field(default=None, description="The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.") + error_debug: Optional[StrictStr] = Field(default=None, description="Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.") + error_description: Optional[StrictStr] = Field(default=None, description="Description of the error in a human readable format.") + error_hint: Optional[StrictStr] = Field(default=None, description="Hint to help resolve the error.") + status_code: Optional[StrictInt] = Field(default=None, description="Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "error_debug", "error_description", "error_hint", "status_code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RejectOAuth2Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RejectOAuth2Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_debug": obj.get("error_debug"), + "error_description": obj.get("error_description"), + "error_hint": obj.get("error_hint"), + "status_code": obj.get("status_code") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/rfc6749_error_json.py b/clients/hydra/python/ory_hydra_client/models/rfc6749_error_json.py new file mode 100644 index 00000000000..9e16ae37c6b --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/rfc6749_error_json.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RFC6749ErrorJson(BaseModel): + """ + RFC6749ErrorJson + """ # noqa: E501 + error: Optional[StrictStr] = None + error_debug: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + error_hint: Optional[StrictStr] = None + status_code: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "error_debug", "error_description", "error_hint", "status_code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RFC6749ErrorJson from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RFC6749ErrorJson from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_debug": obj.get("error_debug"), + "error_description": obj.get("error_description"), + "error_hint": obj.get("error_hint"), + "status_code": obj.get("status_code") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/token_pagination.py b/clients/hydra/python/ory_hydra_client/models/token_pagination.py new file mode 100644 index 00000000000..9c54877d8df --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/token_pagination.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TokenPagination(BaseModel): + """ + TokenPagination + """ # noqa: E501 + page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = Field(default=250, description="Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + page_token: Optional[Annotated[str, Field(strict=True)]] = Field(default='1', description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["page_size", "page_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenPagination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenPagination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page_size": obj.get("page_size") if obj.get("page_size") is not None else 250, + "page_token": obj.get("page_token") if obj.get("page_token") is not None else '1' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/token_pagination_headers.py b/clients/hydra/python/ory_hydra_client/models/token_pagination_headers.py new file mode 100644 index 00000000000..f4dbf16c84f --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/token_pagination_headers.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TokenPaginationHeaders(BaseModel): + """ + TokenPaginationHeaders + """ # noqa: E501 + link: Optional[StrictStr] = Field(default=None, description="The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header") + x_total_count: Optional[StrictStr] = Field(default=None, description="The total number of clients. in: header", alias="x-total-count") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["link", "x-total-count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenPaginationHeaders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenPaginationHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "link": obj.get("link"), + "x-total-count": obj.get("x-total-count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/token_pagination_request_parameters.py b/clients/hydra/python/ory_hydra_client/models/token_pagination_request_parameters.py new file mode 100644 index 00000000000..ad1567ffd0e --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/token_pagination_request_parameters.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TokenPaginationRequestParameters(BaseModel): + """ + The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + """ # noqa: E501 + page_size: Optional[Annotated[int, Field(le=500, strict=True, ge=1)]] = Field(default=250, description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + page_token: Optional[Annotated[str, Field(strict=True)]] = Field(default='1', description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["page_size", "page_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenPaginationRequestParameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenPaginationRequestParameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page_size": obj.get("page_size") if obj.get("page_size") is not None else 250, + "page_token": obj.get("page_token") if obj.get("page_token") is not None else '1' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/token_pagination_response_headers.py b/clients/hydra/python/ory_hydra_client/models/token_pagination_response_headers.py new file mode 100644 index 00000000000..e13d9cea47a --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/token_pagination_response_headers.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TokenPaginationResponseHeaders(BaseModel): + """ + The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + """ # noqa: E501 + link: Optional[StrictStr] = Field(default=None, description="The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: ; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\"") + x_total_count: Optional[StrictInt] = Field(default=None, description="The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.", alias="x-total-count") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["link", "x-total-count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenPaginationResponseHeaders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenPaginationResponseHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "link": obj.get("link"), + "x-total-count": obj.get("x-total-count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/trust_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/ory_hydra_client/models/trust_o_auth2_jwt_grant_issuer.py new file mode 100644 index 00000000000..e4a478b5d39 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/trust_o_auth2_jwt_grant_issuer.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.json_web_key import JsonWebKey +from typing import Optional, Set +from typing_extensions import Self + +class TrustOAuth2JwtGrantIssuer(BaseModel): + """ + Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + """ # noqa: E501 + allow_any_subject: Optional[StrictBool] = Field(default=None, description="The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.") + expires_at: datetime = Field(description="The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".") + issuer: StrictStr = Field(description="The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).") + jwk: JsonWebKey + scope: List[StrictStr] = Field(description="The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])") + subject: Optional[StrictStr] = Field(default=None, description="The \"subject\" identifies the principal that is the subject of the JWT.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allow_any_subject", "expires_at", "issuer", "jwk", "scope", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrustOAuth2JwtGrantIssuer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of jwk + if self.jwk: + _dict['jwk'] = self.jwk.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrustOAuth2JwtGrantIssuer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allow_any_subject": obj.get("allow_any_subject"), + "expires_at": obj.get("expires_at"), + "issuer": obj.get("issuer"), + "jwk": JsonWebKey.from_dict(obj["jwk"]) if obj.get("jwk") is not None else None, + "scope": obj.get("scope"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_issuer.py new file mode 100644 index 00000000000..0edf2490763 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_issuer.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey +from typing import Optional, Set +from typing_extensions import Self + +class TrustedOAuth2JwtGrantIssuer(BaseModel): + """ + OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + """ # noqa: E501 + allow_any_subject: Optional[StrictBool] = Field(default=None, description="The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.") + created_at: Optional[datetime] = Field(default=None, description="The \"created_at\" indicates, when grant was created.") + expires_at: Optional[datetime] = Field(default=None, description="The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".") + id: Optional[StrictStr] = None + issuer: Optional[StrictStr] = Field(default=None, description="The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).") + public_key: Optional[TrustedOAuth2JwtGrantJsonWebKey] = None + scope: Optional[List[StrictStr]] = Field(default=None, description="The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])") + subject: Optional[StrictStr] = Field(default=None, description="The \"subject\" identifies the principal that is the subject of the JWT.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allow_any_subject", "created_at", "expires_at", "id", "issuer", "public_key", "scope", "subject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrustedOAuth2JwtGrantIssuer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of public_key + if self.public_key: + _dict['public_key'] = self.public_key.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrustedOAuth2JwtGrantIssuer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allow_any_subject": obj.get("allow_any_subject"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "issuer": obj.get("issuer"), + "public_key": TrustedOAuth2JwtGrantJsonWebKey.from_dict(obj["public_key"]) if obj.get("public_key") is not None else None, + "scope": obj.get("scope"), + "subject": obj.get("subject") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_json_web_key.py b/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_json_web_key.py new file mode 100644 index 00000000000..74216aedd40 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/trusted_o_auth2_jwt_grant_json_web_key.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TrustedOAuth2JwtGrantJsonWebKey(BaseModel): + """ + OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + """ # noqa: E501 + kid: Optional[StrictStr] = Field(default=None, description="The \"key_id\" is key unique identifier (same as kid header in jws/jwt).") + set: Optional[StrictStr] = Field(default=None, description="The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kid", "set"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrustedOAuth2JwtGrantJsonWebKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrustedOAuth2JwtGrantJsonWebKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kid": obj.get("kid"), + "set": obj.get("set") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/verifiable_credential_priming_response.py b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_priming_response.py new file mode 100644 index 00000000000..27aaa51a734 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_priming_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifiableCredentialPrimingResponse(BaseModel): + """ + VerifiableCredentialPrimingResponse + """ # noqa: E501 + c_nonce: Optional[StrictStr] = None + c_nonce_expires_in: Optional[StrictInt] = None + error: Optional[StrictStr] = None + error_debug: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + error_hint: Optional[StrictStr] = None + format: Optional[StrictStr] = None + status_code: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["c_nonce", "c_nonce_expires_in", "error", "error_debug", "error_description", "error_hint", "format", "status_code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VerifiableCredentialPrimingResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VerifiableCredentialPrimingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "c_nonce": obj.get("c_nonce"), + "c_nonce_expires_in": obj.get("c_nonce_expires_in"), + "error": obj.get("error"), + "error_debug": obj.get("error_debug"), + "error_description": obj.get("error_description"), + "error_hint": obj.get("error_hint"), + "format": obj.get("format"), + "status_code": obj.get("status_code") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/verifiable_credential_proof.py b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_proof.py new file mode 100644 index 00000000000..0b0c8489eff --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_proof.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifiableCredentialProof(BaseModel): + """ + VerifiableCredentialProof + """ # noqa: E501 + jwt: Optional[StrictStr] = None + proof_type: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["jwt", "proof_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VerifiableCredentialProof from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VerifiableCredentialProof from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "jwt": obj.get("jwt"), + "proof_type": obj.get("proof_type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/verifiable_credential_response.py b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_response.py new file mode 100644 index 00000000000..c78250659dc --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/verifiable_credential_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifiableCredentialResponse(BaseModel): + """ + VerifiableCredentialResponse + """ # noqa: E501 + credential_draft_00: Optional[StrictStr] = None + format: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["credential_draft_00", "format"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VerifiableCredentialResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VerifiableCredentialResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credential_draft_00": obj.get("credential_draft_00"), + "format": obj.get("format") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/models/version.py b/clients/hydra/python/ory_hydra_client/models/version.py new file mode 100644 index 00000000000..e07be0d1e8e --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/models/version.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. + + The version of the OpenAPI document: v2.2.1 + Contact: hi@ory.sh + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Version(BaseModel): + """ + Version + """ # noqa: E501 + version: Optional[StrictStr] = Field(default=None, description="Version is the service's version.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Version from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Version from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/clients/hydra/python/ory_hydra_client/py.typed b/clients/hydra/python/ory_hydra_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/clients/hydra/python/ory_hydra_client/rest.py b/clients/hydra/python/ory_hydra_client/rest.py index 70f49b83d10..88a00f8b5a5 100644 --- a/clients/hydra/python/ory_hydra_client/rest.py +++ b/clients/hydra/python/ory_hydra_client/rest.py @@ -1,55 +1,69 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from ory_hydra_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from ory_hydra_client.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -58,71 +72,79 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies( - configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -134,61 +156,83 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) + connect=_request_timeout[0], + read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', - headers['Content-Type'], re.IGNORECASE)): + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -199,155 +243,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject - - -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None, '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ', ''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) + return RESTResponse(r) diff --git a/clients/hydra/python/pyproject.toml b/clients/hydra/python/pyproject.toml new file mode 100644 index 00000000000..c091d32250d --- /dev/null +++ b/clients/hydra/python/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "ory_hydra_client" +version = "v2.2.1" +description = "Ory Hydra API" +authors = ["OpenAPI Generator Community "] +license = "Apache 2.0" +readme = "README.md" +repository = "https://github.com/ory/sdk" +keywords = ["OpenAPI", "OpenAPI-Generator", "Ory Hydra API"] +include = ["ory_hydra_client/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "ory_hydra_client", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/clients/hydra/python/requirements.txt b/clients/hydra/python/requirements.txt index 96947f60408..cc85509ec51 100644 --- a/clients/hydra/python/requirements.txt +++ b/clients/hydra/python/requirements.txt @@ -1,3 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/clients/hydra/python/setup.py b/clients/hydra/python/setup.py index 4b71f3e01d3..c0fea92f417 100644 --- a/clients/hydra/python/setup.py +++ b/clients/hydra/python/setup.py @@ -1,28 +1,34 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 from setuptools import setup, find_packages # noqa: H301 -NAME = "ory-hydra-client" -VERSION = "v2.2.0" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools - +NAME = "ory-hydra-client" +VERSION = "v2.2.1" +PYTHON_REQUIRES = ">=3.7" REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", ] setup( @@ -33,12 +39,13 @@ author_email="hi@ory.sh", url="https://github.com/ory/sdk", keywords=["OpenAPI", "OpenAPI-Generator", "Ory Hydra API"], - python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache 2.0", + long_description_content_type='text/markdown', long_description="""\ - Documentation for all of Ory Hydra's APIs. # noqa: E501 - """ + Documentation for all of Ory Hydra's APIs. + """, # noqa: E501 + package_data={"ory_hydra_client": ["py.typed"]}, ) diff --git a/clients/hydra/python/test-requirements.txt b/clients/hydra/python/test-requirements.txt index bb4f22bb7a6..8e6d8cb1374 100644 --- a/clients/hydra/python/test-requirements.txt +++ b/clients/hydra/python/test-requirements.txt @@ -1 +1,5 @@ +pytest~=7.1.3 pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/clients/hydra/python/test/test_accept_o_auth2_consent_request.py b/clients/hydra/python/test/test_accept_o_auth2_consent_request.py index 8f9b005ecea..7bef9da3027 100644 --- a/clients/hydra/python/test/test_accept_o_auth2_consent_request.py +++ b/clients/hydra/python/test/test_accept_o_auth2_consent_request.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['AcceptOAuth2ConsentRequestSession'] = AcceptOAuth2ConsentRequestSession -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest +import unittest +from ory_hydra_client.models.accept_o_auth2_consent_request import AcceptOAuth2ConsentRequest class TestAcceptOAuth2ConsentRequest(unittest.TestCase): """AcceptOAuth2ConsentRequest unit test stubs""" @@ -29,12 +26,39 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AcceptOAuth2ConsentRequest: + """Test AcceptOAuth2ConsentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AcceptOAuth2ConsentRequest` + """ + model = AcceptOAuth2ConsentRequest() + if include_optional: + return AcceptOAuth2ConsentRequest( + context = None, + grant_access_token_audience = [ + '' + ], + grant_scope = [ + '' + ], + handled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + remember = True, + remember_for = 56, + session = ory_hydra_client.models.pass_session_data_to_a_consent_request/.Pass session data to a consent request.( + access_token = null, + id_token = null, ) + ) + else: + return AcceptOAuth2ConsentRequest( + ) + """ + def testAcceptOAuth2ConsentRequest(self): """Test AcceptOAuth2ConsentRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AcceptOAuth2ConsentRequest() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py b/clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py index ac851ad2fca..69863f502b3 100644 --- a/clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py +++ b/clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession +import unittest +from ory_hydra_client.models.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession class TestAcceptOAuth2ConsentRequestSession(unittest.TestCase): """AcceptOAuth2ConsentRequestSession unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AcceptOAuth2ConsentRequestSession: + """Test AcceptOAuth2ConsentRequestSession + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AcceptOAuth2ConsentRequestSession` + """ + model = AcceptOAuth2ConsentRequestSession() + if include_optional: + return AcceptOAuth2ConsentRequestSession( + access_token = None, + id_token = None + ) + else: + return AcceptOAuth2ConsentRequestSession( + ) + """ + def testAcceptOAuth2ConsentRequestSession(self): """Test AcceptOAuth2ConsentRequestSession""" - # FIXME: construct object with mandatory attributes with example values - # model = AcceptOAuth2ConsentRequestSession() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_accept_o_auth2_login_request.py b/clients/hydra/python/test/test_accept_o_auth2_login_request.py index 6a6b276a571..782aa781457 100644 --- a/clients/hydra/python/test/test_accept_o_auth2_login_request.py +++ b/clients/hydra/python/test/test_accept_o_auth2_login_request.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.accept_o_auth2_login_request import AcceptOAuth2LoginRequest +import unittest +from ory_hydra_client.models.accept_o_auth2_login_request import AcceptOAuth2LoginRequest class TestAcceptOAuth2LoginRequest(unittest.TestCase): """AcceptOAuth2LoginRequest unit test stubs""" @@ -27,12 +26,38 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AcceptOAuth2LoginRequest: + """Test AcceptOAuth2LoginRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AcceptOAuth2LoginRequest` + """ + model = AcceptOAuth2LoginRequest() + if include_optional: + return AcceptOAuth2LoginRequest( + acr = '', + amr = [ + '' + ], + context = None, + extend_session_lifespan = True, + force_subject_identifier = '', + identity_provider_session_id = '', + remember = True, + remember_for = 56, + subject = '' + ) + else: + return AcceptOAuth2LoginRequest( + subject = '', + ) + """ + def testAcceptOAuth2LoginRequest(self): """Test AcceptOAuth2LoginRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AcceptOAuth2LoginRequest() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_create_json_web_key_set.py b/clients/hydra/python/test/test_create_json_web_key_set.py index f51e1d80c67..8a78172d0e7 100644 --- a/clients/hydra/python/test/test_create_json_web_key_set.py +++ b/clients/hydra/python/test/test_create_json_web_key_set.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet +import unittest +from ory_hydra_client.models.create_json_web_key_set import CreateJsonWebKeySet class TestCreateJsonWebKeySet(unittest.TestCase): """CreateJsonWebKeySet unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CreateJsonWebKeySet: + """Test CreateJsonWebKeySet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateJsonWebKeySet` + """ + model = CreateJsonWebKeySet() + if include_optional: + return CreateJsonWebKeySet( + alg = '', + kid = '', + use = '' + ) + else: + return CreateJsonWebKeySet( + alg = '', + kid = '', + use = '', + ) + """ + def testCreateJsonWebKeySet(self): """Test CreateJsonWebKeySet""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateJsonWebKeySet() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_create_verifiable_credential_request_body.py b/clients/hydra/python/test/test_create_verifiable_credential_request_body.py index a30642a9cad..c4673a78501 100644 --- a/clients/hydra/python/test/test_create_verifiable_credential_request_body.py +++ b/clients/hydra/python/test/test_create_verifiable_credential_request_body.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.verifiable_credential_proof import VerifiableCredentialProof -globals()['VerifiableCredentialProof'] = VerifiableCredentialProof -from ory_hydra_client.model.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody +import unittest +from ory_hydra_client.models.create_verifiable_credential_request_body import CreateVerifiableCredentialRequestBody class TestCreateVerifiableCredentialRequestBody(unittest.TestCase): """CreateVerifiableCredentialRequestBody unit test stubs""" @@ -27,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CreateVerifiableCredentialRequestBody: + """Test CreateVerifiableCredentialRequestBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateVerifiableCredentialRequestBody` + """ + model = CreateVerifiableCredentialRequestBody() + if include_optional: + return CreateVerifiableCredentialRequestBody( + format = '', + proof = ory_hydra_client.models.verifiable_credential_proof_contains_the_proof_of_a_verifiable_credential/.VerifiableCredentialProof contains the proof of a verifiable credential.( + jwt = '', + proof_type = '', ), + types = [ + '' + ] + ) + else: + return CreateVerifiableCredentialRequestBody( + ) + """ + def testCreateVerifiableCredentialRequestBody(self): """Test CreateVerifiableCredentialRequestBody""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateVerifiableCredentialRequestBody() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_credential_supported_draft00.py b/clients/hydra/python/test/test_credential_supported_draft00.py index 89d543795ab..d449124408e 100644 --- a/clients/hydra/python/test/test_credential_supported_draft00.py +++ b/clients/hydra/python/test/test_credential_supported_draft00.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.credential_supported_draft00 import CredentialSupportedDraft00 +import unittest +from ory_hydra_client.models.credential_supported_draft00 import CredentialSupportedDraft00 class TestCredentialSupportedDraft00(unittest.TestCase): """CredentialSupportedDraft00 unit test stubs""" @@ -25,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CredentialSupportedDraft00: + """Test CredentialSupportedDraft00 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CredentialSupportedDraft00` + """ + model = CredentialSupportedDraft00() + if include_optional: + return CredentialSupportedDraft00( + cryptographic_binding_methods_supported = [ + '' + ], + cryptographic_suites_supported = [ + '' + ], + format = '', + types = [ + '' + ] + ) + else: + return CredentialSupportedDraft00( + ) + """ + def testCredentialSupportedDraft00(self): """Test CredentialSupportedDraft00""" - # FIXME: construct object with mandatory attributes with example values - # model = CredentialSupportedDraft00() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_error_o_auth2.py b/clients/hydra/python/test/test_error_o_auth2.py index ea163527e46..3f84dd73916 100644 --- a/clients/hydra/python/test/test_error_o_auth2.py +++ b/clients/hydra/python/test/test_error_o_auth2.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 +import unittest +from ory_hydra_client.models.error_o_auth2 import ErrorOAuth2 class TestErrorOAuth2(unittest.TestCase): """ErrorOAuth2 unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ErrorOAuth2: + """Test ErrorOAuth2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorOAuth2` + """ + model = ErrorOAuth2() + if include_optional: + return ErrorOAuth2( + error = '', + error_debug = '', + error_description = '', + error_hint = 'The redirect URL is not allowed.', + status_code = 401 + ) + else: + return ErrorOAuth2( + ) + """ + def testErrorOAuth2(self): """Test ErrorOAuth2""" - # FIXME: construct object with mandatory attributes with example values - # model = ErrorOAuth2() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_generic_error.py b/clients/hydra/python/test/test_generic_error.py index 9ff5ea373ed..6f6f9496964 100644 --- a/clients/hydra/python/test/test_generic_error.py +++ b/clients/hydra/python/test/test_generic_error.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.generic_error import GenericError +import unittest +from ory_hydra_client.models.generic_error import GenericError class TestGenericError(unittest.TestCase): """GenericError unit test stubs""" @@ -25,12 +26,35 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> GenericError: + """Test GenericError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GenericError` + """ + model = GenericError() + if include_optional: + return GenericError( + code = 404, + debug = 'SQL field "foo" is not a bool.', + details = None, + id = '', + message = 'The resource could not be found', + reason = 'User with ID 1234 does not exist.', + request = 'd7ef54b1-ec15-46e6-bccb-524b82c035e6', + status = 'Not Found' + ) + else: + return GenericError( + message = 'The resource could not be found', + ) + """ + def testGenericError(self): """Test GenericError""" - # FIXME: construct object with mandatory attributes with example values - # model = GenericError() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_get_version200_response.py b/clients/hydra/python/test/test_get_version200_response.py index f1a245dfc0d..36a9556077e 100644 --- a/clients/hydra/python/test/test_get_version200_response.py +++ b/clients/hydra/python/test/test_get_version200_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.get_version200_response import GetVersion200Response +import unittest +from ory_hydra_client.models.get_version200_response import GetVersion200Response class TestGetVersion200Response(unittest.TestCase): """GetVersion200Response unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> GetVersion200Response: + """Test GetVersion200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetVersion200Response` + """ + model = GetVersion200Response() + if include_optional: + return GetVersion200Response( + version = '' + ) + else: + return GetVersion200Response( + ) + """ + def testGetVersion200Response(self): """Test GetVersion200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = GetVersion200Response() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_health_not_ready_status.py b/clients/hydra/python/test/test_health_not_ready_status.py index cf3471e9ac5..013bb284fbf 100644 --- a/clients/hydra/python/test/test_health_not_ready_status.py +++ b/clients/hydra/python/test/test_health_not_ready_status.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.health_not_ready_status import HealthNotReadyStatus +import unittest +from ory_hydra_client.models.health_not_ready_status import HealthNotReadyStatus class TestHealthNotReadyStatus(unittest.TestCase): """HealthNotReadyStatus unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> HealthNotReadyStatus: + """Test HealthNotReadyStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HealthNotReadyStatus` + """ + model = HealthNotReadyStatus() + if include_optional: + return HealthNotReadyStatus( + errors = { + 'key' : '' + } + ) + else: + return HealthNotReadyStatus( + ) + """ + def testHealthNotReadyStatus(self): """Test HealthNotReadyStatus""" - # FIXME: construct object with mandatory attributes with example values - # model = HealthNotReadyStatus() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_health_status.py b/clients/hydra/python/test/test_health_status.py index 277cd7b1fc7..a353ffd9556 100644 --- a/clients/hydra/python/test/test_health_status.py +++ b/clients/hydra/python/test/test_health_status.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.health_status import HealthStatus +import unittest +from ory_hydra_client.models.health_status import HealthStatus class TestHealthStatus(unittest.TestCase): """HealthStatus unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> HealthStatus: + """Test HealthStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HealthStatus` + """ + model = HealthStatus() + if include_optional: + return HealthStatus( + status = '' + ) + else: + return HealthStatus( + ) + """ + def testHealthStatus(self): """Test HealthStatus""" - # FIXME: construct object with mandatory attributes with example values - # model = HealthStatus() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_introspected_o_auth2_token.py b/clients/hydra/python/test/test_introspected_o_auth2_token.py index 019067bf61d..1af996a3b41 100644 --- a/clients/hydra/python/test/test_introspected_o_auth2_token.py +++ b/clients/hydra/python/test/test_introspected_o_auth2_token.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.introspected_o_auth2_token import IntrospectedOAuth2Token +import unittest +from ory_hydra_client.models.introspected_o_auth2_token import IntrospectedOAuth2Token class TestIntrospectedOAuth2Token(unittest.TestCase): """IntrospectedOAuth2Token unit test stubs""" @@ -25,12 +26,45 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> IntrospectedOAuth2Token: + """Test IntrospectedOAuth2Token + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IntrospectedOAuth2Token` + """ + model = IntrospectedOAuth2Token() + if include_optional: + return IntrospectedOAuth2Token( + active = True, + aud = [ + '' + ], + client_id = '', + exp = 56, + ext = { + 'key' : null + }, + iat = 56, + iss = '', + nbf = 56, + obfuscated_subject = '', + scope = '', + sub = '', + token_type = '', + token_use = '', + username = '' + ) + else: + return IntrospectedOAuth2Token( + active = True, + ) + """ + def testIntrospectedOAuth2Token(self): """Test IntrospectedOAuth2Token""" - # FIXME: construct object with mandatory attributes with example values - # model = IntrospectedOAuth2Token() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_is_ready200_response.py b/clients/hydra/python/test/test_is_ready200_response.py index 791337c43a9..3f20d64dec4 100644 --- a/clients/hydra/python/test/test_is_ready200_response.py +++ b/clients/hydra/python/test/test_is_ready200_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.is_ready200_response import IsReady200Response +import unittest +from ory_hydra_client.models.is_ready200_response import IsReady200Response class TestIsReady200Response(unittest.TestCase): """IsReady200Response unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> IsReady200Response: + """Test IsReady200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsReady200Response` + """ + model = IsReady200Response() + if include_optional: + return IsReady200Response( + status = '' + ) + else: + return IsReady200Response( + ) + """ + def testIsReady200Response(self): """Test IsReady200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = IsReady200Response() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_is_ready503_response.py b/clients/hydra/python/test/test_is_ready503_response.py index 1eaa2a806a9..e144597cdc6 100644 --- a/clients/hydra/python/test/test_is_ready503_response.py +++ b/clients/hydra/python/test/test_is_ready503_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.is_ready503_response import IsReady503Response +import unittest +from ory_hydra_client.models.is_ready503_response import IsReady503Response class TestIsReady503Response(unittest.TestCase): """IsReady503Response unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> IsReady503Response: + """Test IsReady503Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsReady503Response` + """ + model = IsReady503Response() + if include_optional: + return IsReady503Response( + errors = { + 'key' : '' + } + ) + else: + return IsReady503Response( + ) + """ + def testIsReady503Response(self): """Test IsReady503Response""" - # FIXME: construct object with mandatory attributes with example values - # model = IsReady503Response() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_json_patch.py b/clients/hydra/python/test/test_json_patch.py index a21b77614c5..473296ad33c 100644 --- a/clients/hydra/python/test/test_json_patch.py +++ b/clients/hydra/python/test/test_json_patch.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.json_patch import JsonPatch +import unittest +from ory_hydra_client.models.json_patch import JsonPatch class TestJsonPatch(unittest.TestCase): """JsonPatch unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> JsonPatch: + """Test JsonPatch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JsonPatch` + """ + model = JsonPatch() + if include_optional: + return JsonPatch( + var_from = '/name', + op = 'replace', + path = '/name', + value = foobar + ) + else: + return JsonPatch( + op = 'replace', + path = '/name', + ) + """ + def testJsonPatch(self): """Test JsonPatch""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonPatch() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_json_patch_document.py b/clients/hydra/python/test/test_json_patch_document.py deleted file mode 100644 index 93a48b5319c..00000000000 --- a/clients/hydra/python/test/test_json_patch_document.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.json_patch import JsonPatch -globals()['JsonPatch'] = JsonPatch -from ory_hydra_client.model.json_patch_document import JsonPatchDocument - - -class TestJsonPatchDocument(unittest.TestCase): - """JsonPatchDocument unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testJsonPatchDocument(self): - """Test JsonPatchDocument""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonPatchDocument() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_json_web_key.py b/clients/hydra/python/test/test_json_web_key.py index 0662dc926ba..3b58834c521 100644 --- a/clients/hydra/python/test/test_json_web_key.py +++ b/clients/hydra/python/test/test_json_web_key.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.json_web_key import JsonWebKey +import unittest +from ory_hydra_client.models.json_web_key import JsonWebKey class TestJsonWebKey(unittest.TestCase): """JsonWebKey unit test stubs""" @@ -25,12 +26,49 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> JsonWebKey: + """Test JsonWebKey + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JsonWebKey` + """ + model = JsonWebKey() + if include_optional: + return JsonWebKey( + alg = 'RS256', + crv = 'P-256', + d = 'T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE', + dp = 'G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0', + dq = 's9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk', + e = 'AQAB', + k = 'GawgguFyGrWKav7AX4VKUg', + kid = '1603dfe0af8f4596', + kty = 'RSA', + n = 'vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0', + p = '6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ', + q = '0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ', + qi = 'GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU', + use = 'sig', + x = 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', + x5c = [ + '' + ], + y = 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0' + ) + else: + return JsonWebKey( + alg = 'RS256', + kid = '1603dfe0af8f4596', + kty = 'RSA', + use = 'sig', + ) + """ + def testJsonWebKey(self): """Test JsonWebKey""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonWebKey() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_json_web_key_set.py b/clients/hydra/python/test/test_json_web_key_set.py index dbf5d570fa9..38dd428bb2a 100644 --- a/clients/hydra/python/test/test_json_web_key_set.py +++ b/clients/hydra/python/test/test_json_web_key_set.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.json_web_key import JsonWebKey -globals()['JsonWebKey'] = JsonWebKey -from ory_hydra_client.model.json_web_key_set import JsonWebKeySet +import unittest +from ory_hydra_client.models.json_web_key_set import JsonWebKeySet class TestJsonWebKeySet(unittest.TestCase): """JsonWebKeySet unit test stubs""" @@ -27,12 +26,48 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> JsonWebKeySet: + """Test JsonWebKeySet + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JsonWebKeySet` + """ + model = JsonWebKeySet() + if include_optional: + return JsonWebKeySet( + keys = [ + ory_hydra_client.models.json_web_key.jsonWebKey( + alg = 'RS256', + crv = 'P-256', + d = 'T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE', + dp = 'G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0', + dq = 's9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk', + e = 'AQAB', + k = 'GawgguFyGrWKav7AX4VKUg', + kid = '1603dfe0af8f4596', + kty = 'RSA', + n = 'vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0', + p = '6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ', + q = '0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ', + qi = 'GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU', + use = 'sig', + x = 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', + x5c = [ + '' + ], + y = 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0', ) + ] + ) + else: + return JsonWebKeySet( + ) + """ + def testJsonWebKeySet(self): """Test JsonWebKeySet""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonWebKeySet() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_jwk_api.py b/clients/hydra/python/test/test_jwk_api.py index 0db0d34b036..36f5139c024 100644 --- a/clients/hydra/python/test/test_jwk_api.py +++ b/clients/hydra/python/test/test_jwk_api.py @@ -1,75 +1,78 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import ory_hydra_client -from ory_hydra_client.api.jwk_api import JwkApi # noqa: E501 +from ory_hydra_client.api.jwk_api import JwkApi class TestJwkApi(unittest.TestCase): """JwkApi unit test stubs""" - def setUp(self): - self.api = JwkApi() # noqa: E501 + def setUp(self) -> None: + self.api = JwkApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_create_json_web_key_set(self): + def test_create_json_web_key_set(self) -> None: """Test case for create_json_web_key_set - Create JSON Web Key # noqa: E501 + Create JSON Web Key """ pass - def test_delete_json_web_key(self): + def test_delete_json_web_key(self) -> None: """Test case for delete_json_web_key - Delete JSON Web Key # noqa: E501 + Delete JSON Web Key """ pass - def test_delete_json_web_key_set(self): + def test_delete_json_web_key_set(self) -> None: """Test case for delete_json_web_key_set - Delete JSON Web Key Set # noqa: E501 + Delete JSON Web Key Set """ pass - def test_get_json_web_key(self): + def test_get_json_web_key(self) -> None: """Test case for get_json_web_key - Get JSON Web Key # noqa: E501 + Get JSON Web Key """ pass - def test_get_json_web_key_set(self): + def test_get_json_web_key_set(self) -> None: """Test case for get_json_web_key_set - Retrieve a JSON Web Key Set # noqa: E501 + Retrieve a JSON Web Key Set """ pass - def test_set_json_web_key(self): + def test_set_json_web_key(self) -> None: """Test case for set_json_web_key - Set JSON Web Key # noqa: E501 + Set JSON Web Key """ pass - def test_set_json_web_key_set(self): + def test_set_json_web_key_set(self) -> None: """Test case for set_json_web_key_set - Update a JSON Web Key Set # noqa: E501 + Update a JSON Web Key Set """ pass diff --git a/clients/hydra/python/test/test_metadata_api.py b/clients/hydra/python/test/test_metadata_api.py index 870eed30324..2cb885ac057 100644 --- a/clients/hydra/python/test/test_metadata_api.py +++ b/clients/hydra/python/test/test_metadata_api.py @@ -1,47 +1,50 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import ory_hydra_client -from ory_hydra_client.api.metadata_api import MetadataApi # noqa: E501 +from ory_hydra_client.api.metadata_api import MetadataApi class TestMetadataApi(unittest.TestCase): """MetadataApi unit test stubs""" - def setUp(self): - self.api = MetadataApi() # noqa: E501 + def setUp(self) -> None: + self.api = MetadataApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_get_version(self): + def test_get_version(self) -> None: """Test case for get_version - Return Running Software Version. # noqa: E501 + Return Running Software Version. """ pass - def test_is_alive(self): + def test_is_alive(self) -> None: """Test case for is_alive - Check HTTP Server Status # noqa: E501 + Check HTTP Server Status """ pass - def test_is_ready(self): + def test_is_ready(self) -> None: """Test case for is_ready - Check HTTP Server and Database Status # noqa: E501 + Check HTTP Server and Database Status """ pass diff --git a/clients/hydra/python/test/test_null_duration.py b/clients/hydra/python/test/test_null_duration.py deleted file mode 100644 index 547d55db98b..00000000000 --- a/clients/hydra/python/test/test_null_duration.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.null_duration import NullDuration - - -class TestNullDuration(unittest.TestCase): - """NullDuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNullDuration(self): - """Test NullDuration""" - # FIXME: construct object with mandatory attributes with example values - # model = NullDuration() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_api.py b/clients/hydra/python/test/test_o_auth2_api.py index 349f15b6394..5883daa5591 100644 --- a/clients/hydra/python/test/test_o_auth2_api.py +++ b/clients/hydra/python/test/test_o_auth2_api.py @@ -1,222 +1,225 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import ory_hydra_client -from ory_hydra_client.api.o_auth2_api import OAuth2Api # noqa: E501 +from ory_hydra_client.api.o_auth2_api import OAuth2Api class TestOAuth2Api(unittest.TestCase): """OAuth2Api unit test stubs""" - def setUp(self): - self.api = OAuth2Api() # noqa: E501 + def setUp(self) -> None: + self.api = OAuth2Api() - def tearDown(self): + def tearDown(self) -> None: pass - def test_accept_o_auth2_consent_request(self): + def test_accept_o_auth2_consent_request(self) -> None: """Test case for accept_o_auth2_consent_request - Accept OAuth 2.0 Consent Request # noqa: E501 + Accept OAuth 2.0 Consent Request """ pass - def test_accept_o_auth2_login_request(self): + def test_accept_o_auth2_login_request(self) -> None: """Test case for accept_o_auth2_login_request - Accept OAuth 2.0 Login Request # noqa: E501 + Accept OAuth 2.0 Login Request """ pass - def test_accept_o_auth2_logout_request(self): + def test_accept_o_auth2_logout_request(self) -> None: """Test case for accept_o_auth2_logout_request - Accept OAuth 2.0 Session Logout Request # noqa: E501 + Accept OAuth 2.0 Session Logout Request """ pass - def test_create_o_auth2_client(self): + def test_create_o_auth2_client(self) -> None: """Test case for create_o_auth2_client - Create OAuth 2.0 Client # noqa: E501 + Create OAuth 2.0 Client """ pass - def test_delete_o_auth2_client(self): + def test_delete_o_auth2_client(self) -> None: """Test case for delete_o_auth2_client - Delete OAuth 2.0 Client # noqa: E501 + Delete OAuth 2.0 Client """ pass - def test_delete_o_auth2_token(self): + def test_delete_o_auth2_token(self) -> None: """Test case for delete_o_auth2_token - Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client # noqa: E501 + Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client """ pass - def test_delete_trusted_o_auth2_jwt_grant_issuer(self): + def test_delete_trusted_o_auth2_jwt_grant_issuer(self) -> None: """Test case for delete_trusted_o_auth2_jwt_grant_issuer - Delete Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + Delete Trusted OAuth2 JWT Bearer Grant Type Issuer """ pass - def test_get_o_auth2_client(self): + def test_get_o_auth2_client(self) -> None: """Test case for get_o_auth2_client - Get an OAuth 2.0 Client # noqa: E501 + Get an OAuth 2.0 Client """ pass - def test_get_o_auth2_consent_request(self): + def test_get_o_auth2_consent_request(self) -> None: """Test case for get_o_auth2_consent_request - Get OAuth 2.0 Consent Request # noqa: E501 + Get OAuth 2.0 Consent Request """ pass - def test_get_o_auth2_login_request(self): + def test_get_o_auth2_login_request(self) -> None: """Test case for get_o_auth2_login_request - Get OAuth 2.0 Login Request # noqa: E501 + Get OAuth 2.0 Login Request """ pass - def test_get_o_auth2_logout_request(self): + def test_get_o_auth2_logout_request(self) -> None: """Test case for get_o_auth2_logout_request - Get OAuth 2.0 Session Logout Request # noqa: E501 + Get OAuth 2.0 Session Logout Request """ pass - def test_get_trusted_o_auth2_jwt_grant_issuer(self): + def test_get_trusted_o_auth2_jwt_grant_issuer(self) -> None: """Test case for get_trusted_o_auth2_jwt_grant_issuer - Get Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + Get Trusted OAuth2 JWT Bearer Grant Type Issuer """ pass - def test_introspect_o_auth2_token(self): + def test_introspect_o_auth2_token(self) -> None: """Test case for introspect_o_auth2_token - Introspect OAuth2 Access and Refresh Tokens # noqa: E501 + Introspect OAuth2 Access and Refresh Tokens """ pass - def test_list_o_auth2_clients(self): + def test_list_o_auth2_clients(self) -> None: """Test case for list_o_auth2_clients - List OAuth 2.0 Clients # noqa: E501 + List OAuth 2.0 Clients """ pass - def test_list_o_auth2_consent_sessions(self): + def test_list_o_auth2_consent_sessions(self) -> None: """Test case for list_o_auth2_consent_sessions - List OAuth 2.0 Consent Sessions of a Subject # noqa: E501 + List OAuth 2.0 Consent Sessions of a Subject """ pass - def test_list_trusted_o_auth2_jwt_grant_issuers(self): + def test_list_trusted_o_auth2_jwt_grant_issuers(self) -> None: """Test case for list_trusted_o_auth2_jwt_grant_issuers - List Trusted OAuth2 JWT Bearer Grant Type Issuers # noqa: E501 + List Trusted OAuth2 JWT Bearer Grant Type Issuers """ pass - def test_o_auth2_authorize(self): + def test_o_auth2_authorize(self) -> None: """Test case for o_auth2_authorize - OAuth 2.0 Authorize Endpoint # noqa: E501 + OAuth 2.0 Authorize Endpoint """ pass - def test_oauth2_token_exchange(self): + def test_oauth2_token_exchange(self) -> None: """Test case for oauth2_token_exchange - The OAuth 2.0 Token Endpoint # noqa: E501 + The OAuth 2.0 Token Endpoint """ pass - def test_patch_o_auth2_client(self): + def test_patch_o_auth2_client(self) -> None: """Test case for patch_o_auth2_client - Patch OAuth 2.0 Client # noqa: E501 + Patch OAuth 2.0 Client """ pass - def test_reject_o_auth2_consent_request(self): + def test_reject_o_auth2_consent_request(self) -> None: """Test case for reject_o_auth2_consent_request - Reject OAuth 2.0 Consent Request # noqa: E501 + Reject OAuth 2.0 Consent Request """ pass - def test_reject_o_auth2_login_request(self): + def test_reject_o_auth2_login_request(self) -> None: """Test case for reject_o_auth2_login_request - Reject OAuth 2.0 Login Request # noqa: E501 + Reject OAuth 2.0 Login Request """ pass - def test_reject_o_auth2_logout_request(self): + def test_reject_o_auth2_logout_request(self) -> None: """Test case for reject_o_auth2_logout_request - Reject OAuth 2.0 Session Logout Request # noqa: E501 + Reject OAuth 2.0 Session Logout Request """ pass - def test_revoke_o_auth2_consent_sessions(self): + def test_revoke_o_auth2_consent_sessions(self) -> None: """Test case for revoke_o_auth2_consent_sessions - Revoke OAuth 2.0 Consent Sessions of a Subject # noqa: E501 + Revoke OAuth 2.0 Consent Sessions of a Subject """ pass - def test_revoke_o_auth2_login_sessions(self): + def test_revoke_o_auth2_login_sessions(self) -> None: """Test case for revoke_o_auth2_login_sessions - Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID # noqa: E501 + Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID """ pass - def test_revoke_o_auth2_token(self): + def test_revoke_o_auth2_token(self) -> None: """Test case for revoke_o_auth2_token - Revoke OAuth 2.0 Access or Refresh Token # noqa: E501 + Revoke OAuth 2.0 Access or Refresh Token """ pass - def test_set_o_auth2_client(self): + def test_set_o_auth2_client(self) -> None: """Test case for set_o_auth2_client - Set OAuth 2.0 Client # noqa: E501 + Set OAuth 2.0 Client """ pass - def test_set_o_auth2_client_lifespans(self): + def test_set_o_auth2_client_lifespans(self) -> None: """Test case for set_o_auth2_client_lifespans - Set OAuth2 Client Token Lifespans # noqa: E501 + Set OAuth2 Client Token Lifespans """ pass - def test_trust_o_auth2_jwt_grant_issuer(self): + def test_trust_o_auth2_jwt_grant_issuer(self) -> None: """Test case for trust_o_auth2_jwt_grant_issuer - Trust OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + Trust OAuth2 JWT Bearer Grant Type Issuer """ pass diff --git a/clients/hydra/python/test/test_o_auth2_client.py b/clients/hydra/python/test/test_o_auth2_client.py index e8a64d17e58..0f2dc5f5b62 100644 --- a/clients/hydra/python/test/test_o_auth2_client.py +++ b/clients/hydra/python/test/test_o_auth2_client.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.null_duration import NullDuration -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['NullDuration'] = NullDuration -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.o_auth2_client import OAuth2Client +import unittest +from ory_hydra_client.models.o_auth2_client import OAuth2Client class TestOAuth2Client(unittest.TestCase): """OAuth2Client unit test stubs""" @@ -29,12 +26,90 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2Client: + """Test OAuth2Client + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2Client` + """ + model = OAuth2Client() + if include_optional: + return OAuth2Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = [ + '' + ], + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = [ + '' + ], + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = None, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = None, + owner = '', + policy_uri = '', + post_logout_redirect_uris = [ + '' + ], + redirect_uris = [ + '' + ], + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = [ + '' + ], + response_types = [ + '' + ], + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '' + ) + else: + return OAuth2Client( + ) + """ + def testOAuth2Client(self): """Test OAuth2Client""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2Client() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_client_token_lifespans.py b/clients/hydra/python/test/test_o_auth2_client_token_lifespans.py index a5a780dae25..55ebadcb732 100644 --- a/clients/hydra/python/test/test_o_auth2_client_token_lifespans.py +++ b/clients/hydra/python/test/test_o_auth2_client_token_lifespans.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.null_duration import NullDuration -globals()['NullDuration'] = NullDuration -from ory_hydra_client.model.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans +import unittest +from ory_hydra_client.models.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans class TestOAuth2ClientTokenLifespans(unittest.TestCase): """OAuth2ClientTokenLifespans unit test stubs""" @@ -27,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2ClientTokenLifespans: + """Test OAuth2ClientTokenLifespans + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ClientTokenLifespans` + """ + model = OAuth2ClientTokenLifespans() + if include_optional: + return OAuth2ClientTokenLifespans( + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s' + ) + else: + return OAuth2ClientTokenLifespans( + ) + """ + def testOAuth2ClientTokenLifespans(self): """Test OAuth2ClientTokenLifespans""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ClientTokenLifespans() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_consent_request.py b/clients/hydra/python/test/test_o_auth2_consent_request.py index 7acbe8239aa..075d0894cd3 100644 --- a/clients/hydra/python/test/test_o_auth2_consent_request.py +++ b/clients/hydra/python/test/test_o_auth2_consent_request.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['OAuth2Client'] = OAuth2Client -globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest +import unittest +from ory_hydra_client.models.o_auth2_consent_request import OAuth2ConsentRequest class TestOAuth2ConsentRequest(unittest.TestCase): """OAuth2ConsentRequest unit test stubs""" @@ -31,12 +26,109 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2ConsentRequest: + """Test OAuth2ConsentRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ConsentRequest` + """ + model = OAuth2ConsentRequest() + if include_optional: + return OAuth2ConsentRequest( + acr = '', + amr = [ + '' + ], + challenge = '', + client = ory_hydra_client.models.o_auth_2/0_client.OAuth 2.0 Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = [ + '' + ], + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = , + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = , + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = null, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = null, + owner = '', + policy_uri = '', + post_logout_redirect_uris = , + redirect_uris = , + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = , + response_types = , + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '', ), + context = None, + login_challenge = '', + login_session_id = '', + oidc_context = ory_hydra_client.models.contains_optional_information_about_the_open_id_connect_request/.Contains optional information about the OpenID Connect request.( + acr_values = [ + '' + ], + display = '', + id_token_hint_claims = { + 'key' : null + }, + login_hint = '', + ui_locales = [ + '' + ], ), + request_url = '', + requested_access_token_audience = [ + '' + ], + requested_scope = [ + '' + ], + skip = True, + subject = '' + ) + else: + return OAuth2ConsentRequest( + challenge = '', + ) + """ + def testOAuth2ConsentRequest(self): """Test OAuth2ConsentRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ConsentRequest() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py b/clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py index cf0f7194148..4e118108def 100644 --- a/clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py +++ b/clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext +import unittest +from ory_hydra_client.models.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext class TestOAuth2ConsentRequestOpenIDConnectContext(unittest.TestCase): """OAuth2ConsentRequestOpenIDConnectContext unit test stubs""" @@ -25,12 +26,37 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2ConsentRequestOpenIDConnectContext: + """Test OAuth2ConsentRequestOpenIDConnectContext + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ConsentRequestOpenIDConnectContext` + """ + model = OAuth2ConsentRequestOpenIDConnectContext() + if include_optional: + return OAuth2ConsentRequestOpenIDConnectContext( + acr_values = [ + '' + ], + display = '', + id_token_hint_claims = { + 'key' : null + }, + login_hint = '', + ui_locales = [ + '' + ] + ) + else: + return OAuth2ConsentRequestOpenIDConnectContext( + ) + """ + def testOAuth2ConsentRequestOpenIDConnectContext(self): """Test OAuth2ConsentRequestOpenIDConnectContext""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ConsentRequestOpenIDConnectContext() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_consent_session.py b/clients/hydra/python/test/test_o_auth2_consent_session.py index df6210ccd97..f24df185230 100644 --- a/clients/hydra/python/test/test_o_auth2_consent_session.py +++ b/clients/hydra/python/test/test_o_auth2_consent_session.py @@ -1,28 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession -from ory_hydra_client.model.o_auth2_consent_request import OAuth2ConsentRequest -from ory_hydra_client.model.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['AcceptOAuth2ConsentRequestSession'] = AcceptOAuth2ConsentRequestSession -globals()['OAuth2ConsentRequest'] = OAuth2ConsentRequest -globals()['OAuth2ConsentSessionExpiresAt'] = OAuth2ConsentSessionExpiresAt -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.o_auth2_consent_session import OAuth2ConsentSession +import unittest +from ory_hydra_client.models.o_auth2_consent_session import OAuth2ConsentSession class TestOAuth2ConsentSession(unittest.TestCase): """OAuth2ConsentSession unit test stubs""" @@ -33,12 +26,122 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2ConsentSession: + """Test OAuth2ConsentSession + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ConsentSession` + """ + model = OAuth2ConsentSession() + if include_optional: + return OAuth2ConsentSession( + consent_request = ory_hydra_client.models.contains_information_on_an_ongoing_consent_request/.Contains information on an ongoing consent request.( + acr = '', + amr = [ + '' + ], + challenge = '', + client = ory_hydra_client.models.o_auth_2/0_client.OAuth 2.0 Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = , + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = , + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = , + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = null, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = null, + owner = '', + policy_uri = '', + post_logout_redirect_uris = , + redirect_uris = , + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = , + response_types = , + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '', ), + context = null, + login_challenge = '', + login_session_id = '', + oidc_context = ory_hydra_client.models.contains_optional_information_about_the_open_id_connect_request/.Contains optional information about the OpenID Connect request.( + acr_values = [ + '' + ], + display = '', + id_token_hint_claims = { + 'key' : null + }, + login_hint = '', + ui_locales = [ + '' + ], ), + request_url = '', + requested_access_token_audience = , + requested_scope = , + skip = True, + subject = '', ), + context = None, + expires_at = ory_hydra_client.models.o_auth2_consent_session_expires_at.oAuth2ConsentSession_expires_at( + access_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + authorize_code = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + par_context = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + refresh_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + grant_access_token_audience = [ + '' + ], + grant_scope = [ + '' + ], + handled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + remember = True, + remember_for = 56, + session = ory_hydra_client.models.pass_session_data_to_a_consent_request/.Pass session data to a consent request.( + access_token = null, + id_token = null, ) + ) + else: + return OAuth2ConsentSession( + ) + """ + def testOAuth2ConsentSession(self): """Test OAuth2ConsentSession""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ConsentSession() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py b/clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py index e700c9239d7..1b36f038d6f 100644 --- a/clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py +++ b/clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt +import unittest +from ory_hydra_client.models.o_auth2_consent_session_expires_at import OAuth2ConsentSessionExpiresAt class TestOAuth2ConsentSessionExpiresAt(unittest.TestCase): """OAuth2ConsentSessionExpiresAt unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2ConsentSessionExpiresAt: + """Test OAuth2ConsentSessionExpiresAt + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ConsentSessionExpiresAt` + """ + model = OAuth2ConsentSessionExpiresAt() + if include_optional: + return OAuth2ConsentSessionExpiresAt( + access_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + authorize_code = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + par_context = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + refresh_token = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return OAuth2ConsentSessionExpiresAt( + ) + """ + def testOAuth2ConsentSessionExpiresAt(self): """Test OAuth2ConsentSessionExpiresAt""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ConsentSessionExpiresAt() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_consent_sessions.py b/clients/hydra/python/test/test_o_auth2_consent_sessions.py deleted file mode 100644 index c22909e9be1..00000000000 --- a/clients/hydra/python/test/test_o_auth2_consent_sessions.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.o_auth2_consent_session import OAuth2ConsentSession -globals()['OAuth2ConsentSession'] = OAuth2ConsentSession -from ory_hydra_client.model.o_auth2_consent_sessions import OAuth2ConsentSessions - - -class TestOAuth2ConsentSessions(unittest.TestCase): - """OAuth2ConsentSessions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOAuth2ConsentSessions(self): - """Test OAuth2ConsentSessions""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2ConsentSessions() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_login_request.py b/clients/hydra/python/test/test_o_auth2_login_request.py index 144a20b6614..e3d7d2366d1 100644 --- a/clients/hydra/python/test/test_o_auth2_login_request.py +++ b/clients/hydra/python/test/test_o_auth2_login_request.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.o_auth2_consent_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat -globals()['OAuth2Client'] = OAuth2Client -globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext -globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -from ory_hydra_client.model.o_auth2_login_request import OAuth2LoginRequest +import unittest +from ory_hydra_client.models.o_auth2_login_request import OAuth2LoginRequest class TestOAuth2LoginRequest(unittest.TestCase): """OAuth2LoginRequest unit test stubs""" @@ -31,12 +26,159 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2LoginRequest: + """Test OAuth2LoginRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2LoginRequest` + """ + model = OAuth2LoginRequest() + if include_optional: + return OAuth2LoginRequest( + challenge = '', + client = ory_hydra_client.models.o_auth_2/0_client.OAuth 2.0 Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = [ + '' + ], + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = , + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = , + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = null, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = null, + owner = '', + policy_uri = '', + post_logout_redirect_uris = , + redirect_uris = , + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = , + response_types = , + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '', ), + oidc_context = ory_hydra_client.models.contains_optional_information_about_the_open_id_connect_request/.Contains optional information about the OpenID Connect request.( + acr_values = [ + '' + ], + display = '', + id_token_hint_claims = { + 'key' : null + }, + login_hint = '', + ui_locales = [ + '' + ], ), + request_url = '', + requested_access_token_audience = [ + '' + ], + requested_scope = [ + '' + ], + session_id = '', + skip = True, + subject = '' + ) + else: + return OAuth2LoginRequest( + challenge = '', + client = ory_hydra_client.models.o_auth_2/0_client.OAuth 2.0 Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = [ + '' + ], + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = , + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = , + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = null, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = null, + owner = '', + policy_uri = '', + post_logout_redirect_uris = , + redirect_uris = , + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = , + response_types = , + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '', ), + request_url = '', + skip = True, + subject = '', + ) + """ + def testOAuth2LoginRequest(self): """Test OAuth2LoginRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2LoginRequest() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_logout_request.py b/clients/hydra/python/test/test_o_auth2_logout_request.py index f85507f929d..e3c41dafd57 100644 --- a/clients/hydra/python/test/test_o_auth2_logout_request.py +++ b/clients/hydra/python/test/test_o_auth2_logout_request.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_client import OAuth2Client -globals()['OAuth2Client'] = OAuth2Client -from ory_hydra_client.model.o_auth2_logout_request import OAuth2LogoutRequest +import unittest +from ory_hydra_client.models.o_auth2_logout_request import OAuth2LogoutRequest class TestOAuth2LogoutRequest(unittest.TestCase): """OAuth2LogoutRequest unit test stubs""" @@ -27,12 +26,84 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2LogoutRequest: + """Test OAuth2LogoutRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2LogoutRequest` + """ + model = OAuth2LogoutRequest() + if include_optional: + return OAuth2LogoutRequest( + challenge = '', + client = ory_hydra_client.models.o_auth_2/0_client.OAuth 2.0 Client( + access_token_strategy = '', + allowed_cors_origins = [ + '' + ], + audience = [ + '' + ], + authorization_code_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + authorization_code_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + backchannel_logout_session_required = True, + backchannel_logout_uri = '', + client_credentials_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + client_id = '', + client_name = '', + client_secret = '', + client_secret_expires_at = 56, + client_uri = '', + contacts = , + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + frontchannel_logout_session_required = True, + frontchannel_logout_uri = '', + grant_types = , + implicit_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + implicit_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + jwks = null, + jwks_uri = '', + jwt_bearer_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + logo_uri = '', + metadata = null, + owner = '', + policy_uri = '', + post_logout_redirect_uris = , + redirect_uris = , + refresh_token_grant_access_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_id_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + refresh_token_grant_refresh_token_lifespan = '80728ms0015280217980962255008507620686293393339756506851391026912917327294786014820265m1272755041757701929816286488291663322877m21919116647837856387556598683615248784425528468720999697682157936442848967131857636391us382249351630745068057172793570606620664962415415434479790599868759540626151494012626h19118476173237968022090825677715773090491175877238622700367804481067589385995284318716971h809437255518186242126631124808712420936114222us1109826538733395457796110376067381730053899858052502h9559516531751128043086958209868597220486555936412006917239720304955737734452346677471754449209840m308684917330882243035942890m0673685589682196092806879799560883895980413852591093704397513us546060652528654068834561751457882958790974352941056503031506863433940h59325594064046466694586076706109594796867002468642449871184ms977583459814832574743930384284266731620716351898465ms529386339022152609092509344996631299698075356us34890990125995414960453920343154842307899106337980741065ms35834077484739706353881us714470s2628582763368571328507679471307057663772614811507328336080145326834191317716504454477932763323597ns81241407647h0432196393721552124808999238986208055750640221ms235s', + registration_access_token = '', + registration_client_uri = '', + request_object_signing_alg = '', + request_uris = , + response_types = , + scope = 'scope1 scope-2 scope.3 scope:4', + sector_identifier_uri = '', + skip_consent = True, + skip_logout_consent = True, + subject_type = '', + token_endpoint_auth_method = 'client_secret_basic', + token_endpoint_auth_signing_alg = '', + tos_uri = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + userinfo_signed_response_alg = '', ), + request_url = '', + rp_initiated = True, + sid = '', + subject = '' + ) + else: + return OAuth2LogoutRequest( + ) + """ + def testOAuth2LogoutRequest(self): """Test OAuth2LogoutRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2LogoutRequest() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_redirect_to.py b/clients/hydra/python/test/test_o_auth2_redirect_to.py index 1f07c070d86..c2f0653b984 100644 --- a/clients/hydra/python/test/test_o_auth2_redirect_to.py +++ b/clients/hydra/python/test/test_o_auth2_redirect_to.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_redirect_to import OAuth2RedirectTo +import unittest +from ory_hydra_client.models.o_auth2_redirect_to import OAuth2RedirectTo class TestOAuth2RedirectTo(unittest.TestCase): """OAuth2RedirectTo unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2RedirectTo: + """Test OAuth2RedirectTo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2RedirectTo` + """ + model = OAuth2RedirectTo() + if include_optional: + return OAuth2RedirectTo( + redirect_to = '' + ) + else: + return OAuth2RedirectTo( + redirect_to = '', + ) + """ + def testOAuth2RedirectTo(self): """Test OAuth2RedirectTo""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2RedirectTo() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_token_exchange.py b/clients/hydra/python/test/test_o_auth2_token_exchange.py index ef36c156165..fd4f0648ea0 100644 --- a/clients/hydra/python/test/test_o_auth2_token_exchange.py +++ b/clients/hydra/python/test/test_o_auth2_token_exchange.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.o_auth2_token_exchange import OAuth2TokenExchange +import unittest +from ory_hydra_client.models.o_auth2_token_exchange import OAuth2TokenExchange class TestOAuth2TokenExchange(unittest.TestCase): """OAuth2TokenExchange unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OAuth2TokenExchange: + """Test OAuth2TokenExchange + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2TokenExchange` + """ + model = OAuth2TokenExchange() + if include_optional: + return OAuth2TokenExchange( + access_token = '', + expires_in = 56, + id_token = '', + refresh_token = '', + scope = '', + token_type = '' + ) + else: + return OAuth2TokenExchange( + ) + """ + def testOAuth2TokenExchange(self): """Test OAuth2TokenExchange""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2TokenExchange() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_oidc_api.py b/clients/hydra/python/test/test_oidc_api.py index 9b25ce3e541..ba2eac48b85 100644 --- a/clients/hydra/python/test/test_oidc_api.py +++ b/clients/hydra/python/test/test_oidc_api.py @@ -1,82 +1,85 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import ory_hydra_client -from ory_hydra_client.api.oidc_api import OidcApi # noqa: E501 +from ory_hydra_client.api.oidc_api import OidcApi class TestOidcApi(unittest.TestCase): """OidcApi unit test stubs""" - def setUp(self): - self.api = OidcApi() # noqa: E501 + def setUp(self) -> None: + self.api = OidcApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_create_oidc_dynamic_client(self): + def test_create_oidc_dynamic_client(self) -> None: """Test case for create_oidc_dynamic_client - Register OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + Register OAuth2 Client using OpenID Dynamic Client Registration """ pass - def test_create_verifiable_credential(self): + def test_create_verifiable_credential(self) -> None: """Test case for create_verifiable_credential - Issues a Verifiable Credential # noqa: E501 + Issues a Verifiable Credential """ pass - def test_delete_oidc_dynamic_client(self): + def test_delete_oidc_dynamic_client(self) -> None: """Test case for delete_oidc_dynamic_client - Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol # noqa: E501 + Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol """ pass - def test_discover_oidc_configuration(self): + def test_discover_oidc_configuration(self) -> None: """Test case for discover_oidc_configuration - OpenID Connect Discovery # noqa: E501 + OpenID Connect Discovery """ pass - def test_get_oidc_dynamic_client(self): + def test_get_oidc_dynamic_client(self) -> None: """Test case for get_oidc_dynamic_client - Get OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + Get OAuth2 Client using OpenID Dynamic Client Registration """ pass - def test_get_oidc_user_info(self): + def test_get_oidc_user_info(self) -> None: """Test case for get_oidc_user_info - OpenID Connect Userinfo # noqa: E501 + OpenID Connect Userinfo """ pass - def test_revoke_oidc_session(self): + def test_revoke_oidc_session(self) -> None: """Test case for revoke_oidc_session - OpenID Connect Front- and Back-channel Enabled Logout # noqa: E501 + OpenID Connect Front- and Back-channel Enabled Logout """ pass - def test_set_oidc_dynamic_client(self): + def test_set_oidc_dynamic_client(self) -> None: """Test case for set_oidc_dynamic_client - Set OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + Set OAuth2 Client using OpenID Dynamic Client Registration """ pass diff --git a/clients/hydra/python/test/test_oidc_configuration.py b/clients/hydra/python/test/test_oidc_configuration.py index 95b8692fd35..20197b48569 100644 --- a/clients/hydra/python/test/test_oidc_configuration.py +++ b/clients/hydra/python/test/test_oidc_configuration.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.credential_supported_draft00 import CredentialSupportedDraft00 -globals()['CredentialSupportedDraft00'] = CredentialSupportedDraft00 -from ory_hydra_client.model.oidc_configuration import OidcConfiguration +import unittest +from ory_hydra_client.models.oidc_configuration import OidcConfiguration class TestOidcConfiguration(unittest.TestCase): """OidcConfiguration unit test stubs""" @@ -27,12 +26,114 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OidcConfiguration: + """Test OidcConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OidcConfiguration` + """ + model = OidcConfiguration() + if include_optional: + return OidcConfiguration( + authorization_endpoint = 'https://playground.ory.sh/ory-hydra/public/oauth2/auth', + backchannel_logout_session_supported = True, + backchannel_logout_supported = True, + claims_parameter_supported = True, + claims_supported = [ + '' + ], + code_challenge_methods_supported = [ + '' + ], + credentials_endpoint_draft_00 = '', + credentials_supported_draft_00 = [ + ory_hydra_client.models.verifiable_credentials_metadata_(draft_00).Verifiable Credentials Metadata (Draft 00)( + cryptographic_binding_methods_supported = [ + '' + ], + cryptographic_suites_supported = [ + '' + ], + format = '', + types = [ + '' + ], ) + ], + end_session_endpoint = '', + frontchannel_logout_session_supported = True, + frontchannel_logout_supported = True, + grant_types_supported = [ + '' + ], + id_token_signed_response_alg = [ + '' + ], + id_token_signing_alg_values_supported = [ + '' + ], + issuer = 'https://playground.ory.sh/ory-hydra/public/', + jwks_uri = 'https://{slug}.projects.oryapis.com/.well-known/jwks.json', + registration_endpoint = 'https://playground.ory.sh/ory-hydra/admin/client', + request_object_signing_alg_values_supported = [ + '' + ], + request_parameter_supported = True, + request_uri_parameter_supported = True, + require_request_uri_registration = True, + response_modes_supported = [ + '' + ], + response_types_supported = [ + '' + ], + revocation_endpoint = '', + scopes_supported = [ + '' + ], + subject_types_supported = [ + '' + ], + token_endpoint = 'https://playground.ory.sh/ory-hydra/public/oauth2/token', + token_endpoint_auth_methods_supported = [ + '' + ], + userinfo_endpoint = '', + userinfo_signed_response_alg = [ + '' + ], + userinfo_signing_alg_values_supported = [ + '' + ] + ) + else: + return OidcConfiguration( + authorization_endpoint = 'https://playground.ory.sh/ory-hydra/public/oauth2/auth', + id_token_signed_response_alg = [ + '' + ], + id_token_signing_alg_values_supported = [ + '' + ], + issuer = 'https://playground.ory.sh/ory-hydra/public/', + jwks_uri = 'https://{slug}.projects.oryapis.com/.well-known/jwks.json', + response_types_supported = [ + '' + ], + subject_types_supported = [ + '' + ], + token_endpoint = 'https://playground.ory.sh/ory-hydra/public/oauth2/token', + userinfo_signed_response_alg = [ + '' + ], + ) + """ + def testOidcConfiguration(self): """Test OidcConfiguration""" - # FIXME: construct object with mandatory attributes with example values - # model = OidcConfiguration() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_oidc_user_info.py b/clients/hydra/python/test/test_oidc_user_info.py index 12f6560b5a3..f4dac2f44fc 100644 --- a/clients/hydra/python/test/test_oidc_user_info.py +++ b/clients/hydra/python/test/test_oidc_user_info.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.oidc_user_info import OidcUserInfo +import unittest +from ory_hydra_client.models.oidc_user_info import OidcUserInfo class TestOidcUserInfo(unittest.TestCase): """OidcUserInfo unit test stubs""" @@ -25,12 +26,45 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OidcUserInfo: + """Test OidcUserInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OidcUserInfo` + """ + model = OidcUserInfo() + if include_optional: + return OidcUserInfo( + birthdate = '', + email = '', + email_verified = True, + family_name = '', + gender = '', + given_name = '', + locale = '', + middle_name = '', + name = '', + nickname = '', + phone_number = '', + phone_number_verified = True, + picture = '', + preferred_username = '', + profile = '', + sub = '', + updated_at = 56, + website = '', + zoneinfo = '' + ) + else: + return OidcUserInfo( + ) + """ + def testOidcUserInfo(self): """Test OidcUserInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = OidcUserInfo() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_pagination.py b/clients/hydra/python/test/test_pagination.py index fa01371297b..77cf3a3a348 100644 --- a/clients/hydra/python/test/test_pagination.py +++ b/clients/hydra/python/test/test_pagination.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.pagination import Pagination +import unittest +from ory_hydra_client.models.pagination import Pagination class TestPagination(unittest.TestCase): """Pagination unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Pagination: + """Test Pagination + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Pagination` + """ + model = Pagination() + if include_optional: + return Pagination( + page_size = 1, + page_token = '1' + ) + else: + return Pagination( + ) + """ + def testPagination(self): """Test Pagination""" - # FIXME: construct object with mandatory attributes with example values - # model = Pagination() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_pagination_headers.py b/clients/hydra/python/test/test_pagination_headers.py index c1031bbeb07..f4f5540e4d0 100644 --- a/clients/hydra/python/test/test_pagination_headers.py +++ b/clients/hydra/python/test/test_pagination_headers.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.pagination_headers import PaginationHeaders +import unittest +from ory_hydra_client.models.pagination_headers import PaginationHeaders class TestPaginationHeaders(unittest.TestCase): """PaginationHeaders unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> PaginationHeaders: + """Test PaginationHeaders + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationHeaders` + """ + model = PaginationHeaders() + if include_optional: + return PaginationHeaders( + link = '', + x_total_count = '' + ) + else: + return PaginationHeaders( + ) + """ + def testPaginationHeaders(self): """Test PaginationHeaders""" - # FIXME: construct object with mandatory attributes with example values - # model = PaginationHeaders() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_reject_o_auth2_request.py b/clients/hydra/python/test/test_reject_o_auth2_request.py index 83f27305eff..c0dc388bca6 100644 --- a/clients/hydra/python/test/test_reject_o_auth2_request.py +++ b/clients/hydra/python/test/test_reject_o_auth2_request.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request +import unittest +from ory_hydra_client.models.reject_o_auth2_request import RejectOAuth2Request class TestRejectOAuth2Request(unittest.TestCase): """RejectOAuth2Request unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> RejectOAuth2Request: + """Test RejectOAuth2Request + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RejectOAuth2Request` + """ + model = RejectOAuth2Request() + if include_optional: + return RejectOAuth2Request( + error = '', + error_debug = '', + error_description = '', + error_hint = '', + status_code = 56 + ) + else: + return RejectOAuth2Request( + ) + """ + def testRejectOAuth2Request(self): """Test RejectOAuth2Request""" - # FIXME: construct object with mandatory attributes with example values - # model = RejectOAuth2Request() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_rfc6749_error_json.py b/clients/hydra/python/test/test_rfc6749_error_json.py index da0ddeee67f..22332ca57e9 100644 --- a/clients/hydra/python/test/test_rfc6749_error_json.py +++ b/clients/hydra/python/test/test_rfc6749_error_json.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.rfc6749_error_json import RFC6749ErrorJson +import unittest +from ory_hydra_client.models.rfc6749_error_json import RFC6749ErrorJson class TestRFC6749ErrorJson(unittest.TestCase): """RFC6749ErrorJson unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> RFC6749ErrorJson: + """Test RFC6749ErrorJson + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RFC6749ErrorJson` + """ + model = RFC6749ErrorJson() + if include_optional: + return RFC6749ErrorJson( + error = '', + error_debug = '', + error_description = '', + error_hint = '', + status_code = 56 + ) + else: + return RFC6749ErrorJson( + ) + """ + def testRFC6749ErrorJson(self): """Test RFC6749ErrorJson""" - # FIXME: construct object with mandatory attributes with example values - # model = RFC6749ErrorJson() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_string_slice_json_format.py b/clients/hydra/python/test/test_string_slice_json_format.py deleted file mode 100644 index 2c067d85a8f..00000000000 --- a/clients/hydra/python/test/test_string_slice_json_format.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat - - -class TestStringSliceJSONFormat(unittest.TestCase): - """StringSliceJSONFormat unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStringSliceJSONFormat(self): - """Test StringSliceJSONFormat""" - # FIXME: construct object with mandatory attributes with example values - # model = StringSliceJSONFormat() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_token_pagination.py b/clients/hydra/python/test/test_token_pagination.py index 32cf75c6418..f0840ac9171 100644 --- a/clients/hydra/python/test/test_token_pagination.py +++ b/clients/hydra/python/test/test_token_pagination.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.token_pagination import TokenPagination +import unittest +from ory_hydra_client.models.token_pagination import TokenPagination class TestTokenPagination(unittest.TestCase): """TokenPagination unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TokenPagination: + """Test TokenPagination + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenPagination` + """ + model = TokenPagination() + if include_optional: + return TokenPagination( + page_size = 1, + page_token = '1' + ) + else: + return TokenPagination( + ) + """ + def testTokenPagination(self): """Test TokenPagination""" - # FIXME: construct object with mandatory attributes with example values - # model = TokenPagination() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_token_pagination_headers.py b/clients/hydra/python/test/test_token_pagination_headers.py index 19e35ba780e..e84b6a40346 100644 --- a/clients/hydra/python/test/test_token_pagination_headers.py +++ b/clients/hydra/python/test/test_token_pagination_headers.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.token_pagination_headers import TokenPaginationHeaders +import unittest +from ory_hydra_client.models.token_pagination_headers import TokenPaginationHeaders class TestTokenPaginationHeaders(unittest.TestCase): """TokenPaginationHeaders unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TokenPaginationHeaders: + """Test TokenPaginationHeaders + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenPaginationHeaders` + """ + model = TokenPaginationHeaders() + if include_optional: + return TokenPaginationHeaders( + link = '', + x_total_count = '' + ) + else: + return TokenPaginationHeaders( + ) + """ + def testTokenPaginationHeaders(self): """Test TokenPaginationHeaders""" - # FIXME: construct object with mandatory attributes with example values - # model = TokenPaginationHeaders() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_token_pagination_request_parameters.py b/clients/hydra/python/test/test_token_pagination_request_parameters.py index 9aa30a35754..1a50390f843 100644 --- a/clients/hydra/python/test/test_token_pagination_request_parameters.py +++ b/clients/hydra/python/test/test_token_pagination_request_parameters.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.token_pagination_request_parameters import TokenPaginationRequestParameters +import unittest +from ory_hydra_client.models.token_pagination_request_parameters import TokenPaginationRequestParameters class TestTokenPaginationRequestParameters(unittest.TestCase): """TokenPaginationRequestParameters unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TokenPaginationRequestParameters: + """Test TokenPaginationRequestParameters + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenPaginationRequestParameters` + """ + model = TokenPaginationRequestParameters() + if include_optional: + return TokenPaginationRequestParameters( + page_size = 1, + page_token = '1' + ) + else: + return TokenPaginationRequestParameters( + ) + """ + def testTokenPaginationRequestParameters(self): """Test TokenPaginationRequestParameters""" - # FIXME: construct object with mandatory attributes with example values - # model = TokenPaginationRequestParameters() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_token_pagination_response_headers.py b/clients/hydra/python/test/test_token_pagination_response_headers.py index 09d5ac02c21..aca1d067010 100644 --- a/clients/hydra/python/test/test_token_pagination_response_headers.py +++ b/clients/hydra/python/test/test_token_pagination_response_headers.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.token_pagination_response_headers import TokenPaginationResponseHeaders +import unittest +from ory_hydra_client.models.token_pagination_response_headers import TokenPaginationResponseHeaders class TestTokenPaginationResponseHeaders(unittest.TestCase): """TokenPaginationResponseHeaders unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TokenPaginationResponseHeaders: + """Test TokenPaginationResponseHeaders + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenPaginationResponseHeaders` + """ + model = TokenPaginationResponseHeaders() + if include_optional: + return TokenPaginationResponseHeaders( + link = '', + x_total_count = 56 + ) + else: + return TokenPaginationResponseHeaders( + ) + """ + def testTokenPaginationResponseHeaders(self): """Test TokenPaginationResponseHeaders""" - # FIXME: construct object with mandatory attributes with example values - # model = TokenPaginationResponseHeaders() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py index a82a225e6a6..85c0d14e74e 100644 --- a/clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py +++ b/clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.json_web_key import JsonWebKey -globals()['JsonWebKey'] = JsonWebKey -from ory_hydra_client.model.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer +import unittest +from ory_hydra_client.models.trust_o_auth2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer class TestTrustOAuth2JwtGrantIssuer(unittest.TestCase): """TrustOAuth2JwtGrantIssuer unit test stubs""" @@ -27,12 +26,74 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TrustOAuth2JwtGrantIssuer: + """Test TrustOAuth2JwtGrantIssuer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrustOAuth2JwtGrantIssuer` + """ + model = TrustOAuth2JwtGrantIssuer() + if include_optional: + return TrustOAuth2JwtGrantIssuer( + allow_any_subject = True, + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + issuer = 'https://jwt-idp.example.com', + jwk = ory_hydra_client.models.json_web_key.jsonWebKey( + alg = 'RS256', + crv = 'P-256', + d = 'T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE', + dp = 'G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0', + dq = 's9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk', + e = 'AQAB', + k = 'GawgguFyGrWKav7AX4VKUg', + kid = '1603dfe0af8f4596', + kty = 'RSA', + n = 'vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0', + p = '6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ', + q = '0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ', + qi = 'GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU', + use = 'sig', + x = 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', + x5c = [ + '' + ], + y = 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0', ), + scope = ["openid","offline"], + subject = 'mike@example.com' + ) + else: + return TrustOAuth2JwtGrantIssuer( + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + issuer = 'https://jwt-idp.example.com', + jwk = ory_hydra_client.models.json_web_key.jsonWebKey( + alg = 'RS256', + crv = 'P-256', + d = 'T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE', + dp = 'G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0', + dq = 's9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk', + e = 'AQAB', + k = 'GawgguFyGrWKav7AX4VKUg', + kid = '1603dfe0af8f4596', + kty = 'RSA', + n = 'vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0', + p = '6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ', + q = '0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ', + qi = 'GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU', + use = 'sig', + x = 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU', + x5c = [ + '' + ], + y = 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0', ), + scope = ["openid","offline"], + ) + """ + def testTrustOAuth2JwtGrantIssuer(self): """Test TrustOAuth2JwtGrantIssuer""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustOAuth2JwtGrantIssuer() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py index 536d2a80f3d..af4fc99efda 100644 --- a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py +++ b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey -globals()['TrustedOAuth2JwtGrantJsonWebKey'] = TrustedOAuth2JwtGrantJsonWebKey -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer +import unittest +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer class TestTrustedOAuth2JwtGrantIssuer(unittest.TestCase): """TrustedOAuth2JwtGrantIssuer unit test stubs""" @@ -27,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TrustedOAuth2JwtGrantIssuer: + """Test TrustedOAuth2JwtGrantIssuer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrustedOAuth2JwtGrantIssuer` + """ + model = TrustedOAuth2JwtGrantIssuer() + if include_optional: + return TrustedOAuth2JwtGrantIssuer( + allow_any_subject = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '9edc811f-4e28-453c-9b46-4de65f00217f', + issuer = 'https://jwt-idp.example.com', + public_key = ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key.trustedOAuth2JwtGrantJsonWebKey( + kid = '123e4567-e89b-12d3-a456-426655440000', + set = 'https://jwt-idp.example.com', ), + scope = ["openid","offline"], + subject = 'mike@example.com' + ) + else: + return TrustedOAuth2JwtGrantIssuer( + ) + """ + def testTrustedOAuth2JwtGrantIssuer(self): """Test TrustedOAuth2JwtGrantIssuer""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedOAuth2JwtGrantIssuer() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py deleted file mode 100644 index f1b02cb1a96..00000000000 --- a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Ory Hydra API - - Documentation for all of Ory Hydra's APIs. # noqa: E501 - - The version of the OpenAPI document: v2.2.0 - Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer -globals()['TrustedOAuth2JwtGrantIssuer'] = TrustedOAuth2JwtGrantIssuer -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuers import TrustedOAuth2JwtGrantIssuers - - -class TestTrustedOAuth2JwtGrantIssuers(unittest.TestCase): - """TrustedOAuth2JwtGrantIssuers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTrustedOAuth2JwtGrantIssuers(self): - """Test TrustedOAuth2JwtGrantIssuers""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedOAuth2JwtGrantIssuers() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py index 68fde939471..50d98d64fb0 100644 --- a/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py +++ b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey +import unittest +from ory_hydra_client.models.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey class TestTrustedOAuth2JwtGrantJsonWebKey(unittest.TestCase): """TrustedOAuth2JwtGrantJsonWebKey unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TrustedOAuth2JwtGrantJsonWebKey: + """Test TrustedOAuth2JwtGrantJsonWebKey + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrustedOAuth2JwtGrantJsonWebKey` + """ + model = TrustedOAuth2JwtGrantJsonWebKey() + if include_optional: + return TrustedOAuth2JwtGrantJsonWebKey( + kid = '123e4567-e89b-12d3-a456-426655440000', + set = 'https://jwt-idp.example.com' + ) + else: + return TrustedOAuth2JwtGrantJsonWebKey( + ) + """ + def testTrustedOAuth2JwtGrantJsonWebKey(self): """Test TrustedOAuth2JwtGrantJsonWebKey""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedOAuth2JwtGrantJsonWebKey() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_verifiable_credential_priming_response.py b/clients/hydra/python/test/test_verifiable_credential_priming_response.py index 8bdfee02795..2b0e25aac09 100644 --- a/clients/hydra/python/test/test_verifiable_credential_priming_response.py +++ b/clients/hydra/python/test/test_verifiable_credential_priming_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse +import unittest +from ory_hydra_client.models.verifiable_credential_priming_response import VerifiableCredentialPrimingResponse class TestVerifiableCredentialPrimingResponse(unittest.TestCase): """VerifiableCredentialPrimingResponse unit test stubs""" @@ -25,12 +26,34 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> VerifiableCredentialPrimingResponse: + """Test VerifiableCredentialPrimingResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VerifiableCredentialPrimingResponse` + """ + model = VerifiableCredentialPrimingResponse() + if include_optional: + return VerifiableCredentialPrimingResponse( + c_nonce = '', + c_nonce_expires_in = 56, + error = '', + error_debug = '', + error_description = '', + error_hint = '', + format = '', + status_code = 56 + ) + else: + return VerifiableCredentialPrimingResponse( + ) + """ + def testVerifiableCredentialPrimingResponse(self): """Test VerifiableCredentialPrimingResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = VerifiableCredentialPrimingResponse() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_verifiable_credential_proof.py b/clients/hydra/python/test/test_verifiable_credential_proof.py index 0f0b6bb5b2d..c8b665e8eba 100644 --- a/clients/hydra/python/test/test_verifiable_credential_proof.py +++ b/clients/hydra/python/test/test_verifiable_credential_proof.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.verifiable_credential_proof import VerifiableCredentialProof +import unittest +from ory_hydra_client.models.verifiable_credential_proof import VerifiableCredentialProof class TestVerifiableCredentialProof(unittest.TestCase): """VerifiableCredentialProof unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> VerifiableCredentialProof: + """Test VerifiableCredentialProof + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VerifiableCredentialProof` + """ + model = VerifiableCredentialProof() + if include_optional: + return VerifiableCredentialProof( + jwt = '', + proof_type = '' + ) + else: + return VerifiableCredentialProof( + ) + """ + def testVerifiableCredentialProof(self): """Test VerifiableCredentialProof""" - # FIXME: construct object with mandatory attributes with example values - # model = VerifiableCredentialProof() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_verifiable_credential_response.py b/clients/hydra/python/test/test_verifiable_credential_response.py index d09e01a2152..b6031e42182 100644 --- a/clients/hydra/python/test/test_verifiable_credential_response.py +++ b/clients/hydra/python/test/test_verifiable_credential_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.verifiable_credential_response import VerifiableCredentialResponse +import unittest +from ory_hydra_client.models.verifiable_credential_response import VerifiableCredentialResponse class TestVerifiableCredentialResponse(unittest.TestCase): """VerifiableCredentialResponse unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> VerifiableCredentialResponse: + """Test VerifiableCredentialResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VerifiableCredentialResponse` + """ + model = VerifiableCredentialResponse() + if include_optional: + return VerifiableCredentialResponse( + credential_draft_00 = '', + format = '' + ) + else: + return VerifiableCredentialResponse( + ) + """ + def testVerifiableCredentialResponse(self): """Test VerifiableCredentialResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = VerifiableCredentialResponse() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_version.py b/clients/hydra/python/test/test_version.py index 87b5e8a83c7..bcde8dbb5ba 100644 --- a/clients/hydra/python/test/test_version.py +++ b/clients/hydra/python/test/test_version.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import ory_hydra_client -from ory_hydra_client.model.version import Version +import unittest +from ory_hydra_client.models.version import Version class TestVersion(unittest.TestCase): """Version unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Version: + """Test Version + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Version` + """ + model = Version() + if include_optional: + return Version( + version = '' + ) + else: + return Version( + ) + """ + def testVersion(self): """Test Version""" - # FIXME: construct object with mandatory attributes with example values - # model = Version() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/clients/hydra/python/test/test_wellknown_api.py b/clients/hydra/python/test/test_wellknown_api.py index a3a4779bba8..80953c11284 100644 --- a/clients/hydra/python/test/test_wellknown_api.py +++ b/clients/hydra/python/test/test_wellknown_api.py @@ -1,33 +1,36 @@ +# coding: utf-8 + """ Ory Hydra API - Documentation for all of Ory Hydra's APIs. # noqa: E501 + Documentation for all of Ory Hydra's APIs. - The version of the OpenAPI document: v2.2.0 + The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import ory_hydra_client -from ory_hydra_client.api.wellknown_api import WellknownApi # noqa: E501 +from ory_hydra_client.api.wellknown_api import WellknownApi class TestWellknownApi(unittest.TestCase): """WellknownApi unit test stubs""" - def setUp(self): - self.api = WellknownApi() # noqa: E501 + def setUp(self) -> None: + self.api = WellknownApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_discover_json_web_keys(self): + def test_discover_json_web_keys(self) -> None: """Test case for discover_json_web_keys - Discover Well-Known JSON Web Keys # noqa: E501 + Discover Well-Known JSON Web Keys """ pass diff --git a/clients/hydra/ruby/.gitlab-ci.yml b/clients/hydra/ruby/.gitlab-ci.yml index 3d57c5b30c0..3a253c45c05 100644 --- a/clients/hydra/ruby/.gitlab-ci.yml +++ b/clients/hydra/ruby/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/clients/hydra/ruby/.openapi-generator/FILES b/clients/hydra/ruby/.openapi-generator/FILES index ad0b7e5d316..4ef30ffaf34 100644 --- a/clients/hydra/ruby/.openapi-generator/FILES +++ b/clients/hydra/ruby/.openapi-generator/FILES @@ -117,8 +117,6 @@ spec/api/metadata_api_spec.rb spec/api/o_auth2_api_spec.rb spec/api/oidc_api_spec.rb spec/api/wellknown_api_spec.rb -spec/api_client_spec.rb -spec/configuration_spec.rb spec/models/accept_o_auth2_consent_request_session_spec.rb spec/models/accept_o_auth2_consent_request_spec.rb spec/models/accept_o_auth2_login_request_spec.rb diff --git a/clients/hydra/ruby/.openapi-generator/VERSION b/clients/hydra/ruby/.openapi-generator/VERSION index 1502020768a..1985849fb58 100644 --- a/clients/hydra/ruby/.openapi-generator/VERSION +++ b/clients/hydra/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -7.3.0 +7.7.0 diff --git a/clients/hydra/ruby/Gemfile.lock b/clients/hydra/ruby/Gemfile.lock index 5dc0d7830c3..af535c53bb3 100644 --- a/clients/hydra/ruby/Gemfile.lock +++ b/clients/hydra/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ory-hydra-client (2.2.0) + ory-hydra-client (2.2.1) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -13,22 +13,22 @@ GEM diff-lcs (1.5.1) ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.16.3) + ffi (1.17.0) jaro_winkler (1.5.6) - method_source (1.0.0) - parallel (1.24.0) - parser (3.3.0.5) + method_source (1.1.0) + parallel (1.25.1) + parser (3.3.3.0) ast (~> 2.4.1) racc - pry (0.13.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) + pry (>= 0.13, < 0.15) psych (4.0.6) stringio - racc (1.7.3) + racc (1.8.0) rainbow (3.1.1) rake (13.0.6) rspec (3.13.0) @@ -37,13 +37,13 @@ GEM rspec-mocks (~> 3.13.0) rspec-core (3.13.0) rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) + rspec-expectations (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.0) + rspec-support (3.13.1) rubocop (0.66.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -53,7 +53,7 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.6) ruby-progressbar (1.13.0) - stringio (3.0.6) + stringio (3.1.1) typhoeus (1.4.1) ethon (>= 0.9.0) unicode-display_width (1.5.0) diff --git a/clients/hydra/ruby/README.md b/clients/hydra/ruby/README.md index d2f7655164d..7bf5a95d6e8 100644 --- a/clients/hydra/ruby/README.md +++ b/clients/hydra/ruby/README.md @@ -7,8 +7,9 @@ Documentation for all of Ory Hydra's APIs. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v2.2.0 -- Package version: v2.2.0 +- API version: v2.2.1 +- Package version: v2.2.1 +- Generator version: 7.7.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -24,16 +25,16 @@ gem build ory-hydra-client.gemspec Then either install the gem locally: ```shell -gem install ./ory-hydra-client-v2.2.0.gem +gem install ./ory-hydra-client-v2.2.1.gem ``` -(for development, run `gem install --dev ./ory-hydra-client-v2.2.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./ory-hydra-client-v2.2.1.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'ory-hydra-client', '~> v2.2.0' + gem 'ory-hydra-client', '~> v2.2.1' ### Install from Git @@ -177,6 +178,7 @@ Class | Method | HTTP request | Description ## Documentation for Authorization +Authentication schemes defined for the API: ### basic - **Type**: HTTP basic authentication diff --git a/clients/hydra/ruby/lib/ory-hydra-client.rb b/clients/hydra/ruby/lib/ory-hydra-client.rb index 18051fa8f5f..e2834d6962b 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb index 9c07e52a546..f096de1a2d4 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/metadata_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/metadata_api.rb index cd5222051c2..0da95a5e8df 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/metadata_api.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/metadata_api.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb index aec6756aee3..dc36bc71dfb 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb index 8ed256abfc2..08ccf73bafb 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb index a685b4b90e0..8743363eed5 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb b/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb index cdbb78cd315..c28a7f3ff4d 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ require 'time' require 'typhoeus' + module OryHydraClient class ApiClient # The Configuration object holding settings to be used in the API client. @@ -45,9 +46,10 @@ def self.default # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -69,7 +71,9 @@ def call_api(http_method, path, opts = {}) end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -125,9 +129,7 @@ def build_request(http_method, path, opts = {}) end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -165,6 +167,8 @@ def build_request_body(header_params, form_params, body) # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -179,21 +183,24 @@ def download_file(request) prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) tempfile.write(chunk) end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end + # run the request to ensure the tempfile is created successfully before returning it + request.run + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + else + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") end + + tempfile end # Check if the given MIME is a JSON MIME. @@ -205,7 +212,7 @@ def download_file(request) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -214,15 +221,10 @@ def json_mime?(mime) # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -289,7 +291,7 @@ def convert_to_type(data, return_type) # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb b/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb index 61d79d62550..b981bfa6bfb 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb b/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb index c7b115e941b..06ebd38e11a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -62,6 +62,16 @@ class Configuration # Defines the access token (Bearer) used with OAuth2. attr_accessor :access_token + # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2. + # Overrides the access_token if set + # @return [Proc] + attr_accessor :access_token_getter + + # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) + # HTTP responses with return type `File` will be returned as a stream of binary data. + # Default to false. + attr_accessor :return_binary_data + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -69,6 +79,14 @@ class Configuration # @return [true, false] attr_accessor :debugging + # Set this to ignore operation servers for the API client. This is useful when you need to + # send requests to a different server than the one specified in the OpenAPI document. + # Will default to the base url defined in the spec but can be overridden by setting + # `scheme`, `host`, `base_path` directly. + # Default to false. + # @return [true, false] + attr_accessor :ignore_operation_servers + # Defines the logger used for debugging. # Default to `Rails.logger` (when in Rails) or logging to STDOUT. # @@ -142,7 +160,7 @@ def initialize @scheme = 'http' @host = 'localhost' @base_path = '' - @server_index = 0 + @server_index = nil @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -156,6 +174,7 @@ def initialize @timeout = 0 @params_encoding = nil @debugging = false + @ignore_operation_servers = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @@ -190,10 +209,13 @@ def base_path=(base_path) # Returns base URL for specified operation based on server settings def base_url(operation = nil) - index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil - - server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers + if operation_server_settings.key?(operation) then + index = server_operation_index.fetch(operation, server_index) + server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + else + server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) + end end # Gets API key (with prefix if set). @@ -208,6 +230,12 @@ def api_key_with_prefix(param_name, param_alias = nil) end end + # Gets access_token using access_token_getter or uses the static access_token + def access_token_with_refresh + return access_token if access_token_getter.nil? + access_token_getter.call + end + # Gets Basic Auth token string def basic_auth_token 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") @@ -228,14 +256,14 @@ def auth_settings type: 'bearer', in: 'header', key: 'Authorization', - value: "Bearer #{access_token}" + value: "Bearer #{access_token_with_refresh}" }, 'oauth2' => { type: 'oauth2', in: 'header', key: 'Authorization', - value: "Bearer #{access_token}" + value: "Bearer #{access_token_with_refresh}" }, } end @@ -263,8 +291,8 @@ def server_url(index, variables = {}, servers = nil) servers = server_settings if servers == nil # check array index out of bound - if (index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + if (index.nil? || index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" end server = servers[index] @@ -289,5 +317,6 @@ def server_url(index, variables = {}, servers = nil) url end + end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb index 6cf486b5ab3..d23dda29167 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -120,6 +120,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -127,6 +128,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -160,37 +162,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -225,7 +220,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb index 2209cf2952f..3a02d8cc419 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -77,6 +77,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -84,6 +85,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -112,37 +114,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -177,7 +172,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb index 16d6fc28bb1..ad495412c5b 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -133,12 +133,15 @@ def initialize(attributes = {}) if attributes.key?(:'subject') self.subject = attributes[:'subject'] + else + self.subject = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @subject.nil? invalid_properties.push('invalid value for "subject", subject cannot be nil.') @@ -150,6 +153,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @subject.nil? true end @@ -186,37 +190,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -251,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb index fcea34a0f4d..b4cbed5459c 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -71,20 +71,27 @@ def initialize(attributes = {}) if attributes.key?(:'alg') self.alg = attributes[:'alg'] + else + self.alg = nil end if attributes.key?(:'kid') self.kid = attributes[:'kid'] + else + self.kid = nil end if attributes.key?(:'use') self.use = attributes[:'use'] + else + self.use = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @alg.nil? invalid_properties.push('invalid value for "alg", alg cannot be nil.') @@ -104,6 +111,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @alg.nil? return false if @kid.nil? return false if @use.nil? @@ -136,37 +144,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -201,7 +202,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/create_verifiable_credential_request_body.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/create_verifiable_credential_request_body.rb index 448bf972132..27a1343d085 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/create_verifiable_credential_request_body.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/create_verifiable_credential_request_body.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -83,6 +83,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -90,6 +91,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -119,37 +121,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -184,7 +179,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/credential_supported_draft00.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/credential_supported_draft00.rb index 187c0419161..8d7097278ff 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/credential_supported_draft00.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/credential_supported_draft00.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -100,6 +100,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -107,6 +108,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -137,37 +139,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -202,7 +197,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb index 3a7f25bc9ab..5ef9fe54bb1 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -103,6 +103,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -110,6 +111,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -141,37 +143,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -206,7 +201,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/generic_error.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/generic_error.rb index 78a72a04171..fb8c8b23265 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/generic_error.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/generic_error.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -112,6 +112,8 @@ def initialize(attributes = {}) if attributes.key?(:'message') self.message = attributes[:'message'] + else + self.message = nil end if attributes.key?(:'reason') @@ -130,6 +132,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @message.nil? invalid_properties.push('invalid value for "message", message cannot be nil.') @@ -141,6 +144,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @message.nil? true end @@ -176,37 +180,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -241,7 +238,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb index 3b4f24692e8..083c8350d31 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -66,6 +66,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -73,6 +74,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -100,37 +102,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -165,7 +160,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/health_not_ready_status.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/health_not_ready_status.rb index cfb3452c55e..64b3f5d610a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/health_not_ready_status.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/health_not_ready_status.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -68,6 +68,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -75,6 +76,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -102,37 +104,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -167,7 +162,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/health_status.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/health_status.rb index deffd2d414e..15a0b1ebf3e 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/health_status.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/health_status.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -66,6 +66,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -73,6 +74,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -100,37 +102,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -165,7 +160,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb index 996208a2954..694703e4076 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -126,6 +126,8 @@ def initialize(attributes = {}) if attributes.key?(:'active') self.active = attributes[:'active'] + else + self.active = nil end if attributes.key?(:'aud') @@ -188,6 +190,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @active.nil? invalid_properties.push('invalid value for "active", active cannot be nil.') @@ -199,6 +202,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @active.nil? true end @@ -240,37 +244,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -305,7 +302,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb index 8f2f7f7203d..e0225b43df8 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -66,6 +66,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -73,6 +74,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -100,37 +102,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -165,7 +160,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb index d8e64df599b..001dddc18ca 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -68,6 +68,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -75,6 +76,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -102,37 +104,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -167,7 +162,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb index c1cc9c5b297..dc8a7fc7260 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -81,10 +81,14 @@ def initialize(attributes = {}) if attributes.key?(:'op') self.op = attributes[:'op'] + else + self.op = nil end if attributes.key?(:'path') self.path = attributes[:'path'] + else + self.path = nil end if attributes.key?(:'value') @@ -95,6 +99,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @op.nil? invalid_properties.push('invalid value for "op", op cannot be nil.') @@ -110,6 +115,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @op.nil? return false if @path.nil? true @@ -142,37 +148,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -207,7 +206,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key.rb index d52bc746ddd..b4ec1171fef 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -128,6 +128,8 @@ def initialize(attributes = {}) if attributes.key?(:'alg') self.alg = attributes[:'alg'] + else + self.alg = nil end if attributes.key?(:'crv') @@ -156,10 +158,14 @@ def initialize(attributes = {}) if attributes.key?(:'kid') self.kid = attributes[:'kid'] + else + self.kid = nil end if attributes.key?(:'kty') self.kty = attributes[:'kty'] + else + self.kty = nil end if attributes.key?(:'n') @@ -180,6 +186,8 @@ def initialize(attributes = {}) if attributes.key?(:'use') self.use = attributes[:'use'] + else + self.use = nil end if attributes.key?(:'x') @@ -200,6 +208,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @alg.nil? invalid_properties.push('invalid value for "alg", alg cannot be nil.') @@ -223,6 +232,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @alg.nil? return false if @kid.nil? return false if @kty.nil? @@ -270,37 +280,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -335,7 +338,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set.rb index 58b6f59ed35..26aaf0f389a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -69,6 +69,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -76,6 +77,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -103,37 +105,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -168,7 +163,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client.rb index 985c679a6d6..76c45eb4d46 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -501,6 +501,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ pattern @@ -558,6 +559,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) return false if !@authorization_code_grant_id_token_lifespan.nil? && @authorization_code_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) return false if !@authorization_code_grant_refresh_token_lifespan.nil? && @authorization_code_grant_refresh_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) @@ -574,8 +576,12 @@ def valid? # Custom attribute writer method with validation # @param [Object] authorization_code_grant_access_token_lifespan Value to be assigned def authorization_code_grant_access_token_lifespan=(authorization_code_grant_access_token_lifespan) + if authorization_code_grant_access_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_access_token_lifespan.nil? && authorization_code_grant_access_token_lifespan !~ pattern + if authorization_code_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -585,8 +591,12 @@ def authorization_code_grant_access_token_lifespan=(authorization_code_grant_acc # Custom attribute writer method with validation # @param [Object] authorization_code_grant_id_token_lifespan Value to be assigned def authorization_code_grant_id_token_lifespan=(authorization_code_grant_id_token_lifespan) + if authorization_code_grant_id_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_id_token_lifespan.nil? && authorization_code_grant_id_token_lifespan !~ pattern + if authorization_code_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -596,8 +606,12 @@ def authorization_code_grant_id_token_lifespan=(authorization_code_grant_id_toke # Custom attribute writer method with validation # @param [Object] authorization_code_grant_refresh_token_lifespan Value to be assigned def authorization_code_grant_refresh_token_lifespan=(authorization_code_grant_refresh_token_lifespan) + if authorization_code_grant_refresh_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_refresh_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_refresh_token_lifespan.nil? && authorization_code_grant_refresh_token_lifespan !~ pattern + if authorization_code_grant_refresh_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." end @@ -607,8 +621,12 @@ def authorization_code_grant_refresh_token_lifespan=(authorization_code_grant_re # Custom attribute writer method with validation # @param [Object] client_credentials_grant_access_token_lifespan Value to be assigned def client_credentials_grant_access_token_lifespan=(client_credentials_grant_access_token_lifespan) + if client_credentials_grant_access_token_lifespan.nil? + fail ArgumentError, 'client_credentials_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !client_credentials_grant_access_token_lifespan.nil? && client_credentials_grant_access_token_lifespan !~ pattern + if client_credentials_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -618,8 +636,12 @@ def client_credentials_grant_access_token_lifespan=(client_credentials_grant_acc # Custom attribute writer method with validation # @param [Object] implicit_grant_access_token_lifespan Value to be assigned def implicit_grant_access_token_lifespan=(implicit_grant_access_token_lifespan) + if implicit_grant_access_token_lifespan.nil? + fail ArgumentError, 'implicit_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !implicit_grant_access_token_lifespan.nil? && implicit_grant_access_token_lifespan !~ pattern + if implicit_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -629,8 +651,12 @@ def implicit_grant_access_token_lifespan=(implicit_grant_access_token_lifespan) # Custom attribute writer method with validation # @param [Object] implicit_grant_id_token_lifespan Value to be assigned def implicit_grant_id_token_lifespan=(implicit_grant_id_token_lifespan) + if implicit_grant_id_token_lifespan.nil? + fail ArgumentError, 'implicit_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !implicit_grant_id_token_lifespan.nil? && implicit_grant_id_token_lifespan !~ pattern + if implicit_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -640,8 +666,12 @@ def implicit_grant_id_token_lifespan=(implicit_grant_id_token_lifespan) # Custom attribute writer method with validation # @param [Object] jwt_bearer_grant_access_token_lifespan Value to be assigned def jwt_bearer_grant_access_token_lifespan=(jwt_bearer_grant_access_token_lifespan) + if jwt_bearer_grant_access_token_lifespan.nil? + fail ArgumentError, 'jwt_bearer_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !jwt_bearer_grant_access_token_lifespan.nil? && jwt_bearer_grant_access_token_lifespan !~ pattern + if jwt_bearer_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -651,8 +681,12 @@ def jwt_bearer_grant_access_token_lifespan=(jwt_bearer_grant_access_token_lifesp # Custom attribute writer method with validation # @param [Object] refresh_token_grant_access_token_lifespan Value to be assigned def refresh_token_grant_access_token_lifespan=(refresh_token_grant_access_token_lifespan) + if refresh_token_grant_access_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_access_token_lifespan.nil? && refresh_token_grant_access_token_lifespan !~ pattern + if refresh_token_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -662,8 +696,12 @@ def refresh_token_grant_access_token_lifespan=(refresh_token_grant_access_token_ # Custom attribute writer method with validation # @param [Object] refresh_token_grant_id_token_lifespan Value to be assigned def refresh_token_grant_id_token_lifespan=(refresh_token_grant_id_token_lifespan) + if refresh_token_grant_id_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_id_token_lifespan.nil? && refresh_token_grant_id_token_lifespan !~ pattern + if refresh_token_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -673,8 +711,12 @@ def refresh_token_grant_id_token_lifespan=(refresh_token_grant_id_token_lifespan # Custom attribute writer method with validation # @param [Object] refresh_token_grant_refresh_token_lifespan Value to be assigned def refresh_token_grant_refresh_token_lifespan=(refresh_token_grant_refresh_token_lifespan) + if refresh_token_grant_refresh_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_refresh_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_refresh_token_lifespan.nil? && refresh_token_grant_refresh_token_lifespan !~ pattern + if refresh_token_grant_refresh_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." end @@ -752,37 +794,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -817,7 +852,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb index 86f93d8bee5..97a8d494fbd 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -148,6 +148,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ pattern @@ -205,6 +206,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) return false if !@authorization_code_grant_id_token_lifespan.nil? && @authorization_code_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) return false if !@authorization_code_grant_refresh_token_lifespan.nil? && @authorization_code_grant_refresh_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) @@ -221,8 +223,12 @@ def valid? # Custom attribute writer method with validation # @param [Object] authorization_code_grant_access_token_lifespan Value to be assigned def authorization_code_grant_access_token_lifespan=(authorization_code_grant_access_token_lifespan) + if authorization_code_grant_access_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_access_token_lifespan.nil? && authorization_code_grant_access_token_lifespan !~ pattern + if authorization_code_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -232,8 +238,12 @@ def authorization_code_grant_access_token_lifespan=(authorization_code_grant_acc # Custom attribute writer method with validation # @param [Object] authorization_code_grant_id_token_lifespan Value to be assigned def authorization_code_grant_id_token_lifespan=(authorization_code_grant_id_token_lifespan) + if authorization_code_grant_id_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_id_token_lifespan.nil? && authorization_code_grant_id_token_lifespan !~ pattern + if authorization_code_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -243,8 +253,12 @@ def authorization_code_grant_id_token_lifespan=(authorization_code_grant_id_toke # Custom attribute writer method with validation # @param [Object] authorization_code_grant_refresh_token_lifespan Value to be assigned def authorization_code_grant_refresh_token_lifespan=(authorization_code_grant_refresh_token_lifespan) + if authorization_code_grant_refresh_token_lifespan.nil? + fail ArgumentError, 'authorization_code_grant_refresh_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !authorization_code_grant_refresh_token_lifespan.nil? && authorization_code_grant_refresh_token_lifespan !~ pattern + if authorization_code_grant_refresh_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." end @@ -254,8 +268,12 @@ def authorization_code_grant_refresh_token_lifespan=(authorization_code_grant_re # Custom attribute writer method with validation # @param [Object] client_credentials_grant_access_token_lifespan Value to be assigned def client_credentials_grant_access_token_lifespan=(client_credentials_grant_access_token_lifespan) + if client_credentials_grant_access_token_lifespan.nil? + fail ArgumentError, 'client_credentials_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !client_credentials_grant_access_token_lifespan.nil? && client_credentials_grant_access_token_lifespan !~ pattern + if client_credentials_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -265,8 +283,12 @@ def client_credentials_grant_access_token_lifespan=(client_credentials_grant_acc # Custom attribute writer method with validation # @param [Object] implicit_grant_access_token_lifespan Value to be assigned def implicit_grant_access_token_lifespan=(implicit_grant_access_token_lifespan) + if implicit_grant_access_token_lifespan.nil? + fail ArgumentError, 'implicit_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !implicit_grant_access_token_lifespan.nil? && implicit_grant_access_token_lifespan !~ pattern + if implicit_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -276,8 +298,12 @@ def implicit_grant_access_token_lifespan=(implicit_grant_access_token_lifespan) # Custom attribute writer method with validation # @param [Object] implicit_grant_id_token_lifespan Value to be assigned def implicit_grant_id_token_lifespan=(implicit_grant_id_token_lifespan) + if implicit_grant_id_token_lifespan.nil? + fail ArgumentError, 'implicit_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !implicit_grant_id_token_lifespan.nil? && implicit_grant_id_token_lifespan !~ pattern + if implicit_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -287,8 +313,12 @@ def implicit_grant_id_token_lifespan=(implicit_grant_id_token_lifespan) # Custom attribute writer method with validation # @param [Object] jwt_bearer_grant_access_token_lifespan Value to be assigned def jwt_bearer_grant_access_token_lifespan=(jwt_bearer_grant_access_token_lifespan) + if jwt_bearer_grant_access_token_lifespan.nil? + fail ArgumentError, 'jwt_bearer_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !jwt_bearer_grant_access_token_lifespan.nil? && jwt_bearer_grant_access_token_lifespan !~ pattern + if jwt_bearer_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -298,8 +328,12 @@ def jwt_bearer_grant_access_token_lifespan=(jwt_bearer_grant_access_token_lifesp # Custom attribute writer method with validation # @param [Object] refresh_token_grant_access_token_lifespan Value to be assigned def refresh_token_grant_access_token_lifespan=(refresh_token_grant_access_token_lifespan) + if refresh_token_grant_access_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_access_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_access_token_lifespan.nil? && refresh_token_grant_access_token_lifespan !~ pattern + if refresh_token_grant_access_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}." end @@ -309,8 +343,12 @@ def refresh_token_grant_access_token_lifespan=(refresh_token_grant_access_token_ # Custom attribute writer method with validation # @param [Object] refresh_token_grant_id_token_lifespan Value to be assigned def refresh_token_grant_id_token_lifespan=(refresh_token_grant_id_token_lifespan) + if refresh_token_grant_id_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_id_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_id_token_lifespan.nil? && refresh_token_grant_id_token_lifespan !~ pattern + if refresh_token_grant_id_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}." end @@ -320,8 +358,12 @@ def refresh_token_grant_id_token_lifespan=(refresh_token_grant_id_token_lifespan # Custom attribute writer method with validation # @param [Object] refresh_token_grant_refresh_token_lifespan Value to be assigned def refresh_token_grant_refresh_token_lifespan=(refresh_token_grant_refresh_token_lifespan) + if refresh_token_grant_refresh_token_lifespan.nil? + fail ArgumentError, 'refresh_token_grant_refresh_token_lifespan cannot be nil' + end + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) - if !refresh_token_grant_refresh_token_lifespan.nil? && refresh_token_grant_refresh_token_lifespan !~ pattern + if refresh_token_grant_refresh_token_lifespan !~ pattern fail ArgumentError, "invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." end @@ -361,37 +403,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -426,7 +461,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb index 6ed3fe530bd..b0d1391ab40 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -125,6 +125,8 @@ def initialize(attributes = {}) if attributes.key?(:'challenge') self.challenge = attributes[:'challenge'] + else + self.challenge = nil end if attributes.key?(:'client') @@ -175,6 +177,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @challenge.nil? invalid_properties.push('invalid value for "challenge", challenge cannot be nil.') @@ -186,6 +189,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @challenge.nil? true end @@ -226,37 +230,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -291,7 +288,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb index c01c5ed33a0..e583a9a65e7 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -108,6 +108,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -115,6 +116,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -146,37 +148,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -211,7 +206,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb index afcce0fb9eb..a006e7d1f34 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -137,6 +137,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -144,6 +145,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -179,37 +181,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -244,7 +239,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb index 4f974f9553e..11c98feb1b8 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -97,6 +97,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -104,6 +105,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -135,37 +137,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -200,7 +195,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb index f08d9d8f076..538a7823e99 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -96,10 +96,14 @@ def initialize(attributes = {}) if attributes.key?(:'challenge') self.challenge = attributes[:'challenge'] + else + self.challenge = nil end if attributes.key?(:'client') self.client = attributes[:'client'] + else + self.client = nil end if attributes.key?(:'oidc_context') @@ -108,6 +112,8 @@ def initialize(attributes = {}) if attributes.key?(:'request_url') self.request_url = attributes[:'request_url'] + else + self.request_url = nil end if attributes.key?(:'requested_access_token_audience') @@ -128,16 +134,21 @@ def initialize(attributes = {}) if attributes.key?(:'skip') self.skip = attributes[:'skip'] + else + self.skip = nil end if attributes.key?(:'subject') self.subject = attributes[:'subject'] + else + self.subject = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @challenge.nil? invalid_properties.push('invalid value for "challenge", challenge cannot be nil.') @@ -165,6 +176,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @challenge.nil? return false if @client.nil? return false if @request_url.nil? @@ -205,37 +217,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -270,7 +275,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb index 0c608cf7c07..cdf9430e03e 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -110,6 +110,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -117,6 +118,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -149,37 +151,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -214,7 +209,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb index 78945f07ec6..4715ee3047d 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -61,12 +61,15 @@ def initialize(attributes = {}) if attributes.key?(:'redirect_to') self.redirect_to = attributes[:'redirect_to'] + else + self.redirect_to = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @redirect_to.nil? invalid_properties.push('invalid value for "redirect_to", redirect_to cannot be nil.') @@ -78,6 +81,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @redirect_to.nil? true end @@ -106,37 +110,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -171,7 +168,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb index 0c9ffdb16e2..bd9f9717a12 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -112,6 +112,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -119,6 +120,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -151,37 +153,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -216,7 +211,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb index d79735c13e7..e6ac17c528a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -211,6 +211,8 @@ def initialize(attributes = {}) if attributes.key?(:'authorization_endpoint') self.authorization_endpoint = attributes[:'authorization_endpoint'] + else + self.authorization_endpoint = nil end if attributes.key?(:'backchannel_logout_session_supported') @@ -269,20 +271,28 @@ def initialize(attributes = {}) if (value = attributes[:'id_token_signed_response_alg']).is_a?(Array) self.id_token_signed_response_alg = value end + else + self.id_token_signed_response_alg = nil end if attributes.key?(:'id_token_signing_alg_values_supported') if (value = attributes[:'id_token_signing_alg_values_supported']).is_a?(Array) self.id_token_signing_alg_values_supported = value end + else + self.id_token_signing_alg_values_supported = nil end if attributes.key?(:'issuer') self.issuer = attributes[:'issuer'] + else + self.issuer = nil end if attributes.key?(:'jwks_uri') self.jwks_uri = attributes[:'jwks_uri'] + else + self.jwks_uri = nil end if attributes.key?(:'registration_endpoint') @@ -317,6 +327,8 @@ def initialize(attributes = {}) if (value = attributes[:'response_types_supported']).is_a?(Array) self.response_types_supported = value end + else + self.response_types_supported = nil end if attributes.key?(:'revocation_endpoint') @@ -333,10 +345,14 @@ def initialize(attributes = {}) if (value = attributes[:'subject_types_supported']).is_a?(Array) self.subject_types_supported = value end + else + self.subject_types_supported = nil end if attributes.key?(:'token_endpoint') self.token_endpoint = attributes[:'token_endpoint'] + else + self.token_endpoint = nil end if attributes.key?(:'token_endpoint_auth_methods_supported') @@ -353,6 +369,8 @@ def initialize(attributes = {}) if (value = attributes[:'userinfo_signed_response_alg']).is_a?(Array) self.userinfo_signed_response_alg = value end + else + self.userinfo_signed_response_alg = nil end if attributes.key?(:'userinfo_signing_alg_values_supported') @@ -365,6 +383,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @authorization_endpoint.nil? invalid_properties.push('invalid value for "authorization_endpoint", authorization_endpoint cannot be nil.') @@ -408,6 +427,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @authorization_endpoint.nil? return false if @id_token_signed_response_alg.nil? return false if @id_token_signing_alg_values_supported.nil? @@ -474,37 +494,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -539,7 +552,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb index 66f831439d8..4c13dace09a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -229,6 +229,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -236,6 +237,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -281,37 +283,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -346,7 +341,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb index 127d409669f..ca60635550e 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -79,6 +79,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@page_size.nil? && @page_size > 1000 invalid_properties.push('invalid value for "page_size", must be smaller than or equal to 1000.') @@ -94,6 +95,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@page_size.nil? && @page_size > 1000 return false if !@page_size.nil? && @page_size < 1 true @@ -102,11 +104,15 @@ def valid? # Custom attribute writer method with validation # @param [Object] page_size Value to be assigned def page_size=(page_size) - if !page_size.nil? && page_size > 1000 + if page_size.nil? + fail ArgumentError, 'page_size cannot be nil' + end + + if page_size > 1000 fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 1000.' end - if !page_size.nil? && page_size < 1 + if page_size < 1 fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' end @@ -116,6 +122,10 @@ def page_size=(page_size) # Custom attribute writer method with validation # @param [Object] page_token Value to be assigned def page_token=(page_token) + if page_token.nil? + fail ArgumentError, 'page_token cannot be nil' + end + @page_token = page_token end @@ -144,37 +154,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -209,7 +212,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb index 9230e2845f8..3ed0b8e20e2 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -75,6 +75,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -82,6 +83,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -110,37 +112,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -175,7 +170,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb index d3ebd2cf82e..526c4ee73ed 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -102,6 +102,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -109,6 +110,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -140,37 +142,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -205,7 +200,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/rfc6749_error_json.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/rfc6749_error_json.rb index 375b6367ea7..a09c4c7a1d4 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/rfc6749_error_json.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/rfc6749_error_json.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -97,6 +97,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -104,6 +105,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -135,37 +137,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -200,7 +195,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb index 65839162222..12da869e3f1 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -79,6 +79,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@page_size.nil? && @page_size > 1000 invalid_properties.push('invalid value for "page_size", must be smaller than or equal to 1000.') @@ -94,6 +95,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@page_size.nil? && @page_size > 1000 return false if !@page_size.nil? && @page_size < 1 true @@ -102,11 +104,15 @@ def valid? # Custom attribute writer method with validation # @param [Object] page_size Value to be assigned def page_size=(page_size) - if !page_size.nil? && page_size > 1000 + if page_size.nil? + fail ArgumentError, 'page_size cannot be nil' + end + + if page_size > 1000 fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 1000.' end - if !page_size.nil? && page_size < 1 + if page_size < 1 fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' end @@ -116,6 +122,10 @@ def page_size=(page_size) # Custom attribute writer method with validation # @param [Object] page_token Value to be assigned def page_token=(page_token) + if page_token.nil? + fail ArgumentError, 'page_token cannot be nil' + end + @page_token = page_token end @@ -144,37 +154,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -209,7 +212,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb index 060f82dacde..a0fcb47ad9a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -75,6 +75,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -82,6 +83,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -110,37 +112,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -175,7 +170,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb index aeb0f15bbb0..29a31722d6a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -80,6 +80,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@page_size.nil? && @page_size > 500 invalid_properties.push('invalid value for "page_size", must be smaller than or equal to 500.') @@ -95,6 +96,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@page_size.nil? && @page_size > 500 return false if !@page_size.nil? && @page_size < 1 true @@ -103,11 +105,15 @@ def valid? # Custom attribute writer method with validation # @param [Object] page_size Value to be assigned def page_size=(page_size) - if !page_size.nil? && page_size > 500 + if page_size.nil? + fail ArgumentError, 'page_size cannot be nil' + end + + if page_size > 500 fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 500.' end - if !page_size.nil? && page_size < 1 + if page_size < 1 fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' end @@ -117,6 +123,10 @@ def page_size=(page_size) # Custom attribute writer method with validation # @param [Object] page_token Value to be assigned def page_token=(page_token) + if page_token.nil? + fail ArgumentError, 'page_token cannot be nil' + end + @page_token = page_token end @@ -145,37 +155,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -210,7 +213,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb index 2e2ea09db68..59b490441d6 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -76,6 +76,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -83,6 +84,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -111,37 +113,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -176,7 +171,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb index 842daa60cb5..d5bdd752d2d 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -89,20 +89,28 @@ def initialize(attributes = {}) if attributes.key?(:'expires_at') self.expires_at = attributes[:'expires_at'] + else + self.expires_at = nil end if attributes.key?(:'issuer') self.issuer = attributes[:'issuer'] + else + self.issuer = nil end if attributes.key?(:'jwk') self.jwk = attributes[:'jwk'] + else + self.jwk = nil end if attributes.key?(:'scope') if (value = attributes[:'scope']).is_a?(Array) self.scope = value end + else + self.scope = nil end if attributes.key?(:'subject') @@ -113,6 +121,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @expires_at.nil? invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.') @@ -136,6 +145,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' return false if @expires_at.nil? return false if @issuer.nil? return false if @jwk.nil? @@ -172,37 +182,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -237,7 +240,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb index 5adfadbb5d4..53976cb3006 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -130,6 +130,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -137,6 +138,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -171,37 +173,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -236,7 +231,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb index e2bc15bb761..52bfdd69e01 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -76,6 +76,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -83,6 +84,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -111,37 +113,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -176,7 +171,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_priming_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_priming_response.rb index 7eeab957f23..198e29563b7 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_priming_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_priming_response.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -121,6 +121,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -128,6 +129,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -162,37 +164,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -227,7 +222,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_proof.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_proof.rb index f8da5b6a417..3454d02eee2 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_proof.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_proof.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -73,6 +73,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -80,6 +81,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -108,37 +110,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -173,7 +168,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_response.rb index 9768e9d4c19..c543fb6dd33 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/verifiable_credential_response.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -73,6 +73,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -80,6 +81,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -108,37 +110,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -173,7 +168,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb index 69881793f31..f975d35fc82 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -66,6 +66,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -73,6 +74,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -100,37 +102,30 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end - - self + new(transformed_hash) end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def _deserialize(type, value) + def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) @@ -165,7 +160,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = OryHydraClient.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/version.rb b/clients/hydra/ruby/lib/ory-hydra-client/version.rb index c020154d21f..2df245faaf4 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/version.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/version.rb @@ -3,13 +3,13 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: 2.2.0 +The version of the OpenAPI document: 2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end module OryHydraClient - VERSION = '2.2.0' + VERSION = '2.2.1' end diff --git a/clients/hydra/ruby/ory-hydra-client.gemspec b/clients/hydra/ruby/ory-hydra-client.gemspec index 30f1f62fab5..6c7acf4d852 100644 --- a/clients/hydra/ruby/ory-hydra-client.gemspec +++ b/clients/hydra/ruby/ory-hydra-client.gemspec @@ -5,10 +5,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -25,7 +25,8 @@ Gem::Specification.new do |s| s.summary = "Ory Hydra API Ruby Gem" s.description = "Documentation for all of Ory Hydra's APIs. " s.license = "Apache-2.0" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" + s.metadata = {} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/clients/hydra/ruby/spec/api/jwk_api_spec.rb b/clients/hydra/ruby/spec/api/jwk_api_spec.rb index 1f0d2d1a487..ace2188c38d 100644 --- a/clients/hydra/ruby/spec/api/jwk_api_spec.rb +++ b/clients/hydra/ruby/spec/api/jwk_api_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -41,7 +41,7 @@ # @return [JsonWebKeySet] describe 'create_json_web_key_set test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -54,7 +54,7 @@ # @return [nil] describe 'delete_json_web_key test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -66,7 +66,7 @@ # @return [nil] describe 'delete_json_web_key_set test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -79,7 +79,7 @@ # @return [JsonWebKeySet] describe 'get_json_web_key test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -91,7 +91,7 @@ # @return [JsonWebKeySet] describe 'get_json_web_key_set test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -105,7 +105,7 @@ # @return [JsonWebKey] describe 'set_json_web_key test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -118,7 +118,7 @@ # @return [JsonWebKeySet] describe 'set_json_web_key_set test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/api/metadata_api_spec.rb b/clients/hydra/ruby/spec/api/metadata_api_spec.rb index 359fe690378..2eeaec621d7 100644 --- a/clients/hydra/ruby/spec/api/metadata_api_spec.rb +++ b/clients/hydra/ruby/spec/api/metadata_api_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -39,7 +39,7 @@ # @return [GetVersion200Response] describe 'get_version test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -50,7 +50,7 @@ # @return [HealthStatus] describe 'is_alive test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -61,7 +61,7 @@ # @return [IsReady200Response] describe 'is_ready test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/api/o_auth2_api_spec.rb b/clients/hydra/ruby/spec/api/o_auth2_api_spec.rb index 39a0bd1dca1..95f5e1296a0 100644 --- a/clients/hydra/ruby/spec/api/o_auth2_api_spec.rb +++ b/clients/hydra/ruby/spec/api/o_auth2_api_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -41,7 +41,7 @@ # @return [OAuth2RedirectTo] describe 'accept_o_auth2_consent_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -54,7 +54,7 @@ # @return [OAuth2RedirectTo] describe 'accept_o_auth2_login_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -66,7 +66,7 @@ # @return [OAuth2RedirectTo] describe 'accept_o_auth2_logout_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -78,7 +78,7 @@ # @return [OAuth2Client] describe 'create_o_auth2_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -90,7 +90,7 @@ # @return [nil] describe 'delete_o_auth2_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -102,7 +102,7 @@ # @return [nil] describe 'delete_o_auth2_token test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -114,7 +114,7 @@ # @return [nil] describe 'delete_trusted_o_auth2_jwt_grant_issuer test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -126,7 +126,7 @@ # @return [OAuth2Client] describe 'get_o_auth2_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -138,7 +138,7 @@ # @return [OAuth2ConsentRequest] describe 'get_o_auth2_consent_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -150,7 +150,7 @@ # @return [OAuth2LoginRequest] describe 'get_o_auth2_login_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -162,7 +162,7 @@ # @return [OAuth2LogoutRequest] describe 'get_o_auth2_logout_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -174,7 +174,7 @@ # @return [TrustedOAuth2JwtGrantIssuer] describe 'get_trusted_o_auth2_jwt_grant_issuer test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -187,7 +187,7 @@ # @return [IntrospectedOAuth2Token] describe 'introspect_o_auth2_token test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -202,7 +202,7 @@ # @return [Array] describe 'list_o_auth2_clients test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -217,7 +217,7 @@ # @return [Array] describe 'list_o_auth2_consent_sessions test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -231,7 +231,7 @@ # @return [Array] describe 'list_trusted_o_auth2_jwt_grant_issuers test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -242,7 +242,7 @@ # @return [ErrorOAuth2] describe 'o_auth2_authorize test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -258,7 +258,7 @@ # @return [OAuth2TokenExchange] describe 'oauth2_token_exchange test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -271,7 +271,7 @@ # @return [OAuth2Client] describe 'patch_o_auth2_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -284,7 +284,7 @@ # @return [OAuth2RedirectTo] describe 'reject_o_auth2_consent_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -297,7 +297,7 @@ # @return [OAuth2RedirectTo] describe 'reject_o_auth2_login_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -309,7 +309,7 @@ # @return [nil] describe 'reject_o_auth2_logout_request test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -323,7 +323,7 @@ # @return [nil] describe 'revoke_o_auth2_consent_sessions test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -336,7 +336,7 @@ # @return [nil] describe 'revoke_o_auth2_login_sessions test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -350,7 +350,7 @@ # @return [nil] describe 'revoke_o_auth2_token test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -363,7 +363,7 @@ # @return [OAuth2Client] describe 'set_o_auth2_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -376,7 +376,7 @@ # @return [OAuth2Client] describe 'set_o_auth2_client_lifespans test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -388,7 +388,7 @@ # @return [TrustedOAuth2JwtGrantIssuer] describe 'trust_o_auth2_jwt_grant_issuer test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/api/oidc_api_spec.rb b/clients/hydra/ruby/spec/api/oidc_api_spec.rb index 660115d4f04..bd64ff8e416 100644 --- a/clients/hydra/ruby/spec/api/oidc_api_spec.rb +++ b/clients/hydra/ruby/spec/api/oidc_api_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -40,7 +40,7 @@ # @return [OAuth2Client] describe 'create_oidc_dynamic_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -52,7 +52,7 @@ # @return [VerifiableCredentialResponse] describe 'create_verifiable_credential test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -64,7 +64,7 @@ # @return [nil] describe 'delete_oidc_dynamic_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -75,7 +75,7 @@ # @return [OidcConfiguration] describe 'discover_oidc_configuration test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -87,7 +87,7 @@ # @return [OAuth2Client] describe 'get_oidc_dynamic_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -98,7 +98,7 @@ # @return [OidcUserInfo] describe 'get_oidc_user_info test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -109,7 +109,7 @@ # @return [nil] describe 'revoke_oidc_session test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end @@ -122,7 +122,7 @@ # @return [OAuth2Client] describe 'set_oidc_dynamic_client test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/api/wellknown_api_spec.rb b/clients/hydra/ruby/spec/api/wellknown_api_spec.rb index 210acbe2c0e..16c61807fc8 100644 --- a/clients/hydra/ruby/spec/api/wellknown_api_spec.rb +++ b/clients/hydra/ruby/spec/api/wellknown_api_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -39,7 +39,7 @@ # @return [JsonWebKeySet] describe 'discover_json_web_keys test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/api_client_spec.rb b/clients/hydra/ruby/spec/api_client_spec.rb deleted file mode 100644 index 6a2e5bfff5a..00000000000 --- a/clients/hydra/ruby/spec/api_client_spec.rb +++ /dev/null @@ -1,226 +0,0 @@ -=begin -#Ory Hydra API - -#Documentation for all of Ory Hydra's APIs. - -The version of the OpenAPI document: v2.2.0 -Contact: hi@ory.sh -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 - -=end - -require 'spec_helper' - -describe OryHydraClient::ApiClient do - context 'initialization' do - context 'URL stuff' do - context 'host' do - it 'removes http from host' do - OryHydraClient.configure { |c| c.host = 'http://example.com' } - expect(OryHydraClient::Configuration.default.host).to eq('example.com') - end - - it 'removes https from host' do - OryHydraClient.configure { |c| c.host = 'https://wookiee.com' } - expect(OryHydraClient::ApiClient.default.config.host).to eq('wookiee.com') - end - - it 'removes trailing path from host' do - OryHydraClient.configure { |c| c.host = 'hobo.com/v4' } - expect(OryHydraClient::Configuration.default.host).to eq('hobo.com') - end - end - - context 'base_path' do - it "prepends a slash to base_path" do - OryHydraClient.configure { |c| c.base_path = 'v4/dog' } - expect(OryHydraClient::Configuration.default.base_path).to eq('/v4/dog') - end - - it "doesn't prepend a slash if one is already there" do - OryHydraClient.configure { |c| c.base_path = '/v4/dog' } - expect(OryHydraClient::Configuration.default.base_path).to eq('/v4/dog') - end - - it "ends up as a blank string if nil" do - OryHydraClient.configure { |c| c.base_path = nil } - expect(OryHydraClient::Configuration.default.base_path).to eq('') - end - end - end - end - - describe 'params_encoding in #build_request' do - let(:config) { OryHydraClient::Configuration.new } - let(:api_client) { OryHydraClient::ApiClient.new(config) } - - it 'defaults to nil' do - expect(OryHydraClient::Configuration.default.params_encoding).to eq(nil) - expect(config.params_encoding).to eq(nil) - - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(nil) - end - - it 'can be customized' do - config.params_encoding = :multi - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(:multi) - end - end - - describe 'timeout in #build_request' do - let(:config) { OryHydraClient::Configuration.new } - let(:api_client) { OryHydraClient::ApiClient.new(config) } - - it 'defaults to 0' do - expect(OryHydraClient::Configuration.default.timeout).to eq(0) - expect(config.timeout).to eq(0) - - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(0) - end - - it 'can be customized' do - config.timeout = 100 - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(100) - end - end - - describe '#deserialize' do - it "handles Array" do - api_client = OryHydraClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[12, 34]') - data = api_client.deserialize(response, 'Array') - expect(data).to be_instance_of(Array) - expect(data).to eq([12, 34]) - end - - it 'handles Array>' do - api_client = OryHydraClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[[12, 34], [56]]') - data = api_client.deserialize(response, 'Array>') - expect(data).to be_instance_of(Array) - expect(data).to eq([[12, 34], [56]]) - end - - it 'handles Hash' do - api_client = OryHydraClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '{"message": "Hello"}') - data = api_client.deserialize(response, 'Hash') - expect(data).to be_instance_of(Hash) - expect(data).to eq(:message => 'Hello') - end - end - - describe "#object_to_hash" do - it 'ignores nils and includes empty arrays' do - # uncomment below to test object_to_hash for model - # api_client = OryHydraClient::ApiClient.new - # _model = OryHydraClient::ModelName.new - # update the model attribute below - # _model.id = 1 - # update the expected value (hash) below - # expected = {id: 1, name: '', tags: []} - # expect(api_client.object_to_hash(_model)).to eq(expected) - end - end - - describe '#build_collection_param' do - let(:param) { ['aa', 'bb', 'cc'] } - let(:api_client) { OryHydraClient::ApiClient.new } - - it 'works for csv' do - expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') - end - - it 'works for ssv' do - expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc') - end - - it 'works for tsv' do - expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc") - end - - it 'works for pipes' do - expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc') - end - - it 'works for multi' do - expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc']) - end - - it 'fails for invalid collection format' do - expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID') - end - end - - describe '#json_mime?' do - let(:api_client) { OryHydraClient::ApiClient.new } - - it 'works' do - expect(api_client.json_mime?(nil)).to eq false - expect(api_client.json_mime?('')).to eq false - - expect(api_client.json_mime?('application/json')).to eq true - expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true - expect(api_client.json_mime?('APPLICATION/JSON')).to eq true - - expect(api_client.json_mime?('application/xml')).to eq false - expect(api_client.json_mime?('text/plain')).to eq false - expect(api_client.json_mime?('application/jsonp')).to eq false - end - end - - describe '#select_header_accept' do - let(:api_client) { OryHydraClient::ApiClient.new } - - it 'works' do - expect(api_client.select_header_accept(nil)).to be_nil - expect(api_client.select_header_accept([])).to be_nil - - expect(api_client.select_header_accept(['application/json'])).to eq('application/json') - expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - - expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml') - end - end - - describe '#select_header_content_type' do - let(:api_client) { OryHydraClient::ApiClient.new } - - it 'works' do - expect(api_client.select_header_content_type(nil)).to be_nil - expect(api_client.select_header_content_type([])).to be_nil - - expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') - expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain') - end - end - - describe '#sanitize_filename' do - let(:api_client) { OryHydraClient::ApiClient.new } - - it 'works' do - expect(api_client.sanitize_filename('sun')).to eq('sun') - expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif') - end - end -end diff --git a/clients/hydra/ruby/spec/configuration_spec.rb b/clients/hydra/ruby/spec/configuration_spec.rb deleted file mode 100644 index 0fa7e54f288..00000000000 --- a/clients/hydra/ruby/spec/configuration_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Ory Hydra API - -#Documentation for all of Ory Hydra's APIs. - -The version of the OpenAPI document: v2.2.0 -Contact: hi@ory.sh -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 - -=end - -require 'spec_helper' - -describe OryHydraClient::Configuration do - let(:config) { OryHydraClient::Configuration.default } - - before(:each) do - # uncomment below to setup host and base_path - # require 'URI' - # uri = URI.parse("http://localhost") - # OryHydraClient.configure do |c| - # c.host = uri.host - # c.base_path = uri.path - # end - end - - describe '#base_url' do - it 'should have the default value' do - # uncomment below to test default value of the base path - # expect(config.base_url).to eq("http://localhost") - end - - it 'should remove trailing slashes' do - [nil, '', '/', '//'].each do |base_path| - config.base_path = base_path - # uncomment below to test trailing slashes - # expect(config.base_url).to eq("http://localhost") - end - end - end -end diff --git a/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb index cd9b8625069..55173c1da11 100644 --- a/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of AcceptOAuth2ConsentRequestSession' do it 'should create an instance of AcceptOAuth2ConsentRequestSession' do - expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequestSession) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequestSession) end end + describe 'test attribute "access_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb index 2141d7a45c3..3ddd258c466 100644 --- a/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,48 +22,50 @@ describe 'test an instance of AcceptOAuth2ConsentRequest' do it 'should create an instance of AcceptOAuth2ConsentRequest' do - expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequest) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequest) end end + describe 'test attribute "context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_access_token_audience"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "handled_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember_for"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "session"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb index 562c526d090..e05f2508e1c 100644 --- a/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,60 +22,62 @@ describe 'test an instance of AcceptOAuth2LoginRequest' do it 'should create an instance of AcceptOAuth2LoginRequest' do - expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2LoginRequest) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2LoginRequest) end end + describe 'test attribute "acr"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "amr"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "extend_session_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "force_subject_identifier"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "identity_provider_session_id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember_for"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb b/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb index 87175c06478..95b702bba57 100644 --- a/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb +++ b/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,24 +22,26 @@ describe 'test an instance of CreateJsonWebKeySet' do it 'should create an instance of CreateJsonWebKeySet' do - expect(instance).to be_instance_of(OryHydraClient::CreateJsonWebKeySet) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::CreateJsonWebKeySet) end end + describe 'test attribute "alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "kid"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "use"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/create_verifiable_credential_request_body_spec.rb b/clients/hydra/ruby/spec/models/create_verifiable_credential_request_body_spec.rb index 00c585e82a7..20753b38799 100644 --- a/clients/hydra/ruby/spec/models/create_verifiable_credential_request_body_spec.rb +++ b/clients/hydra/ruby/spec/models/create_verifiable_credential_request_body_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,24 +22,26 @@ describe 'test an instance of CreateVerifiableCredentialRequestBody' do it 'should create an instance of CreateVerifiableCredentialRequestBody' do - expect(instance).to be_instance_of(OryHydraClient::CreateVerifiableCredentialRequestBody) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::CreateVerifiableCredentialRequestBody) end end + describe 'test attribute "format"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "proof"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "types"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/credential_supported_draft00_spec.rb b/clients/hydra/ruby/spec/models/credential_supported_draft00_spec.rb index d82420e8b81..a144a4fea51 100644 --- a/clients/hydra/ruby/spec/models/credential_supported_draft00_spec.rb +++ b/clients/hydra/ruby/spec/models/credential_supported_draft00_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,30 +22,32 @@ describe 'test an instance of CredentialSupportedDraft00' do it 'should create an instance of CredentialSupportedDraft00' do - expect(instance).to be_instance_of(OryHydraClient::CredentialSupportedDraft00) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::CredentialSupportedDraft00) end end + describe 'test attribute "cryptographic_binding_methods_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "cryptographic_suites_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "format"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "types"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb b/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb index 0dec476e15f..6245e1e93ec 100644 --- a/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb +++ b/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,36 +22,38 @@ describe 'test an instance of ErrorOAuth2' do it 'should create an instance of ErrorOAuth2' do - expect(instance).to be_instance_of(OryHydraClient::ErrorOAuth2) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::ErrorOAuth2) end end + describe 'test attribute "error"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_debug"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_description"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_hint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "status_code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/generic_error_spec.rb b/clients/hydra/ruby/spec/models/generic_error_spec.rb index a87003cd81b..599394e7353 100644 --- a/clients/hydra/ruby/spec/models/generic_error_spec.rb +++ b/clients/hydra/ruby/spec/models/generic_error_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,54 +22,56 @@ describe 'test an instance of GenericError' do it 'should create an instance of GenericError' do - expect(instance).to be_instance_of(OryHydraClient::GenericError) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::GenericError) end end + describe 'test attribute "code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "debug"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "details"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "message"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "reason"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "status"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/get_version200_response_spec.rb b/clients/hydra/ruby/spec/models/get_version200_response_spec.rb index 9a3ea0d95dd..cc64ae5a4b5 100644 --- a/clients/hydra/ruby/spec/models/get_version200_response_spec.rb +++ b/clients/hydra/ruby/spec/models/get_version200_response_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of GetVersion200Response' do it 'should create an instance of GetVersion200Response' do - expect(instance).to be_instance_of(OryHydraClient::GetVersion200Response) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::GetVersion200Response) end end + describe 'test attribute "version"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/health_not_ready_status_spec.rb b/clients/hydra/ruby/spec/models/health_not_ready_status_spec.rb index 5f24c8b98b6..a04acb65a79 100644 --- a/clients/hydra/ruby/spec/models/health_not_ready_status_spec.rb +++ b/clients/hydra/ruby/spec/models/health_not_ready_status_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of HealthNotReadyStatus' do it 'should create an instance of HealthNotReadyStatus' do - expect(instance).to be_instance_of(OryHydraClient::HealthNotReadyStatus) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::HealthNotReadyStatus) end end + describe 'test attribute "errors"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/health_status_spec.rb b/clients/hydra/ruby/spec/models/health_status_spec.rb index 311fb60e4ce..b0514d11979 100644 --- a/clients/hydra/ruby/spec/models/health_status_spec.rb +++ b/clients/hydra/ruby/spec/models/health_status_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of HealthStatus' do it 'should create an instance of HealthStatus' do - expect(instance).to be_instance_of(OryHydraClient::HealthStatus) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::HealthStatus) end end + describe 'test attribute "status"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb b/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb index 561d77214ff..1e3e733a0e0 100644 --- a/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb +++ b/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,90 +22,92 @@ describe 'test an instance of IntrospectedOAuth2Token' do it 'should create an instance of IntrospectedOAuth2Token' do - expect(instance).to be_instance_of(OryHydraClient::IntrospectedOAuth2Token) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::IntrospectedOAuth2Token) end end + describe 'test attribute "active"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "aud"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "exp"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "ext"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "iat"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "iss"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "nbf"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "obfuscated_subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "sub"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_type"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_use"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "username"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb b/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb index 72b56fe8a3e..b2e7f4410ce 100644 --- a/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb +++ b/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of IsReady200Response' do it 'should create an instance of IsReady200Response' do - expect(instance).to be_instance_of(OryHydraClient::IsReady200Response) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::IsReady200Response) end end + describe 'test attribute "status"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/is_ready503_response_spec.rb b/clients/hydra/ruby/spec/models/is_ready503_response_spec.rb index e39308b0779..c9f8a903e9d 100644 --- a/clients/hydra/ruby/spec/models/is_ready503_response_spec.rb +++ b/clients/hydra/ruby/spec/models/is_ready503_response_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of IsReady503Response' do it 'should create an instance of IsReady503Response' do - expect(instance).to be_instance_of(OryHydraClient::IsReady503Response) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::IsReady503Response) end end + describe 'test attribute "errors"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/json_patch_spec.rb b/clients/hydra/ruby/spec/models/json_patch_spec.rb index 20f6b860dc6..66fb5f34de5 100644 --- a/clients/hydra/ruby/spec/models/json_patch_spec.rb +++ b/clients/hydra/ruby/spec/models/json_patch_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,30 +22,32 @@ describe 'test an instance of JsonPatch' do it 'should create an instance of JsonPatch' do - expect(instance).to be_instance_of(OryHydraClient::JsonPatch) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::JsonPatch) end end + describe 'test attribute "from"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "op"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "path"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "value"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/json_web_key_set_spec.rb b/clients/hydra/ruby/spec/models/json_web_key_set_spec.rb index 56e62a90575..5f4a684df84 100644 --- a/clients/hydra/ruby/spec/models/json_web_key_set_spec.rb +++ b/clients/hydra/ruby/spec/models/json_web_key_set_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of JsonWebKeySet' do it 'should create an instance of JsonWebKeySet' do - expect(instance).to be_instance_of(OryHydraClient::JsonWebKeySet) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::JsonWebKeySet) end end + describe 'test attribute "keys"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/json_web_key_spec.rb b/clients/hydra/ruby/spec/models/json_web_key_spec.rb index af45ac2c2a2..d470398f9b5 100644 --- a/clients/hydra/ruby/spec/models/json_web_key_spec.rb +++ b/clients/hydra/ruby/spec/models/json_web_key_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,108 +22,110 @@ describe 'test an instance of JsonWebKey' do it 'should create an instance of JsonWebKey' do - expect(instance).to be_instance_of(OryHydraClient::JsonWebKey) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::JsonWebKey) end end + describe 'test attribute "alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "crv"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "d"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "dp"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "dq"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "e"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "k"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "kid"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "kty"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "n"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "p"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "q"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "qi"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "use"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "x"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "x5c"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "y"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb index 46542a03221..4959769835c 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,294 +22,296 @@ describe 'test an instance of OAuth2Client' do it 'should create an instance of OAuth2Client' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2Client) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2Client) end end + describe 'test attribute "access_token_strategy"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "allowed_cors_origins"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "audience"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorization_code_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorization_code_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorization_code_grant_refresh_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "backchannel_logout_session_required"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "backchannel_logout_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_credentials_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_name"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_secret"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_secret_expires_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "contacts"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "created_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "frontchannel_logout_session_required"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "frontchannel_logout_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_types"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "implicit_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "implicit_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwks"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwks_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwt_bearer_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "logo_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "metadata"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "owner"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "policy_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "post_logout_redirect_uris"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "redirect_uris"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_refresh_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "registration_access_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "registration_client_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_object_signing_alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_uris"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "response_types"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "sector_identifier_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "skip_consent"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "skip_logout_consent"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject_type"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_endpoint_auth_method"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_endpoint_auth_signing_alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "tos_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "updated_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "userinfo_signed_response_alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb index c46f58fe5d6..0f15d8e07cc 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,66 +22,68 @@ describe 'test an instance of OAuth2ClientTokenLifespans' do it 'should create an instance of OAuth2ClientTokenLifespans' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2ClientTokenLifespans) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2ClientTokenLifespans) end end + describe 'test attribute "authorization_code_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorization_code_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorization_code_grant_refresh_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client_credentials_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "implicit_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "implicit_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwt_bearer_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_access_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_id_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token_grant_refresh_token_lifespan"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb index 711965fae70..7ee6e965dc4 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,36 +22,38 @@ describe 'test an instance of OAuth2ConsentRequestOpenIDConnectContext' do it 'should create an instance of OAuth2ConsentRequestOpenIDConnectContext' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext) end end + describe 'test attribute "acr_values"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "display"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token_hint_claims"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "login_hint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "ui_locales"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb index 93bc0bb859d..bbf89381720 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,84 +22,86 @@ describe 'test an instance of OAuth2ConsentRequest' do it 'should create an instance of OAuth2ConsentRequest' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequest) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequest) end end + describe 'test attribute "acr"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "amr"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "challenge"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "login_challenge"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "login_session_id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "oidc_context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_url"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "requested_access_token_audience"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "requested_scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "skip"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb index 3f4427b8a3b..faa427f2da8 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,36 +22,38 @@ describe 'test an instance of OAuth2ConsentSessionExpiresAt' do it 'should create an instance of OAuth2ConsentSessionExpiresAt' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentSessionExpiresAt) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentSessionExpiresAt) end end + describe 'test attribute "access_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "authorize_code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "par_context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb index c3556e3214f..ca27b4f8fc5 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,60 +22,62 @@ describe 'test an instance of OAuth2ConsentSession' do it 'should create an instance of OAuth2ConsentSession' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentSession) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentSession) end end + describe 'test attribute "consent_request"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "expires_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_access_token_audience"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "handled_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "remember_for"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "session"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb index 59749303881..eb873f5fa17 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,60 +22,62 @@ describe 'test an instance of OAuth2LoginRequest' do it 'should create an instance of OAuth2LoginRequest' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2LoginRequest) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2LoginRequest) end end + describe 'test attribute "challenge"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "oidc_context"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_url"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "requested_access_token_audience"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "requested_scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "session_id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "skip"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb index a63215ecd75..6bb7d58a1e9 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,42 +22,44 @@ describe 'test an instance of OAuth2LogoutRequest' do it 'should create an instance of OAuth2LogoutRequest' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2LogoutRequest) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2LogoutRequest) end end + describe 'test attribute "challenge"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "client"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_url"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "rp_initiated"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "sid"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb index b2e060b458b..0a7b36973fc 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of OAuth2RedirectTo' do it 'should create an instance of OAuth2RedirectTo' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2RedirectTo) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2RedirectTo) end end + describe 'test attribute "redirect_to"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb index d2700379ab2..733dfaf0d59 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,42 +22,44 @@ describe 'test an instance of OAuth2TokenExchange' do it 'should create an instance of OAuth2TokenExchange' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2TokenExchange) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OAuth2TokenExchange) end end + describe 'test attribute "access_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "expires_in"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "refresh_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_type"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb b/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb index 32004f3281e..734c4d7a680 100644 --- a/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb +++ b/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,192 +22,194 @@ describe 'test an instance of OidcConfiguration' do it 'should create an instance of OidcConfiguration' do - expect(instance).to be_instance_of(OryHydraClient::OidcConfiguration) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OidcConfiguration) end end + describe 'test attribute "authorization_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "backchannel_logout_session_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "backchannel_logout_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "claims_parameter_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "claims_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "code_challenge_methods_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "credentials_endpoint_draft_00"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "credentials_supported_draft_00"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "end_session_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "frontchannel_logout_session_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "frontchannel_logout_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "grant_types_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token_signed_response_alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id_token_signing_alg_values_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "issuer"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwks_uri"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "registration_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_object_signing_alg_values_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_parameter_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "request_uri_parameter_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "require_request_uri_registration"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "response_modes_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "response_types_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "revocation_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scopes_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject_types_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "token_endpoint_auth_methods_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "userinfo_endpoint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "userinfo_signed_response_alg"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "userinfo_signing_alg_values_supported"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb b/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb index 4a90ba3a8ea..0ae85273042 100644 --- a/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb +++ b/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,120 +22,122 @@ describe 'test an instance of OidcUserInfo' do it 'should create an instance of OidcUserInfo' do - expect(instance).to be_instance_of(OryHydraClient::OidcUserInfo) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::OidcUserInfo) end end + describe 'test attribute "birthdate"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "email"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "email_verified"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "family_name"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "gender"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "given_name"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "locale"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "middle_name"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "name"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "nickname"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "phone_number"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "phone_number_verified"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "picture"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "preferred_username"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "profile"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "sub"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "updated_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "website"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "zoneinfo"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/pagination_headers_spec.rb b/clients/hydra/ruby/spec/models/pagination_headers_spec.rb index c8f4cafc5fc..195df1a3921 100644 --- a/clients/hydra/ruby/spec/models/pagination_headers_spec.rb +++ b/clients/hydra/ruby/spec/models/pagination_headers_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of PaginationHeaders' do it 'should create an instance of PaginationHeaders' do - expect(instance).to be_instance_of(OryHydraClient::PaginationHeaders) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::PaginationHeaders) end end + describe 'test attribute "link"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "x_total_count"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/pagination_spec.rb b/clients/hydra/ruby/spec/models/pagination_spec.rb index ee71258a549..3ee6b27fd0a 100644 --- a/clients/hydra/ruby/spec/models/pagination_spec.rb +++ b/clients/hydra/ruby/spec/models/pagination_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of Pagination' do it 'should create an instance of Pagination' do - expect(instance).to be_instance_of(OryHydraClient::Pagination) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::Pagination) end end + describe 'test attribute "page_size"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "page_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb b/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb index 928caccbe6e..a2b5a1260e3 100644 --- a/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb +++ b/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,36 +22,38 @@ describe 'test an instance of RejectOAuth2Request' do it 'should create an instance of RejectOAuth2Request' do - expect(instance).to be_instance_of(OryHydraClient::RejectOAuth2Request) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::RejectOAuth2Request) end end + describe 'test attribute "error"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_debug"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_description"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_hint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "status_code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/rfc6749_error_json_spec.rb b/clients/hydra/ruby/spec/models/rfc6749_error_json_spec.rb index 5ecd0ea0e14..8f8d70b1e96 100644 --- a/clients/hydra/ruby/spec/models/rfc6749_error_json_spec.rb +++ b/clients/hydra/ruby/spec/models/rfc6749_error_json_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,36 +22,38 @@ describe 'test an instance of RFC6749ErrorJson' do it 'should create an instance of RFC6749ErrorJson' do - expect(instance).to be_instance_of(OryHydraClient::RFC6749ErrorJson) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::RFC6749ErrorJson) end end + describe 'test attribute "error"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_debug"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_description"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_hint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "status_code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb b/clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb index 1caf1220078..c114634b8de 100644 --- a/clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb +++ b/clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of TokenPaginationHeaders' do it 'should create an instance of TokenPaginationHeaders' do - expect(instance).to be_instance_of(OryHydraClient::TokenPaginationHeaders) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TokenPaginationHeaders) end end + describe 'test attribute "link"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "x_total_count"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb b/clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb index 73c50e3d5ad..0ea0c15ef4b 100644 --- a/clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb +++ b/clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of TokenPaginationRequestParameters' do it 'should create an instance of TokenPaginationRequestParameters' do - expect(instance).to be_instance_of(OryHydraClient::TokenPaginationRequestParameters) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TokenPaginationRequestParameters) end end + describe 'test attribute "page_size"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "page_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb b/clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb index 3890278e1f7..f246144fe6b 100644 --- a/clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb +++ b/clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of TokenPaginationResponseHeaders' do it 'should create an instance of TokenPaginationResponseHeaders' do - expect(instance).to be_instance_of(OryHydraClient::TokenPaginationResponseHeaders) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TokenPaginationResponseHeaders) end end + describe 'test attribute "link"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "x_total_count"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/token_pagination_spec.rb b/clients/hydra/ruby/spec/models/token_pagination_spec.rb index 58fe8eb6cd1..dc247a88296 100644 --- a/clients/hydra/ruby/spec/models/token_pagination_spec.rb +++ b/clients/hydra/ruby/spec/models/token_pagination_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of TokenPagination' do it 'should create an instance of TokenPagination' do - expect(instance).to be_instance_of(OryHydraClient::TokenPagination) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TokenPagination) end end + describe 'test attribute "page_size"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "page_token"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb b/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb index e0ffc66573f..b7f91ec71fa 100644 --- a/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb +++ b/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,42 +22,44 @@ describe 'test an instance of TrustOAuth2JwtGrantIssuer' do it 'should create an instance of TrustOAuth2JwtGrantIssuer' do - expect(instance).to be_instance_of(OryHydraClient::TrustOAuth2JwtGrantIssuer) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TrustOAuth2JwtGrantIssuer) end end + describe 'test attribute "allow_any_subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "expires_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "issuer"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "jwk"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb index 0701b536490..26639565f4b 100644 --- a/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb +++ b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,54 +22,56 @@ describe 'test an instance of TrustedOAuth2JwtGrantIssuer' do it 'should create an instance of TrustedOAuth2JwtGrantIssuer' do - expect(instance).to be_instance_of(OryHydraClient::TrustedOAuth2JwtGrantIssuer) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TrustedOAuth2JwtGrantIssuer) end end + describe 'test attribute "allow_any_subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "created_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "expires_at"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "id"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "issuer"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "public_key"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "scope"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "subject"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb index b41b1d59ad8..81d5d34c6bc 100644 --- a/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb +++ b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of TrustedOAuth2JwtGrantJsonWebKey' do it 'should create an instance of TrustedOAuth2JwtGrantJsonWebKey' do - expect(instance).to be_instance_of(OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey) end end + describe 'test attribute "kid"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "set"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/verifiable_credential_priming_response_spec.rb b/clients/hydra/ruby/spec/models/verifiable_credential_priming_response_spec.rb index a8be049f1d0..015aab47edb 100644 --- a/clients/hydra/ruby/spec/models/verifiable_credential_priming_response_spec.rb +++ b/clients/hydra/ruby/spec/models/verifiable_credential_priming_response_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,54 +22,56 @@ describe 'test an instance of VerifiableCredentialPrimingResponse' do it 'should create an instance of VerifiableCredentialPrimingResponse' do - expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialPrimingResponse) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialPrimingResponse) end end + describe 'test attribute "c_nonce"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "c_nonce_expires_in"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_debug"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_description"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "error_hint"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "format"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "status_code"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/verifiable_credential_proof_spec.rb b/clients/hydra/ruby/spec/models/verifiable_credential_proof_spec.rb index 05f32587c7e..91e444c642c 100644 --- a/clients/hydra/ruby/spec/models/verifiable_credential_proof_spec.rb +++ b/clients/hydra/ruby/spec/models/verifiable_credential_proof_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of VerifiableCredentialProof' do it 'should create an instance of VerifiableCredentialProof' do - expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialProof) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialProof) end end + describe 'test attribute "jwt"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "proof_type"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/verifiable_credential_response_spec.rb b/clients/hydra/ruby/spec/models/verifiable_credential_response_spec.rb index 2e61243dac1..5fd6aa2190c 100644 --- a/clients/hydra/ruby/spec/models/verifiable_credential_response_spec.rb +++ b/clients/hydra/ruby/spec/models/verifiable_credential_response_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,18 +22,20 @@ describe 'test an instance of VerifiableCredentialResponse' do it 'should create an instance of VerifiableCredentialResponse' do - expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialResponse) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::VerifiableCredentialResponse) end end + describe 'test attribute "credential_draft_00"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end describe 'test attribute "format"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/models/version_spec.rb b/clients/hydra/ruby/spec/models/version_spec.rb index c600a9ff535..1434fba0260 100644 --- a/clients/hydra/ruby/spec/models/version_spec.rb +++ b/clients/hydra/ruby/spec/models/version_spec.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end @@ -22,12 +22,14 @@ describe 'test an instance of Version' do it 'should create an instance of Version' do - expect(instance).to be_instance_of(OryHydraClient::Version) + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(OryHydraClient::Version) end end + describe 'test attribute "version"' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/clients/hydra/ruby/spec/spec_helper.rb b/clients/hydra/ruby/spec/spec_helper.rb index a0a597e81d3..dabf5baaa39 100644 --- a/clients/hydra/ruby/spec/spec_helper.rb +++ b/clients/hydra/ruby/spec/spec_helper.rb @@ -3,10 +3,10 @@ #Documentation for all of Ory Hydra's APIs. -The version of the OpenAPI document: v2.2.0 +The version of the OpenAPI document: v2.2.1 Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.1 +Generator version: 7.7.0 =end diff --git a/clients/hydra/rust/.gitignore b/clients/hydra/rust/.gitignore index 43735cf136f..6aa106405a4 100644 --- a/clients/hydra/rust/.gitignore +++ b/clients/hydra/rust/.gitignore @@ -1,3 +1,3 @@ /target/ - - +**/*.rs.bk +Cargo.lock diff --git a/clients/hydra/rust/.openapi-generator/VERSION b/clients/hydra/rust/.openapi-generator/VERSION index 6d54bbd7751..1985849fb58 100644 --- a/clients/hydra/rust/.openapi-generator/VERSION +++ b/clients/hydra/rust/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/rust/Cargo.lock b/clients/hydra/rust/Cargo.lock index cd0afb94e2a..41ebe94259d 100644 --- a/clients/hydra/rust/Cargo.lock +++ b/clients/hydra/rust/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,17 +17,38 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -40,9 +61,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -50,26 +71,29 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "066fce287b1d4eafef758e89e09d724a24808a9196fe9756b8ca90e86d0719a2" [[package]] name = "cfg-if" @@ -77,6 +101,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.6", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -93,11 +130,56 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -108,12 +190,43 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -162,25 +275,36 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "h2" -version = "0.3.24" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", - "indexmap", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -189,15 +313,27 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.11" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -206,51 +342,135 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "httparse" -version = "1.8.0" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] [[package]] -name = "httpdate" -version = "1.0.3" +name = "httparse" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "hyper" -version = "0.14.28" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", "socket2", "tokio", + "tower", "tower-service", "tracing", - "want", ] +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -263,12 +483,24 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", + "serde", ] [[package]] @@ -279,36 +511,42 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -318,9 +556,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -328,38 +566,61 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -370,16 +631,60 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "ory-hydra-client" -version = "2.2.0" +version = "2.2.1" dependencies = [ - "num-traits", "reqwest", "serde", - "serde_derive", "serde_json", + "serde_with", "url", + "uuid", ] [[package]] @@ -388,11 +693,31 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -400,29 +725,41 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "reqwest" -version = "0.11.24" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64", "bytes", @@ -432,21 +769,28 @@ dependencies = [ "h2", "http", "http-body", + "http-body-util", "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", "mime", "mime_guess", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", + "tokio-native-tls", "tower-service", "url", "wasm-bindgen", @@ -455,32 +799,132 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -489,9 +933,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -510,6 +954,36 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "slab" version = "0.4.9" @@ -519,21 +993,45 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" -version = "2.0.48" +version = "2.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "201fcda3845c23e8212cd466bfebf0bd20694490fc0356ae8e428e0824a915a6" dependencies = [ "proc-macro2", "quote", @@ -542,9 +1040,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "system-configuration" @@ -552,7 +1050,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -567,11 +1065,54 @@ dependencies = [ "libc", ] +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" dependencies = [ "tinyvec_macros", ] @@ -584,9 +1125,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -594,23 +1135,64 @@ dependencies = [ "mio", "pin-project-lite", "socket2", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -665,24 +1247,46 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "uuid" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.4" @@ -706,9 +1310,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -716,9 +1320,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -731,9 +1335,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -743,9 +1347,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -753,9 +1357,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -766,27 +1370,45 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -795,13 +1417,29 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -810,48 +1448,102 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/clients/hydra/rust/Cargo.toml b/clients/hydra/rust/Cargo.toml index 09a18d818a8..48b1c70b881 100644 --- a/clients/hydra/rust/Cargo.toml +++ b/clients/hydra/rust/Cargo.toml @@ -1,22 +1,15 @@ [package] name = "ory-hydra-client" -version = "2.2.0" -description = "SDK Client for Ory Hydra" -documentation = "https://www.ory.sh/hydra/docs/sdk" -homepage = "https://www.ory.sh" -license = "Apache-2.0" -authors = ["OpenAPI Generator team and contributors"] -edition = "2018" +version = "2.2.1" +authors = ["hi@ory.sh"] +description = "Documentation for all of Ory Hydra's APIs. " +license = "Apache 2.0" +edition = "2021" [dependencies] -num-traits = { version = "^0.2", default-features = false } -serde = "^1.0" -serde_derive = "^1.0" +serde = { version = "^1.0", features = ["derive"] } +serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } serde_json = "^1.0" -url = "^2.2" -[dependencies.reqwest] -version = "^0.11" -default-features = false -features = ["json", "multipart"] - -[dev-dependencies] +url = "^2.5" +uuid = { version = "^1.8", features = ["serde", "v4"] } +reqwest = { version = "^0.12", features = ["json", "multipart"] } diff --git a/clients/hydra/rust/README.md b/clients/hydra/rust/README.md index 8fde23248a9..2efbef56823 100644 --- a/clients/hydra/rust/README.md +++ b/clients/hydra/rust/README.md @@ -8,8 +8,9 @@ Documentation for all of Ory Hydra's APIs. This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. -- API version: v2.2.0 -- Package version: v2.2.0 +- API version: v2.2.1 +- Package version: v2.2.1 +- Generator version: 7.7.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation diff --git a/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md index eddf5ae468d..453153bc1c2 100644 --- a/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md +++ b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **handled_at** | Option<**String**> | | [optional] **remember** | Option<**bool**> | Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. | [optional] **remember_for** | Option<**i64**> | RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. | [optional] -**session** | Option<[**crate::models::AcceptOAuth2ConsentRequestSession**](acceptOAuth2ConsentRequestSession.md)> | | [optional] +**session** | Option<[**models::AcceptOAuth2ConsentRequestSession**](acceptOAuth2ConsentRequestSession.md)> | | [optional] [[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/clients/hydra/rust/docs/CreateJsonWebKeySet.md b/clients/hydra/rust/docs/CreateJsonWebKeySet.md index 16a7c8c2d89..c87d7288568 100644 --- a/clients/hydra/rust/docs/CreateJsonWebKeySet.md +++ b/clients/hydra/rust/docs/CreateJsonWebKeySet.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alg** | **String** | JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. | **kid** | **String** | JSON Web Key ID The Key ID of the key to be created. | -**_use** | **String** | JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". | +**r#use** | **String** | JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". | [[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/clients/hydra/rust/docs/CreateVerifiableCredentialRequestBody.md b/clients/hydra/rust/docs/CreateVerifiableCredentialRequestBody.md index eeb9ed40a3d..ef96d65064b 100644 --- a/clients/hydra/rust/docs/CreateVerifiableCredentialRequestBody.md +++ b/clients/hydra/rust/docs/CreateVerifiableCredentialRequestBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **format** | Option<**String**> | | [optional] -**proof** | Option<[**crate::models::VerifiableCredentialProof**](VerifiableCredentialProof.md)> | | [optional] +**proof** | Option<[**models::VerifiableCredentialProof**](VerifiableCredentialProof.md)> | | [optional] **types** | Option<**Vec**> | | [optional] [[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/clients/hydra/rust/docs/HealthNotReadyStatus.md b/clients/hydra/rust/docs/HealthNotReadyStatus.md index e588af7263d..e177f5e0e0a 100644 --- a/clients/hydra/rust/docs/HealthNotReadyStatus.md +++ b/clients/hydra/rust/docs/HealthNotReadyStatus.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | Option<**::std::collections::HashMap**> | Errors contains a list of errors that caused the not ready status. | [optional] +**errors** | Option<**std::collections::HashMap**> | Errors contains a list of errors that caused the not ready status. | [optional] [[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/clients/hydra/rust/docs/IntrospectedOAuth2Token.md b/clients/hydra/rust/docs/IntrospectedOAuth2Token.md index babe0c1b6ae..92cb3d66150 100644 --- a/clients/hydra/rust/docs/IntrospectedOAuth2Token.md +++ b/clients/hydra/rust/docs/IntrospectedOAuth2Token.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **aud** | Option<**Vec**> | Audience contains a list of the token's intended audiences. | [optional] **client_id** | Option<**String**> | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] **exp** | Option<**i64**> | Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. | [optional] -**ext** | Option<[**::std::collections::HashMap**](serde_json::Value.md)> | Extra is arbitrary data set by the session. | [optional] +**ext** | Option<[**std::collections::HashMap**](serde_json::Value.md)> | Extra is arbitrary data set by the session. | [optional] **iat** | Option<**i64**> | Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. | [optional] **iss** | Option<**String**> | IssuerURL is a string representing the issuer of this token | [optional] **nbf** | Option<**i64**> | NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before. | [optional] diff --git a/clients/hydra/rust/docs/IsReady503Response.md b/clients/hydra/rust/docs/IsReady503Response.md index 141ea6c15c0..d47740cc912 100644 --- a/clients/hydra/rust/docs/IsReady503Response.md +++ b/clients/hydra/rust/docs/IsReady503Response.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | Option<**::std::collections::HashMap**> | Errors contains a list of errors that caused the not ready status. | [optional] +**errors** | Option<**std::collections::HashMap**> | Errors contains a list of errors that caused the not ready status. | [optional] [[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/clients/hydra/rust/docs/JsonWebKey.md b/clients/hydra/rust/docs/JsonWebKey.md index 566f24cdf1d..4ac5f142ddd 100644 --- a/clients/hydra/rust/docs/JsonWebKey.md +++ b/clients/hydra/rust/docs/JsonWebKey.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **p** | Option<**String**> | | [optional] **q** | Option<**String**> | | [optional] **qi** | Option<**String**> | | [optional] -**_use** | **String** | Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). | +**r#use** | **String** | Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). | **x** | Option<**String**> | | [optional] **x5c** | Option<**Vec**> | The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. | [optional] **y** | Option<**String**> | | [optional] diff --git a/clients/hydra/rust/docs/JsonWebKeySet.md b/clients/hydra/rust/docs/JsonWebKeySet.md index 1a877109759..fb904780174 100644 --- a/clients/hydra/rust/docs/JsonWebKeySet.md +++ b/clients/hydra/rust/docs/JsonWebKeySet.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keys** | Option<[**Vec**](jsonWebKey.md)> | List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. | [optional] +**keys** | Option<[**Vec**](jsonWebKey.md)> | List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. | [optional] [[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/clients/hydra/rust/docs/JwkApi.md b/clients/hydra/rust/docs/JwkApi.md index 17b721f297b..25c7e4f69b5 100644 --- a/clients/hydra/rust/docs/JwkApi.md +++ b/clients/hydra/rust/docs/JwkApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description ## create_json_web_key_set -> crate::models::JsonWebKeySet create_json_web_key_set(set, create_json_web_key_set) +> models::JsonWebKeySet create_json_web_key_set(set, create_json_web_key_set) Create JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -31,7 +31,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) +[**models::JsonWebKeySet**](jsonWebKeySet.md) ### Authorization @@ -108,7 +108,7 @@ No authorization required ## get_json_web_key -> crate::models::JsonWebKeySet get_json_web_key(set, kid) +> models::JsonWebKeySet get_json_web_key(set, kid) Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). @@ -123,7 +123,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) +[**models::JsonWebKeySet**](jsonWebKeySet.md) ### Authorization @@ -139,7 +139,7 @@ No authorization required ## get_json_web_key_set -> crate::models::JsonWebKeySet get_json_web_key_set(set) +> models::JsonWebKeySet get_json_web_key_set(set) Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -153,7 +153,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) +[**models::JsonWebKeySet**](jsonWebKeySet.md) ### Authorization @@ -169,7 +169,7 @@ No authorization required ## set_json_web_key -> crate::models::JsonWebKey set_json_web_key(set, kid, json_web_key) +> models::JsonWebKey set_json_web_key(set, kid, json_web_key) Set JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -185,7 +185,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::JsonWebKey**](jsonWebKey.md) +[**models::JsonWebKey**](jsonWebKey.md) ### Authorization @@ -201,7 +201,7 @@ No authorization required ## set_json_web_key_set -> crate::models::JsonWebKeySet set_json_web_key_set(set, json_web_key_set) +> models::JsonWebKeySet set_json_web_key_set(set, json_web_key_set) Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -216,7 +216,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) +[**models::JsonWebKeySet**](jsonWebKeySet.md) ### Authorization diff --git a/clients/hydra/rust/docs/MetadataApi.md b/clients/hydra/rust/docs/MetadataApi.md index 95d87fc06db..13b02068db9 100644 --- a/clients/hydra/rust/docs/MetadataApi.md +++ b/clients/hydra/rust/docs/MetadataApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description ## get_version -> crate::models::GetVersion200Response get_version() +> models::GetVersion200Response get_version() Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. @@ -23,7 +23,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::GetVersion200Response**](getVersion_200_response.md) +[**models::GetVersion200Response**](getVersion_200_response.md) ### Authorization @@ -39,7 +39,7 @@ No authorization required ## is_alive -> crate::models::HealthStatus is_alive() +> models::HealthStatus is_alive() Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. @@ -50,7 +50,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::HealthStatus**](healthStatus.md) +[**models::HealthStatus**](healthStatus.md) ### Authorization @@ -66,7 +66,7 @@ No authorization required ## is_ready -> crate::models::IsReady200Response is_ready() +> models::IsReady200Response is_ready() Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. @@ -77,7 +77,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::IsReady200Response**](isReady_200_response.md) +[**models::IsReady200Response**](isReady_200_response.md) ### Authorization diff --git a/clients/hydra/rust/docs/OAuth2Api.md b/clients/hydra/rust/docs/OAuth2Api.md index bf28be9efef..9eb1de1e38c 100644 --- a/clients/hydra/rust/docs/OAuth2Api.md +++ b/clients/hydra/rust/docs/OAuth2Api.md @@ -37,7 +37,7 @@ Method | HTTP request | Description ## accept_o_auth2_consent_request -> crate::models::OAuth2RedirectTo accept_o_auth2_consent_request(consent_challenge, accept_o_auth2_consent_request) +> models::OAuth2RedirectTo accept_o_auth2_consent_request(consent_challenge, accept_o_auth2_consent_request) Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. @@ -52,7 +52,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) +[**models::OAuth2RedirectTo**](oAuth2RedirectTo.md) ### Authorization @@ -68,7 +68,7 @@ No authorization required ## accept_o_auth2_login_request -> crate::models::OAuth2RedirectTo accept_o_auth2_login_request(login_challenge, accept_o_auth2_login_request) +> models::OAuth2RedirectTo accept_o_auth2_login_request(login_challenge, accept_o_auth2_login_request) Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. @@ -83,7 +83,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) +[**models::OAuth2RedirectTo**](oAuth2RedirectTo.md) ### Authorization @@ -99,7 +99,7 @@ No authorization required ## accept_o_auth2_logout_request -> crate::models::OAuth2RedirectTo accept_o_auth2_logout_request(logout_challenge) +> models::OAuth2RedirectTo accept_o_auth2_logout_request(logout_challenge) Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. @@ -113,7 +113,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) +[**models::OAuth2RedirectTo**](oAuth2RedirectTo.md) ### Authorization @@ -129,7 +129,7 @@ No authorization required ## create_o_auth2_client -> crate::models::OAuth2Client create_o_auth2_client(o_auth2_client) +> models::OAuth2Client create_o_auth2_client(o_auth2_client) Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. @@ -143,7 +143,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -249,7 +249,7 @@ No authorization required ## get_o_auth2_client -> crate::models::OAuth2Client get_o_auth2_client(id) +> models::OAuth2Client get_o_auth2_client(id) Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -263,7 +263,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -279,7 +279,7 @@ No authorization required ## get_o_auth2_consent_request -> crate::models::OAuth2ConsentRequest get_o_auth2_consent_request(consent_challenge) +> models::OAuth2ConsentRequest get_o_auth2_consent_request(consent_challenge) Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. @@ -293,7 +293,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md) +[**models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md) ### Authorization @@ -309,7 +309,7 @@ No authorization required ## get_o_auth2_login_request -> crate::models::OAuth2LoginRequest get_o_auth2_login_request(login_challenge) +> models::OAuth2LoginRequest get_o_auth2_login_request(login_challenge) Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. @@ -323,7 +323,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2LoginRequest**](oAuth2LoginRequest.md) +[**models::OAuth2LoginRequest**](oAuth2LoginRequest.md) ### Authorization @@ -339,7 +339,7 @@ No authorization required ## get_o_auth2_logout_request -> crate::models::OAuth2LogoutRequest get_o_auth2_logout_request(logout_challenge) +> models::OAuth2LogoutRequest get_o_auth2_logout_request(logout_challenge) Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. @@ -353,7 +353,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2LogoutRequest**](oAuth2LogoutRequest.md) +[**models::OAuth2LogoutRequest**](oAuth2LogoutRequest.md) ### Authorization @@ -369,7 +369,7 @@ No authorization required ## get_trusted_o_auth2_jwt_grant_issuer -> crate::models::TrustedOAuth2JwtGrantIssuer get_trusted_o_auth2_jwt_grant_issuer(id) +> models::TrustedOAuth2JwtGrantIssuer get_trusted_o_auth2_jwt_grant_issuer(id) Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. @@ -383,7 +383,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) +[**models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) ### Authorization @@ -399,7 +399,7 @@ No authorization required ## introspect_o_auth2_token -> crate::models::IntrospectedOAuth2Token introspect_o_auth2_token(token, scope) +> models::IntrospectedOAuth2Token introspect_o_auth2_token(token, scope) Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. @@ -414,7 +414,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::IntrospectedOAuth2Token**](introspectedOAuth2Token.md) +[**models::IntrospectedOAuth2Token**](introspectedOAuth2Token.md) ### Authorization @@ -430,7 +430,7 @@ No authorization required ## list_o_auth2_clients -> Vec list_o_auth2_clients(page_size, page_token, client_name, owner) +> Vec list_o_auth2_clients(page_size, page_token, client_name, owner) List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. @@ -447,7 +447,7 @@ Name | Type | Description | Required | Notes ### Return type -[**Vec**](oAuth2Client.md) +[**Vec**](oAuth2Client.md) ### Authorization @@ -463,7 +463,7 @@ No authorization required ## list_o_auth2_consent_sessions -> Vec list_o_auth2_consent_sessions(subject, page_size, page_token, login_session_id) +> Vec list_o_auth2_consent_sessions(subject, page_size, page_token, login_session_id) List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. @@ -480,7 +480,7 @@ Name | Type | Description | Required | Notes ### Return type -[**Vec**](oAuth2ConsentSession.md) +[**Vec**](oAuth2ConsentSession.md) ### Authorization @@ -496,7 +496,7 @@ No authorization required ## list_trusted_o_auth2_jwt_grant_issuers -> Vec list_trusted_o_auth2_jwt_grant_issuers(max_items, default_items, issuer) +> Vec list_trusted_o_auth2_jwt_grant_issuers(max_items, default_items, issuer) List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. @@ -512,7 +512,7 @@ Name | Type | Description | Required | Notes ### Return type -[**Vec**](trustedOAuth2JwtGrantIssuer.md) +[**Vec**](trustedOAuth2JwtGrantIssuer.md) ### Authorization @@ -528,7 +528,7 @@ No authorization required ## o_auth2_authorize -> crate::models::ErrorOAuth2 o_auth2_authorize() +> models::ErrorOAuth2 o_auth2_authorize() OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. @@ -539,7 +539,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::ErrorOAuth2**](errorOAuth2.md) +[**models::ErrorOAuth2**](errorOAuth2.md) ### Authorization @@ -555,7 +555,7 @@ No authorization required ## oauth2_token_exchange -> crate::models::OAuth2TokenExchange oauth2_token_exchange(grant_type, client_id, code, redirect_uri, refresh_token) +> models::OAuth2TokenExchange oauth2_token_exchange(grant_type, client_id, code, redirect_uri, refresh_token) The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. @@ -573,7 +573,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2TokenExchange**](oAuth2TokenExchange.md) +[**models::OAuth2TokenExchange**](oAuth2TokenExchange.md) ### Authorization @@ -589,7 +589,7 @@ Name | Type | Description | Required | Notes ## patch_o_auth2_client -> crate::models::OAuth2Client patch_o_auth2_client(id, json_patch) +> models::OAuth2Client patch_o_auth2_client(id, json_patch) Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -600,11 +600,11 @@ Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the OAuth 2.0 Client. | [required] | -**json_patch** | [**Vec**](jsonPatch.md) | OAuth 2.0 Client JSON Patch Body | [required] | +**json_patch** | [**Vec**](jsonPatch.md) | OAuth 2.0 Client JSON Patch Body | [required] | ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -620,7 +620,7 @@ No authorization required ## reject_o_auth2_consent_request -> crate::models::OAuth2RedirectTo reject_o_auth2_consent_request(consent_challenge, reject_o_auth2_request) +> models::OAuth2RedirectTo reject_o_auth2_consent_request(consent_challenge, reject_o_auth2_request) Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. @@ -635,7 +635,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) +[**models::OAuth2RedirectTo**](oAuth2RedirectTo.md) ### Authorization @@ -651,7 +651,7 @@ No authorization required ## reject_o_auth2_login_request -> crate::models::OAuth2RedirectTo reject_o_auth2_login_request(login_challenge, reject_o_auth2_request) +> models::OAuth2RedirectTo reject_o_auth2_login_request(login_challenge, reject_o_auth2_request) Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. @@ -666,7 +666,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) +[**models::OAuth2RedirectTo**](oAuth2RedirectTo.md) ### Authorization @@ -807,7 +807,7 @@ Name | Type | Description | Required | Notes ## set_o_auth2_client -> crate::models::OAuth2Client set_o_auth2_client(id, o_auth2_client) +> models::OAuth2Client set_o_auth2_client(id, o_auth2_client) Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -822,7 +822,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -838,7 +838,7 @@ No authorization required ## set_o_auth2_client_lifespans -> crate::models::OAuth2Client set_o_auth2_client_lifespans(id, o_auth2_client_token_lifespans) +> models::OAuth2Client set_o_auth2_client_lifespans(id, o_auth2_client_token_lifespans) Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. @@ -853,7 +853,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -869,7 +869,7 @@ No authorization required ## trust_o_auth2_jwt_grant_issuer -> crate::models::TrustedOAuth2JwtGrantIssuer trust_o_auth2_jwt_grant_issuer(trust_o_auth2_jwt_grant_issuer) +> models::TrustedOAuth2JwtGrantIssuer trust_o_auth2_jwt_grant_issuer(trust_o_auth2_jwt_grant_issuer) Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). @@ -883,7 +883,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) +[**models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) ### Authorization diff --git a/clients/hydra/rust/docs/OAuth2ConsentRequest.md b/clients/hydra/rust/docs/OAuth2ConsentRequest.md index c64cc5ff3e0..21be897d113 100644 --- a/clients/hydra/rust/docs/OAuth2ConsentRequest.md +++ b/clients/hydra/rust/docs/OAuth2ConsentRequest.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes **acr** | Option<**String**> | ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. | [optional] **amr** | Option<**Vec**> | | [optional] **challenge** | **String** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | -**client** | Option<[**crate::models::OAuth2Client**](oAuth2Client.md)> | | [optional] +**client** | Option<[**models::OAuth2Client**](oAuth2Client.md)> | | [optional] **context** | Option<[**serde_json::Value**](.md)> | | [optional] **login_challenge** | Option<**String**> | LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. | [optional] **login_session_id** | Option<**String**> | LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. | [optional] -**oidc_context** | Option<[**crate::models::OAuth2ConsentRequestOpenIdConnectContext**](oAuth2ConsentRequestOpenIDConnectContext.md)> | | [optional] +**oidc_context** | Option<[**models::OAuth2ConsentRequestOpenIdConnectContext**](oAuth2ConsentRequestOpenIDConnectContext.md)> | | [optional] **request_url** | Option<**String**> | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. | [optional] **requested_access_token_audience** | Option<**Vec**> | | [optional] **requested_scope** | Option<**Vec**> | | [optional] diff --git a/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md b/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md index f2deb5450ff..5e08890b402 100644 --- a/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md +++ b/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **acr_values** | Option<**Vec**> | ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. | [optional] **display** | Option<**String**> | Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. | [optional] -**id_token_hint_claims** | Option<[**::std::collections::HashMap**](serde_json::Value.md)> | IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. | [optional] +**id_token_hint_claims** | Option<[**std::collections::HashMap**](serde_json::Value.md)> | IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. | [optional] **login_hint** | Option<**String**> | LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. | [optional] **ui_locales** | Option<**Vec**> | UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. | [optional] diff --git a/clients/hydra/rust/docs/OAuth2ConsentSession.md b/clients/hydra/rust/docs/OAuth2ConsentSession.md index c28a3a163ff..33a8a4f3359 100644 --- a/clients/hydra/rust/docs/OAuth2ConsentSession.md +++ b/clients/hydra/rust/docs/OAuth2ConsentSession.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**consent_request** | Option<[**crate::models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md)> | | [optional] +**consent_request** | Option<[**models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md)> | | [optional] **context** | Option<[**serde_json::Value**](.md)> | | [optional] -**expires_at** | Option<[**crate::models::OAuth2ConsentSessionExpiresAt**](oAuth2ConsentSession_expires_at.md)> | | [optional] +**expires_at** | Option<[**models::OAuth2ConsentSessionExpiresAt**](oAuth2ConsentSession_expires_at.md)> | | [optional] **grant_access_token_audience** | Option<**Vec**> | | [optional] **grant_scope** | Option<**Vec**> | | [optional] **handled_at** | Option<**String**> | | [optional] **remember** | Option<**bool**> | Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. | [optional] **remember_for** | Option<**i64**> | Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. | [optional] -**session** | Option<[**crate::models::AcceptOAuth2ConsentRequestSession**](acceptOAuth2ConsentRequestSession.md)> | | [optional] +**session** | Option<[**models::AcceptOAuth2ConsentRequestSession**](acceptOAuth2ConsentRequestSession.md)> | | [optional] [[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/clients/hydra/rust/docs/OAuth2LoginRequest.md b/clients/hydra/rust/docs/OAuth2LoginRequest.md index 5a5e0c64b3c..fe667cb5355 100644 --- a/clients/hydra/rust/docs/OAuth2LoginRequest.md +++ b/clients/hydra/rust/docs/OAuth2LoginRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **String** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | -**client** | [**crate::models::OAuth2Client**](oAuth2Client.md) | | -**oidc_context** | Option<[**crate::models::OAuth2ConsentRequestOpenIdConnectContext**](oAuth2ConsentRequestOpenIDConnectContext.md)> | | [optional] +**client** | [**models::OAuth2Client**](oAuth2Client.md) | | +**oidc_context** | Option<[**models::OAuth2ConsentRequestOpenIdConnectContext**](oAuth2ConsentRequestOpenIDConnectContext.md)> | | [optional] **request_url** | **String** | RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. | **requested_access_token_audience** | Option<**Vec**> | | [optional] **requested_scope** | Option<**Vec**> | | [optional] diff --git a/clients/hydra/rust/docs/OAuth2LogoutRequest.md b/clients/hydra/rust/docs/OAuth2LogoutRequest.md index f38efe989d3..0bf8b61bd7f 100644 --- a/clients/hydra/rust/docs/OAuth2LogoutRequest.md +++ b/clients/hydra/rust/docs/OAuth2LogoutRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | Option<**String**> | Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. | [optional] -**client** | Option<[**crate::models::OAuth2Client**](oAuth2Client.md)> | | [optional] +**client** | Option<[**models::OAuth2Client**](oAuth2Client.md)> | | [optional] **request_url** | Option<**String**> | RequestURL is the original Logout URL requested. | [optional] **rp_initiated** | Option<**bool**> | RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. | [optional] **sid** | Option<**String**> | SessionID is the login session ID that was requested to log out. | [optional] diff --git a/clients/hydra/rust/docs/OidcApi.md b/clients/hydra/rust/docs/OidcApi.md index 8275eb2388f..1e6df253c26 100644 --- a/clients/hydra/rust/docs/OidcApi.md +++ b/clients/hydra/rust/docs/OidcApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description ## create_oidc_dynamic_client -> crate::models::OAuth2Client create_oidc_dynamic_client(o_auth2_client) +> models::OAuth2Client create_oidc_dynamic_client(o_auth2_client) Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. @@ -31,7 +31,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -47,7 +47,7 @@ No authorization required ## create_verifiable_credential -> crate::models::VerifiableCredentialResponse create_verifiable_credential(create_verifiable_credential_request_body) +> models::VerifiableCredentialResponse create_verifiable_credential(create_verifiable_credential_request_body) Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. @@ -61,7 +61,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::VerifiableCredentialResponse**](verifiableCredentialResponse.md) +[**models::VerifiableCredentialResponse**](verifiableCredentialResponse.md) ### Authorization @@ -107,7 +107,7 @@ Name | Type | Description | Required | Notes ## discover_oidc_configuration -> crate::models::OidcConfiguration discover_oidc_configuration() +> models::OidcConfiguration discover_oidc_configuration() OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ @@ -118,7 +118,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::OidcConfiguration**](oidcConfiguration.md) +[**models::OidcConfiguration**](oidcConfiguration.md) ### Authorization @@ -134,7 +134,7 @@ No authorization required ## get_oidc_dynamic_client -> crate::models::OAuth2Client get_oidc_dynamic_client(id) +> models::OAuth2Client get_oidc_dynamic_client(id) Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. @@ -148,7 +148,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization @@ -164,7 +164,7 @@ Name | Type | Description | Required | Notes ## get_oidc_user_info -> crate::models::OidcUserInfo get_oidc_user_info() +> models::OidcUserInfo get_oidc_user_info() OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. @@ -175,7 +175,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::OidcUserInfo**](oidcUserInfo.md) +[**models::OidcUserInfo**](oidcUserInfo.md) ### Authorization @@ -218,7 +218,7 @@ No authorization required ## set_oidc_dynamic_client -> crate::models::OAuth2Client set_oidc_dynamic_client(id, o_auth2_client) +> models::OAuth2Client set_oidc_dynamic_client(id, o_auth2_client) Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -233,7 +233,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::OAuth2Client**](oAuth2Client.md) +[**models::OAuth2Client**](oAuth2Client.md) ### Authorization diff --git a/clients/hydra/rust/docs/OidcConfiguration.md b/clients/hydra/rust/docs/OidcConfiguration.md index cb6649432ba..6c0033f775d 100644 --- a/clients/hydra/rust/docs/OidcConfiguration.md +++ b/clients/hydra/rust/docs/OidcConfiguration.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **claims_supported** | Option<**Vec**> | OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. | [optional] **code_challenge_methods_supported** | Option<**Vec**> | OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] **credentials_endpoint_draft_00** | Option<**String**> | OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint. | [optional] -**credentials_supported_draft_00** | Option<[**Vec**](credentialSupportedDraft00.md)> | OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. | [optional] +**credentials_supported_draft_00** | Option<[**Vec**](credentialSupportedDraft00.md)> | OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. | [optional] **end_session_endpoint** | Option<**String**> | OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. | [optional] **frontchannel_logout_session_supported** | Option<**bool**> | OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. | [optional] **frontchannel_logout_supported** | Option<**bool**> | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] diff --git a/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md b/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md index 074e6f19bfe..7dad580bc60 100644 --- a/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md +++ b/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **allow_any_subject** | Option<**bool**> | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **expires_at** | **String** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | **issuer** | **String** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | -**jwk** | [**crate::models::JsonWebKey**](jsonWebKey.md) | | +**jwk** | [**models::JsonWebKey**](jsonWebKey.md) | | **scope** | **Vec** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | **subject** | Option<**String**> | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] diff --git a/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md index 19102240735..8b0d412716f 100644 --- a/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md +++ b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **expires_at** | Option<**String**> | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **id** | Option<**String**> | | [optional] **issuer** | Option<**String**> | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**public_key** | Option<[**crate::models::TrustedOAuth2JwtGrantJsonWebKey**](trustedOAuth2JwtGrantJsonWebKey.md)> | | [optional] +**public_key** | Option<[**models::TrustedOAuth2JwtGrantJsonWebKey**](trustedOAuth2JwtGrantJsonWebKey.md)> | | [optional] **scope** | Option<**Vec**> | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **subject** | Option<**String**> | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] diff --git a/clients/hydra/rust/docs/WellknownApi.md b/clients/hydra/rust/docs/WellknownApi.md index 5a5a469891a..e6dc33e480a 100644 --- a/clients/hydra/rust/docs/WellknownApi.md +++ b/clients/hydra/rust/docs/WellknownApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## discover_json_web_keys -> crate::models::JsonWebKeySet discover_json_web_keys() +> models::JsonWebKeySet discover_json_web_keys() Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. @@ -21,7 +21,7 @@ This endpoint does not need any parameter. ### Return type -[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) +[**models::JsonWebKeySet**](jsonWebKeySet.md) ### Authorization diff --git a/clients/hydra/rust/src/apis/configuration.rs b/clients/hydra/rust/src/apis/configuration.rs index 23628d51968..848ebc33e48 100644 --- a/clients/hydra/rust/src/apis/configuration.rs +++ b/clients/hydra/rust/src/apis/configuration.rs @@ -3,13 +3,12 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use reqwest; #[derive(Debug, Clone)] pub struct Configuration { @@ -31,6 +30,7 @@ pub struct ApiKey { pub key: String, } + impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -41,12 +41,13 @@ impl Default for Configuration { fn default() -> Self { Configuration { base_path: "http://localhost".to_owned(), - user_agent: Some("OpenAPI-Generator/v2.2.0/rust".to_owned()), + user_agent: Some("OpenAPI-Generator/v2.2.1/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, bearer_access_token: None, api_key: None, + } } } diff --git a/clients/hydra/rust/src/apis/jwk_api.rs b/clients/hydra/rust/src/apis/jwk_api.rs index abfb62baed4..254a0be145a 100644 --- a/clients/hydra/rust/src/apis/jwk_api.rs +++ b/clients/hydra/rust/src/apis/jwk_api.rs @@ -3,100 +3,85 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use std::fmt::Display; - -use num_traits; use reqwest; - -use crate::apis::ResponseContent; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; -trait NumVecJoin { - fn join(&self, sep: &str) -> String; -} - -impl NumVecJoin for Vec { - fn join(&self, sep: &str) -> String { - self.iter() - .map(ToString::to_string) - .collect::>() - .join(sep) - } -} - -/// struct for typed errors of method `create_json_web_key_set` +/// struct for typed errors of method [`create_json_web_key_set`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateJsonWebKeySetError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_json_web_key` +/// struct for typed errors of method [`delete_json_web_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteJsonWebKeyError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_json_web_key_set` +/// struct for typed errors of method [`delete_json_web_key_set`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteJsonWebKeySetError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_json_web_key` +/// struct for typed errors of method [`get_json_web_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetJsonWebKeyError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_json_web_key_set` +/// struct for typed errors of method [`get_json_web_key_set`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetJsonWebKeySetError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_json_web_key` +/// struct for typed errors of method [`set_json_web_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetJsonWebKeyError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_json_web_key_set` +/// struct for typed errors of method [`set_json_web_key_set`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetJsonWebKeySetError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } /// This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. -pub async fn create_json_web_key_set(configuration: &configuration::Configuration, set: &str, create_json_web_key_set: &crate::models::CreateJsonWebKeySet) -> Result> { +pub async fn create_json_web_key_set(configuration: &configuration::Configuration, set: &str, create_json_web_key_set: models::CreateJsonWebKeySet) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}", configuration.base_path, set=crate::apis::urlencode(set)); + let local_var_uri_str = format!("{}/admin/keys/{set}", local_var_configuration.base_path, set=crate::apis::urlencode(set)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&create_json_web_key_set); @@ -118,13 +103,14 @@ pub async fn create_json_web_key_set(configuration: &configuration::Configuratio /// Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. pub async fn delete_json_web_key(configuration: &configuration::Configuration, set: &str, kid: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); + let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", local_var_configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -145,13 +131,14 @@ pub async fn delete_json_web_key(configuration: &configuration::Configuration, s /// Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. pub async fn delete_json_web_key_set(configuration: &configuration::Configuration, set: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}", configuration.base_path, set=crate::apis::urlencode(set)); + let local_var_uri_str = format!("{}/admin/keys/{set}", local_var_configuration.base_path, set=crate::apis::urlencode(set)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -171,14 +158,15 @@ pub async fn delete_json_web_key_set(configuration: &configuration::Configuratio } /// This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). -pub async fn get_json_web_key(configuration: &configuration::Configuration, set: &str, kid: &str) -> Result> { +pub async fn get_json_web_key(configuration: &configuration::Configuration, set: &str, kid: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); + let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", local_var_configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -198,14 +186,15 @@ pub async fn get_json_web_key(configuration: &configuration::Configuration, set: } /// This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. -pub async fn get_json_web_key_set(configuration: &configuration::Configuration, set: &str) -> Result> { +pub async fn get_json_web_key_set(configuration: &configuration::Configuration, set: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}", configuration.base_path, set=crate::apis::urlencode(set)); + let local_var_uri_str = format!("{}/admin/keys/{set}", local_var_configuration.base_path, set=crate::apis::urlencode(set)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -225,14 +214,15 @@ pub async fn get_json_web_key_set(configuration: &configuration::Configuration, } /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. -pub async fn set_json_web_key(configuration: &configuration::Configuration, set: &str, kid: &str, json_web_key: Option<&crate::models::JsonWebKey>) -> Result> { +pub async fn set_json_web_key(configuration: &configuration::Configuration, set: &str, kid: &str, json_web_key: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); + let local_var_uri_str = format!("{}/admin/keys/{set}/{kid}", local_var_configuration.base_path, set=crate::apis::urlencode(set), kid=crate::apis::urlencode(kid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&json_web_key); @@ -253,14 +243,15 @@ pub async fn set_json_web_key(configuration: &configuration::Configuration, set: } /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. -pub async fn set_json_web_key_set(configuration: &configuration::Configuration, set: &str, json_web_key_set: Option<&crate::models::JsonWebKeySet>) -> Result> { +pub async fn set_json_web_key_set(configuration: &configuration::Configuration, set: &str, json_web_key_set: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/keys/{set}", configuration.base_path, set=crate::apis::urlencode(set)); + let local_var_uri_str = format!("{}/admin/keys/{set}", local_var_configuration.base_path, set=crate::apis::urlencode(set)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&json_web_key_set); diff --git a/clients/hydra/rust/src/apis/metadata_api.rs b/clients/hydra/rust/src/apis/metadata_api.rs index 7423f3f447f..b7f696c6b33 100644 --- a/clients/hydra/rust/src/apis/metadata_api.rs +++ b/clients/hydra/rust/src/apis/metadata_api.rs @@ -3,67 +3,52 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use std::fmt::Display; - -use num_traits; use reqwest; - -use crate::apis::ResponseContent; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; -trait NumVecJoin { - fn join(&self, sep: &str) -> String; -} - -impl NumVecJoin for Vec { - fn join(&self, sep: &str) -> String { - self.iter() - .map(ToString::to_string) - .collect::>() - .join(sep) - } -} - -/// struct for typed errors of method `get_version` +/// struct for typed errors of method [`get_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetVersionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `is_alive` +/// struct for typed errors of method [`is_alive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IsAliveError { - Status500(crate::models::GenericError), + Status500(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `is_ready` +/// struct for typed errors of method [`is_ready`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IsReadyError { - Status503(crate::models::IsReady503Response), + Status503(models::IsReady503Response), UnknownValue(serde_json::Value), } /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. -pub async fn get_version(configuration: &configuration::Configuration, ) -> Result> { +pub async fn get_version(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/version", configuration.base_path); + let local_var_uri_str = format!("{}/version", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -83,14 +68,15 @@ pub async fn get_version(configuration: &configuration::Configuration, ) -> Resu } /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. -pub async fn is_alive(configuration: &configuration::Configuration, ) -> Result> { +pub async fn is_alive(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/health/alive", configuration.base_path); + let local_var_uri_str = format!("{}/health/alive", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -110,14 +96,15 @@ pub async fn is_alive(configuration: &configuration::Configuration, ) -> Result< } /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. -pub async fn is_ready(configuration: &configuration::Configuration, ) -> Result> { +pub async fn is_ready(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/health/ready", configuration.base_path); + let local_var_uri_str = format!("{}/health/ready", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } diff --git a/clients/hydra/rust/src/apis/mod.rs b/clients/hydra/rust/src/apis/mod.rs index 87fcd1f2f1e..39e62e13b4a 100644 --- a/clients/hydra/rust/src/apis/mod.rs +++ b/clients/hydra/rust/src/apis/mod.rs @@ -61,6 +61,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + pub mod jwk_api; pub mod metadata_api; pub mod o_auth2_api; diff --git a/clients/hydra/rust/src/apis/o_auth2_api.rs b/clients/hydra/rust/src/apis/o_auth2_api.rs index e1c2fedccf3..9b8f2c7de7a 100644 --- a/clients/hydra/rust/src/apis/o_auth2_api.rs +++ b/clients/hydra/rust/src/apis/o_auth2_api.rs @@ -3,276 +3,261 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use std::fmt::Display; - -use num_traits; use reqwest; - -use crate::apis::ResponseContent; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; -trait NumVecJoin { - fn join(&self, sep: &str) -> String; -} - -impl NumVecJoin for Vec { - fn join(&self, sep: &str) -> String { - self.iter() - .map(ToString::to_string) - .collect::>() - .join(sep) - } -} - -/// struct for typed errors of method `accept_o_auth2_consent_request` +/// struct for typed errors of method [`accept_o_auth2_consent_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AcceptOAuth2ConsentRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `accept_o_auth2_login_request` +/// struct for typed errors of method [`accept_o_auth2_login_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AcceptOAuth2LoginRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `accept_o_auth2_logout_request` +/// struct for typed errors of method [`accept_o_auth2_logout_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AcceptOAuth2LogoutRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_o_auth2_client` +/// struct for typed errors of method [`create_o_auth2_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateOAuth2ClientError { - Status400(crate::models::ErrorOAuth2), - DefaultResponse(crate::models::ErrorOAuth2), + Status400(models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_o_auth2_client` +/// struct for typed errors of method [`delete_o_auth2_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOAuth2ClientError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_o_auth2_token` +/// struct for typed errors of method [`delete_o_auth2_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOAuth2TokenError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_trusted_o_auth2_jwt_grant_issuer` +/// struct for typed errors of method [`delete_trusted_o_auth2_jwt_grant_issuer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteTrustedOAuth2JwtGrantIssuerError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_o_auth2_client` +/// struct for typed errors of method [`get_o_auth2_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOAuth2ClientError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_o_auth2_consent_request` +/// struct for typed errors of method [`get_o_auth2_consent_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOAuth2ConsentRequestError { - Status410(crate::models::OAuth2RedirectTo), - DefaultResponse(crate::models::ErrorOAuth2), + Status410(models::OAuth2RedirectTo), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_o_auth2_login_request` +/// struct for typed errors of method [`get_o_auth2_login_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOAuth2LoginRequestError { - Status410(crate::models::OAuth2RedirectTo), - DefaultResponse(crate::models::ErrorOAuth2), + Status410(models::OAuth2RedirectTo), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_o_auth2_logout_request` +/// struct for typed errors of method [`get_o_auth2_logout_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOAuth2LogoutRequestError { - Status410(crate::models::OAuth2RedirectTo), - DefaultResponse(crate::models::ErrorOAuth2), + Status410(models::OAuth2RedirectTo), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_trusted_o_auth2_jwt_grant_issuer` +/// struct for typed errors of method [`get_trusted_o_auth2_jwt_grant_issuer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetTrustedOAuth2JwtGrantIssuerError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `introspect_o_auth2_token` +/// struct for typed errors of method [`introspect_o_auth2_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IntrospectOAuth2TokenError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `list_o_auth2_clients` +/// struct for typed errors of method [`list_o_auth2_clients`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListOAuth2ClientsError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `list_o_auth2_consent_sessions` +/// struct for typed errors of method [`list_o_auth2_consent_sessions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListOAuth2ConsentSessionsError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `list_trusted_o_auth2_jwt_grant_issuers` +/// struct for typed errors of method [`list_trusted_o_auth2_jwt_grant_issuers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListTrustedOAuth2JwtGrantIssuersError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `o_auth2_authorize` +/// struct for typed errors of method [`o_auth2_authorize`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum OAuth2AuthorizeError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `oauth2_token_exchange` +/// struct for typed errors of method [`oauth2_token_exchange`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum Oauth2TokenExchangeError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `patch_o_auth2_client` +/// struct for typed errors of method [`patch_o_auth2_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PatchOAuth2ClientError { - Status404(crate::models::ErrorOAuth2), - DefaultResponse(crate::models::ErrorOAuth2), + Status404(models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `reject_o_auth2_consent_request` +/// struct for typed errors of method [`reject_o_auth2_consent_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RejectOAuth2ConsentRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `reject_o_auth2_login_request` +/// struct for typed errors of method [`reject_o_auth2_login_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RejectOAuth2LoginRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `reject_o_auth2_logout_request` +/// struct for typed errors of method [`reject_o_auth2_logout_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RejectOAuth2LogoutRequestError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `revoke_o_auth2_consent_sessions` +/// struct for typed errors of method [`revoke_o_auth2_consent_sessions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RevokeOAuth2ConsentSessionsError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `revoke_o_auth2_login_sessions` +/// struct for typed errors of method [`revoke_o_auth2_login_sessions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RevokeOAuth2LoginSessionsError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `revoke_o_auth2_token` +/// struct for typed errors of method [`revoke_o_auth2_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RevokeOAuth2TokenError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_o_auth2_client` +/// struct for typed errors of method [`set_o_auth2_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetOAuth2ClientError { - Status400(crate::models::ErrorOAuth2), - Status404(crate::models::ErrorOAuth2), - DefaultResponse(crate::models::ErrorOAuth2), + Status400(models::ErrorOAuth2), + Status404(models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_o_auth2_client_lifespans` +/// struct for typed errors of method [`set_o_auth2_client_lifespans`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetOAuth2ClientLifespansError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `trust_o_auth2_jwt_grant_issuer` +/// struct for typed errors of method [`trust_o_auth2_jwt_grant_issuer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum TrustOAuth2JwtGrantIssuerError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. -pub async fn accept_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, accept_o_auth2_consent_request: Option<&crate::models::AcceptOAuth2ConsentRequest>) -> Result> { +pub async fn accept_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, accept_o_auth2_consent_request: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/accept", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/accept", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", consent_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", &consent_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&accept_o_auth2_consent_request); @@ -293,15 +278,16 @@ pub async fn accept_o_auth2_consent_request(configuration: &configuration::Confi } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. -pub async fn accept_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str, accept_o_auth2_login_request: Option<&crate::models::AcceptOAuth2LoginRequest>) -> Result> { +pub async fn accept_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str, accept_o_auth2_login_request: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/accept", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/accept", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("login_challenge", login_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("login_challenge", &login_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&accept_o_auth2_login_request); @@ -322,15 +308,16 @@ pub async fn accept_o_auth2_login_request(configuration: &configuration::Configu } /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. -pub async fn accept_o_auth2_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { +pub async fn accept_o_auth2_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/accept", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/accept", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", logout_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", &logout_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -350,14 +337,15 @@ pub async fn accept_o_auth2_logout_request(configuration: &configuration::Config } /// Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. -pub async fn create_o_auth2_client(configuration: &configuration::Configuration, o_auth2_client: &crate::models::OAuth2Client) -> Result> { +pub async fn create_o_auth2_client(configuration: &configuration::Configuration, o_auth2_client: models::OAuth2Client) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients", configuration.base_path); + let local_var_uri_str = format!("{}/admin/clients", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&o_auth2_client); @@ -379,13 +367,14 @@ pub async fn create_o_auth2_client(configuration: &configuration::Configuration, /// Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. pub async fn delete_o_auth2_client(configuration: &configuration::Configuration, id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/clients/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -406,14 +395,15 @@ pub async fn delete_o_auth2_client(configuration: &configuration::Configuration, /// This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. pub async fn delete_o_auth2_token(configuration: &configuration::Configuration, client_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/tokens", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/tokens", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("client_id", client_id.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("client_id", &client_id.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -434,13 +424,14 @@ pub async fn delete_o_auth2_token(configuration: &configuration::Configuration, /// Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. pub async fn delete_trusted_o_auth2_jwt_grant_issuer(configuration: &configuration::Configuration, id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -460,14 +451,15 @@ pub async fn delete_trusted_o_auth2_jwt_grant_issuer(configuration: &configurati } /// Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. -pub async fn get_o_auth2_client(configuration: &configuration::Configuration, id: &str) -> Result> { +pub async fn get_o_auth2_client(configuration: &configuration::Configuration, id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/clients/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -487,15 +479,16 @@ pub async fn get_o_auth2_client(configuration: &configuration::Configuration, id } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. -pub async fn get_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str) -> Result> { +pub async fn get_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", consent_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", &consent_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -515,15 +508,16 @@ pub async fn get_o_auth2_consent_request(configuration: &configuration::Configur } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. -pub async fn get_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str) -> Result> { +pub async fn get_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("login_challenge", login_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("login_challenge", &login_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -543,15 +537,16 @@ pub async fn get_o_auth2_login_request(configuration: &configuration::Configurat } /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. -pub async fn get_o_auth2_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { +pub async fn get_o_auth2_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", logout_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", &logout_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -571,14 +566,15 @@ pub async fn get_o_auth2_logout_request(configuration: &configuration::Configura } /// Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. -pub async fn get_trusted_o_auth2_jwt_grant_issuer(configuration: &configuration::Configuration, id: &str) -> Result> { +pub async fn get_trusted_o_auth2_jwt_grant_issuer(configuration: &configuration::Configuration, id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -598,14 +594,15 @@ pub async fn get_trusted_o_auth2_jwt_grant_issuer(configuration: &configuration: } /// The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. -pub async fn introspect_o_auth2_token(configuration: &configuration::Configuration, token: &str, scope: Option<&str>) -> Result> { +pub async fn introspect_o_auth2_token(configuration: &configuration::Configuration, token: &str, scope: Option<&str>) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/introspect", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/introspect", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); @@ -631,26 +628,27 @@ pub async fn introspect_o_auth2_token(configuration: &configuration::Configurati } /// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. -pub async fn list_o_auth2_clients(configuration: &configuration::Configuration, page_size: Option, page_token: Option<&str>, client_name: Option<&str>, owner: Option<&str>) -> Result, Error> { +pub async fn list_o_auth2_clients(configuration: &configuration::Configuration, page_size: Option, page_token: Option<&str>, client_name: Option<&str>, owner: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients", configuration.base_path); + let local_var_uri_str = format!("{}/admin/clients", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = page_size { - local_var_req_builder = local_var_req_builder.query(&[("page_size", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]); } if let Some(ref local_var_str) = page_token { - local_var_req_builder = local_var_req_builder.query(&[("page_token", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("page_token", &local_var_str.to_string())]); } if let Some(ref local_var_str) = client_name { - local_var_req_builder = local_var_req_builder.query(&[("client_name", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("client_name", &local_var_str.to_string())]); } if let Some(ref local_var_str) = owner { - local_var_req_builder = local_var_req_builder.query(&[("owner", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("owner", &local_var_str.to_string())]); } - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -670,24 +668,25 @@ pub async fn list_o_auth2_clients(configuration: &configuration::Configuration, } /// This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. -pub async fn list_o_auth2_consent_sessions(configuration: &configuration::Configuration, subject: &str, page_size: Option, page_token: Option<&str>, login_session_id: Option<&str>) -> Result, Error> { +pub async fn list_o_auth2_consent_sessions(configuration: &configuration::Configuration, subject: &str, page_size: Option, page_token: Option<&str>, login_session_id: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = page_size { - local_var_req_builder = local_var_req_builder.query(&[("page_size", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]); } if let Some(ref local_var_str) = page_token { - local_var_req_builder = local_var_req_builder.query(&[("page_token", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("page_token", &local_var_str.to_string())]); } - local_var_req_builder = local_var_req_builder.query(&[("subject", subject.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subject", &subject.to_string())]); if let Some(ref local_var_str) = login_session_id { - local_var_req_builder = local_var_req_builder.query(&[("login_session_id", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("login_session_id", &local_var_str.to_string())]); } - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -707,23 +706,24 @@ pub async fn list_o_auth2_consent_sessions(configuration: &configuration::Config } /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. -pub async fn list_trusted_o_auth2_jwt_grant_issuers(configuration: &configuration::Configuration, max_items: Option, default_items: Option, issuer: Option<&str>) -> Result, Error> { +pub async fn list_trusted_o_auth2_jwt_grant_issuers(configuration: &configuration::Configuration, max_items: Option, default_items: Option, issuer: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", configuration.base_path); + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = max_items { - local_var_req_builder = local_var_req_builder.query(&[("MaxItems", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("MaxItems", &local_var_str.to_string())]); } if let Some(ref local_var_str) = default_items { - local_var_req_builder = local_var_req_builder.query(&[("DefaultItems", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("DefaultItems", &local_var_str.to_string())]); } if let Some(ref local_var_str) = issuer { - local_var_req_builder = local_var_req_builder.query(&[("issuer", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("issuer", &local_var_str.to_string())]); } - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -743,14 +743,15 @@ pub async fn list_trusted_o_auth2_jwt_grant_issuers(configuration: &configuratio } /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. -pub async fn o_auth2_authorize(configuration: &configuration::Configuration, ) -> Result> { +pub async fn o_auth2_authorize(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/auth", configuration.base_path); + let local_var_uri_str = format!("{}/oauth2/auth", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -770,20 +771,21 @@ pub async fn o_auth2_authorize(configuration: &configuration::Configuration, ) - } /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. -pub async fn oauth2_token_exchange(configuration: &configuration::Configuration, grant_type: &str, client_id: Option<&str>, code: Option<&str>, redirect_uri: Option<&str>, refresh_token: Option<&str>) -> Result> { +pub async fn oauth2_token_exchange(configuration: &configuration::Configuration, grant_type: &str, client_id: Option<&str>, code: Option<&str>, redirect_uri: Option<&str>, refresh_token: Option<&str>) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/token", configuration.base_path); + let local_var_uri_str = format!("{}/oauth2/token", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_auth_conf) = configuration.basic_auth { + if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth { local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned()); }; - if let Some(ref local_var_token) = configuration.oauth_access_token { + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; let mut local_var_form_params = std::collections::HashMap::new(); @@ -818,14 +820,15 @@ pub async fn oauth2_token_exchange(configuration: &configuration::Configuration, } /// Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. -pub async fn patch_o_auth2_client(configuration: &configuration::Configuration, id: &str, json_patch: Vec) -> Result> { +pub async fn patch_o_auth2_client(configuration: &configuration::Configuration, id: &str, json_patch: Vec) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/clients/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&json_patch); @@ -846,15 +849,16 @@ pub async fn patch_o_auth2_client(configuration: &configuration::Configuration, } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. -pub async fn reject_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, reject_o_auth2_request: Option<&crate::models::RejectOAuth2Request>) -> Result> { +pub async fn reject_o_auth2_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, reject_o_auth2_request: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/reject", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/reject", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", consent_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("consent_challenge", &consent_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&reject_o_auth2_request); @@ -875,15 +879,16 @@ pub async fn reject_o_auth2_consent_request(configuration: &configuration::Confi } /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. -pub async fn reject_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str, reject_o_auth2_request: Option<&crate::models::RejectOAuth2Request>) -> Result> { +pub async fn reject_o_auth2_login_request(configuration: &configuration::Configuration, login_challenge: &str, reject_o_auth2_request: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/reject", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/reject", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("login_challenge", login_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("login_challenge", &login_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&reject_o_auth2_request); @@ -905,14 +910,15 @@ pub async fn reject_o_auth2_login_request(configuration: &configuration::Configu /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. pub async fn reject_o_auth2_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/reject", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/reject", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", logout_challenge.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.query(&[("logout_challenge", &logout_challenge.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -933,20 +939,21 @@ pub async fn reject_o_auth2_logout_request(configuration: &configuration::Config /// This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. pub async fn revoke_o_auth2_consent_sessions(configuration: &configuration::Configuration, subject: &str, client: Option<&str>, all: Option) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("subject", subject.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subject", &subject.to_string())]); if let Some(ref local_var_str) = client { - local_var_req_builder = local_var_req_builder.query(&[("client", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("client", &local_var_str.to_string())]); } if let Some(ref local_var_str) = all { - local_var_req_builder = local_var_req_builder.query(&[("all", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("all", &local_var_str.to_string())]); } - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -967,19 +974,20 @@ pub async fn revoke_o_auth2_consent_sessions(configuration: &configuration::Conf /// This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. pub async fn revoke_o_auth2_login_sessions(configuration: &configuration::Configuration, subject: Option<&str>, sid: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/login", configuration.base_path); + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/login", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_str) = subject { - local_var_req_builder = local_var_req_builder.query(&[("subject", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subject", &local_var_str.to_string())]); } if let Some(ref local_var_str) = sid { - local_var_req_builder = local_var_req_builder.query(&[("sid", local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("sid", &local_var_str.to_string())]); } - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -1000,19 +1008,20 @@ pub async fn revoke_o_auth2_login_sessions(configuration: &configuration::Config /// Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. pub async fn revoke_o_auth2_token(configuration: &configuration::Configuration, token: &str, client_id: Option<&str>, client_secret: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/revoke", configuration.base_path); + let local_var_uri_str = format!("{}/oauth2/revoke", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_auth_conf) = configuration.basic_auth { + if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth { local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned()); }; - if let Some(ref local_var_token) = configuration.oauth_access_token { + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; let mut local_var_form_params = std::collections::HashMap::new(); @@ -1041,14 +1050,15 @@ pub async fn revoke_o_auth2_token(configuration: &configuration::Configuration, } /// Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. -pub async fn set_o_auth2_client(configuration: &configuration::Configuration, id: &str, o_auth2_client: &crate::models::OAuth2Client) -> Result> { +pub async fn set_o_auth2_client(configuration: &configuration::Configuration, id: &str, o_auth2_client: models::OAuth2Client) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/clients/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&o_auth2_client); @@ -1069,14 +1079,15 @@ pub async fn set_o_auth2_client(configuration: &configuration::Configuration, id } /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. -pub async fn set_o_auth2_client_lifespans(configuration: &configuration::Configuration, id: &str, o_auth2_client_token_lifespans: Option<&crate::models::OAuth2ClientTokenLifespans>) -> Result> { +pub async fn set_o_auth2_client_lifespans(configuration: &configuration::Configuration, id: &str, o_auth2_client_token_lifespans: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/clients/{id}/lifespans", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/admin/clients/{id}/lifespans", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&o_auth2_client_token_lifespans); @@ -1097,14 +1108,15 @@ pub async fn set_o_auth2_client_lifespans(configuration: &configuration::Configu } /// Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). -pub async fn trust_o_auth2_jwt_grant_issuer(configuration: &configuration::Configuration, trust_o_auth2_jwt_grant_issuer: Option<&crate::models::TrustOAuth2JwtGrantIssuer>) -> Result> { +pub async fn trust_o_auth2_jwt_grant_issuer(configuration: &configuration::Configuration, trust_o_auth2_jwt_grant_issuer: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", configuration.base_path); + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&trust_o_auth2_jwt_grant_issuer); diff --git a/clients/hydra/rust/src/apis/oidc_api.rs b/clients/hydra/rust/src/apis/oidc_api.rs index f6e4c1d1ea2..ec00fd86df3 100644 --- a/clients/hydra/rust/src/apis/oidc_api.rs +++ b/clients/hydra/rust/src/apis/oidc_api.rs @@ -3,110 +3,95 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use std::fmt::Display; - -use num_traits; use reqwest; - -use crate::apis::ResponseContent; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; -trait NumVecJoin { - fn join(&self, sep: &str) -> String; -} - -impl NumVecJoin for Vec { - fn join(&self, sep: &str) -> String { - self.iter() - .map(ToString::to_string) - .collect::>() - .join(sep) - } -} - -/// struct for typed errors of method `create_oidc_dynamic_client` +/// struct for typed errors of method [`create_oidc_dynamic_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateOidcDynamicClientError { - Status400(crate::models::ErrorOAuth2), - DefaultResponse(crate::models::ErrorOAuth2), + Status400(models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_verifiable_credential` +/// struct for typed errors of method [`create_verifiable_credential`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateVerifiableCredentialError { - Status400(crate::models::VerifiableCredentialPrimingResponse), - DefaultResponse(crate::models::ErrorOAuth2), + Status400(models::VerifiableCredentialPrimingResponse), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_oidc_dynamic_client` +/// struct for typed errors of method [`delete_oidc_dynamic_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOidcDynamicClientError { - DefaultResponse(crate::models::GenericError), + DefaultResponse(models::GenericError), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `discover_oidc_configuration` +/// struct for typed errors of method [`discover_oidc_configuration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DiscoverOidcConfigurationError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_oidc_dynamic_client` +/// struct for typed errors of method [`get_oidc_dynamic_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOidcDynamicClientError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_oidc_user_info` +/// struct for typed errors of method [`get_oidc_user_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOidcUserInfoError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } -/// struct for typed errors of method `revoke_oidc_session` +/// struct for typed errors of method [`revoke_oidc_session`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RevokeOidcSessionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `set_oidc_dynamic_client` +/// struct for typed errors of method [`set_oidc_dynamic_client`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum SetOidcDynamicClientError { - Status404(crate::models::ErrorOAuth2), - DefaultResponse(crate::models::ErrorOAuth2), + Status404(models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } /// This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. -pub async fn create_oidc_dynamic_client(configuration: &configuration::Configuration, o_auth2_client: &crate::models::OAuth2Client) -> Result> { +pub async fn create_oidc_dynamic_client(configuration: &configuration::Configuration, o_auth2_client: models::OAuth2Client) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/register", configuration.base_path); + let local_var_uri_str = format!("{}/oauth2/register", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&o_auth2_client); @@ -127,14 +112,15 @@ pub async fn create_oidc_dynamic_client(configuration: &configuration::Configura } /// This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. -pub async fn create_verifiable_credential(configuration: &configuration::Configuration, create_verifiable_credential_request_body: Option<&crate::models::CreateVerifiableCredentialRequestBody>) -> Result> { +pub async fn create_verifiable_credential(configuration: &configuration::Configuration, create_verifiable_credential_request_body: Option) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/credentials", configuration.base_path); + let local_var_uri_str = format!("{}/credentials", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&create_verifiable_credential_request_body); @@ -156,16 +142,17 @@ pub async fn create_verifiable_credential(configuration: &configuration::Configu /// This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. pub async fn delete_oidc_dynamic_client(configuration: &configuration::Configuration, id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/register/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/oauth2/register/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_token) = configuration.bearer_access_token { + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; @@ -185,14 +172,15 @@ pub async fn delete_oidc_dynamic_client(configuration: &configuration::Configura } /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ -pub async fn discover_oidc_configuration(configuration: &configuration::Configuration, ) -> Result> { +pub async fn discover_oidc_configuration(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/.well-known/openid-configuration", configuration.base_path); + let local_var_uri_str = format!("{}/.well-known/openid-configuration", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -212,17 +200,18 @@ pub async fn discover_oidc_configuration(configuration: &configuration::Configur } /// This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. -pub async fn get_oidc_dynamic_client(configuration: &configuration::Configuration, id: &str) -> Result> { +pub async fn get_oidc_dynamic_client(configuration: &configuration::Configuration, id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/register/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/oauth2/register/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_token) = configuration.bearer_access_token { + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; @@ -242,17 +231,18 @@ pub async fn get_oidc_dynamic_client(configuration: &configuration::Configuratio } /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. -pub async fn get_oidc_user_info(configuration: &configuration::Configuration, ) -> Result> { +pub async fn get_oidc_user_info(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/userinfo", configuration.base_path); + let local_var_uri_str = format!("{}/userinfo", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_token) = configuration.oauth_access_token { + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; @@ -273,13 +263,14 @@ pub async fn get_oidc_user_info(configuration: &configuration::Configuration, ) /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. pub async fn revoke_oidc_session(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/sessions/logout", configuration.base_path); + let local_var_uri_str = format!("{}/oauth2/sessions/logout", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } @@ -299,17 +290,18 @@ pub async fn revoke_oidc_session(configuration: &configuration::Configuration, ) } /// This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. -pub async fn set_oidc_dynamic_client(configuration: &configuration::Configuration, id: &str, o_auth2_client: &crate::models::OAuth2Client) -> Result> { +pub async fn set_oidc_dynamic_client(configuration: &configuration::Configuration, id: &str, o_auth2_client: models::OAuth2Client) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/register/{id}", configuration.base_path, id=crate::apis::urlencode(id)); + let local_var_uri_str = format!("{}/oauth2/register/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } - if let Some(ref local_var_token) = configuration.bearer_access_token { + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; local_var_req_builder = local_var_req_builder.json(&o_auth2_client); diff --git a/clients/hydra/rust/src/apis/wellknown_api.rs b/clients/hydra/rust/src/apis/wellknown_api.rs index 1f67e833d84..0fec585ff93 100644 --- a/clients/hydra/rust/src/apis/wellknown_api.rs +++ b/clients/hydra/rust/src/apis/wellknown_api.rs @@ -3,52 +3,37 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -use std::fmt::Display; - -use num_traits; use reqwest; - -use crate::apis::ResponseContent; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; -trait NumVecJoin { - fn join(&self, sep: &str) -> String; -} - -impl NumVecJoin for Vec { - fn join(&self, sep: &str) -> String { - self.iter() - .map(ToString::to_string) - .collect::>() - .join(sep) - } -} - -/// struct for typed errors of method `discover_json_web_keys` +/// struct for typed errors of method [`discover_json_web_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DiscoverJsonWebKeysError { - DefaultResponse(crate::models::ErrorOAuth2), + DefaultResponse(models::ErrorOAuth2), UnknownValue(serde_json::Value), } /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. -pub async fn discover_json_web_keys(configuration: &configuration::Configuration, ) -> Result> { +pub async fn discover_json_web_keys(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/.well-known/jwks.json", configuration.base_path); + let local_var_uri_str = format!("{}/.well-known/jwks.json", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = configuration.user_agent { + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } diff --git a/clients/hydra/rust/src/lib.rs b/clients/hydra/rust/src/lib.rs index c1dd666f795..a1837b966dc 100644 --- a/clients/hydra/rust/src/lib.rs +++ b/clients/hydra/rust/src/lib.rs @@ -1,5 +1,5 @@ -#[macro_use] -extern crate serde_derive; +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] extern crate serde; extern crate serde_json; diff --git a/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs b/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs index 567937df1f1..416371aae97 100644 --- a/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs @@ -3,18 +3,18 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptOAuth2ConsentRequest { - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, + #[serde(rename = "context", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub context: Option>, #[serde(rename = "grant_access_token_audience", skip_serializing_if = "Option::is_none")] pub grant_access_token_audience: Option>, #[serde(rename = "grant_scope", skip_serializing_if = "Option::is_none")] @@ -28,27 +28,20 @@ pub struct AcceptOAuth2ConsentRequest { #[serde(rename = "remember_for", skip_serializing_if = "Option::is_none")] pub remember_for: Option, #[serde(rename = "session", skip_serializing_if = "Option::is_none")] - pub session: Option>, -} - -impl Default for AcceptOAuth2ConsentRequest { - fn default() -> Self { - Self::new() - } + pub session: Option>, } impl AcceptOAuth2ConsentRequest { pub fn new() -> AcceptOAuth2ConsentRequest { AcceptOAuth2ConsentRequest { - context: None, - grant_access_token_audience: None, - grant_scope: None, - handled_at: None, - remember: None, - remember_for: None, - session: None, + context: None, + grant_access_token_audience: None, + grant_scope: None, + handled_at: None, + remember: None, + remember_for: None, + session: None, } } } - diff --git a/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs b/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs index b53e2adca5c..beb9af190c7 100644 --- a/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs @@ -3,37 +3,30 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptOAuth2ConsentRequestSession { /// AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! - #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] - pub access_token: Option, + #[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub access_token: Option>, /// IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! - #[serde(rename = "id_token", skip_serializing_if = "Option::is_none")] - pub id_token: Option, -} - -impl Default for AcceptOAuth2ConsentRequestSession { - fn default() -> Self { - Self::new() - } + #[serde(rename = "id_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id_token: Option>, } impl AcceptOAuth2ConsentRequestSession { pub fn new() -> AcceptOAuth2ConsentRequestSession { AcceptOAuth2ConsentRequestSession { - access_token: None, - id_token: None, + access_token: None, + id_token: None, } } } - diff --git a/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs b/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs index 77f856ca8b8..28729f23ce5 100644 --- a/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs @@ -3,23 +3,23 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptOAuth2LoginRequest { /// ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. #[serde(rename = "acr", skip_serializing_if = "Option::is_none")] pub acr: Option, #[serde(rename = "amr", skip_serializing_if = "Option::is_none")] pub amr: Option>, - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, + #[serde(rename = "context", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub context: Option>, /// Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. #[serde(rename = "extend_session_lifespan", skip_serializing_if = "Option::is_none")] pub extend_session_lifespan: Option, @@ -40,21 +40,19 @@ pub struct AcceptOAuth2LoginRequest { pub subject: String, } - impl AcceptOAuth2LoginRequest { pub fn new(subject: String) -> AcceptOAuth2LoginRequest { AcceptOAuth2LoginRequest { - acr: None, - amr: None, - context: None, - extend_session_lifespan: None, - force_subject_identifier: None, - identity_provider_session_id: None, - remember: None, - remember_for: None, - subject, + acr: None, + amr: None, + context: None, + extend_session_lifespan: None, + force_subject_identifier: None, + identity_provider_session_id: None, + remember: None, + remember_for: None, + subject, } } } - diff --git a/clients/hydra/rust/src/models/create_json_web_key_set.rs b/clients/hydra/rust/src/models/create_json_web_key_set.rs index b5d8a83cc6c..29ff06022df 100644 --- a/clients/hydra/rust/src/models/create_json_web_key_set.rs +++ b/clients/hydra/rust/src/models/create_json_web_key_set.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// CreateJsonWebKeySet : Create JSON Web Key Set Request Body - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// CreateJsonWebKeySet : Create JSON Web Key Set Request Body +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateJsonWebKeySet { /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. #[serde(rename = "alg")] @@ -22,19 +22,17 @@ pub struct CreateJsonWebKeySet { pub kid: String, /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". #[serde(rename = "use")] - pub _use: String, + pub r#use: String, } - impl CreateJsonWebKeySet { /// Create JSON Web Key Set Request Body - pub fn new(alg: String, kid: String, _use: String) -> CreateJsonWebKeySet { + pub fn new(alg: String, kid: String, r#use: String) -> CreateJsonWebKeySet { CreateJsonWebKeySet { - alg, - kid, - _use, + alg, + kid, + r#use, } } } - diff --git a/clients/hydra/rust/src/models/create_verifiable_credential_request_body.rs b/clients/hydra/rust/src/models/create_verifiable_credential_request_body.rs index 5dd5c722068..cd3c20e9e54 100644 --- a/clients/hydra/rust/src/models/create_verifiable_credential_request_body.rs +++ b/clients/hydra/rust/src/models/create_verifiable_credential_request_body.rs @@ -3,38 +3,31 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateVerifiableCredentialRequestBody { #[serde(rename = "format", skip_serializing_if = "Option::is_none")] pub format: Option, #[serde(rename = "proof", skip_serializing_if = "Option::is_none")] - pub proof: Option>, + pub proof: Option>, #[serde(rename = "types", skip_serializing_if = "Option::is_none")] pub types: Option>, } -impl Default for CreateVerifiableCredentialRequestBody { - fn default() -> Self { - Self::new() - } -} - impl CreateVerifiableCredentialRequestBody { pub fn new() -> CreateVerifiableCredentialRequestBody { CreateVerifiableCredentialRequestBody { - format: None, - proof: None, - types: None, + format: None, + proof: None, + types: None, } } } - diff --git a/clients/hydra/rust/src/models/credential_supported_draft00.rs b/clients/hydra/rust/src/models/credential_supported_draft00.rs index 144c54d527a..2d14191b241 100644 --- a/clients/hydra/rust/src/models/credential_supported_draft00.rs +++ b/clients/hydra/rust/src/models/credential_supported_draft00.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// CredentialSupportedDraft00 : Includes information about the supported verifiable credentials. - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// CredentialSupportedDraft00 : Includes information about the supported verifiable credentials. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CredentialSupportedDraft00 { /// OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. #[serde(rename = "cryptographic_binding_methods_supported", skip_serializing_if = "Option::is_none")] @@ -28,22 +28,15 @@ pub struct CredentialSupportedDraft00 { pub types: Option>, } -impl Default for CredentialSupportedDraft00 { - fn default() -> Self { - Self::new() - } -} - impl CredentialSupportedDraft00 { /// Includes information about the supported verifiable credentials. pub fn new() -> CredentialSupportedDraft00 { CredentialSupportedDraft00 { - cryptographic_binding_methods_supported: None, - cryptographic_suites_supported: None, - format: None, - types: None, + cryptographic_binding_methods_supported: None, + cryptographic_suites_supported: None, + format: None, + types: None, } } } - diff --git a/clients/hydra/rust/src/models/error_o_auth2.rs b/clients/hydra/rust/src/models/error_o_auth2.rs index 0bfb87675e1..621cf77b873 100644 --- a/clients/hydra/rust/src/models/error_o_auth2.rs +++ b/clients/hydra/rust/src/models/error_o_auth2.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// ErrorOAuth2 : Error - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// ErrorOAuth2 : Error +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorOAuth2 { /// Error #[serde(rename = "error", skip_serializing_if = "Option::is_none")] @@ -31,23 +31,16 @@ pub struct ErrorOAuth2 { pub status_code: Option, } -impl Default for ErrorOAuth2 { - fn default() -> Self { - Self::new() - } -} - impl ErrorOAuth2 { /// Error pub fn new() -> ErrorOAuth2 { ErrorOAuth2 { - error: None, - error_debug: None, - error_description: None, - error_hint: None, - status_code: None, + error: None, + error_debug: None, + error_description: None, + error_hint: None, + status_code: None, } } } - diff --git a/clients/hydra/rust/src/models/generic_error.rs b/clients/hydra/rust/src/models/generic_error.rs index 78c8692ebe5..3b86964bfeb 100644 --- a/clients/hydra/rust/src/models/generic_error.rs +++ b/clients/hydra/rust/src/models/generic_error.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GenericError { /// The status code #[serde(rename = "code", skip_serializing_if = "Option::is_none")] @@ -20,8 +20,8 @@ pub struct GenericError { #[serde(rename = "debug", skip_serializing_if = "Option::is_none")] pub debug: Option, /// Further error details - #[serde(rename = "details", skip_serializing_if = "Option::is_none")] - pub details: Option, + #[serde(rename = "details", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub details: Option>, /// The error ID Useful when trying to identify various errors in application logic. #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, @@ -39,20 +39,18 @@ pub struct GenericError { pub status: Option, } - impl GenericError { pub fn new(message: String) -> GenericError { GenericError { - code: None, - debug: None, - details: None, - id: None, - message, - reason: None, - request: None, - status: None, + code: None, + debug: None, + details: None, + id: None, + message, + reason: None, + request: None, + status: None, } } } - diff --git a/clients/hydra/rust/src/models/get_version_200_response.rs b/clients/hydra/rust/src/models/get_version_200_response.rs index b1ea644c2eb..f0231db2108 100644 --- a/clients/hydra/rust/src/models/get_version_200_response.rs +++ b/clients/hydra/rust/src/models/get_version_200_response.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetVersion200Response { /// The version of Ory Hydra. #[serde(rename = "version", skip_serializing_if = "Option::is_none")] pub version: Option, } -impl Default for GetVersion200Response { - fn default() -> Self { - Self::new() - } -} - impl GetVersion200Response { pub fn new() -> GetVersion200Response { GetVersion200Response { - version: None, + version: None, } } } - diff --git a/clients/hydra/rust/src/models/health_not_ready_status.rs b/clients/hydra/rust/src/models/health_not_ready_status.rs index 14e0dae7745..85be9185f00 100644 --- a/clients/hydra/rust/src/models/health_not_ready_status.rs +++ b/clients/hydra/rust/src/models/health_not_ready_status.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HealthNotReadyStatus { /// Errors contains a list of errors that caused the not ready status. #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] - pub errors: Option<::std::collections::HashMap>, -} - -impl Default for HealthNotReadyStatus { - fn default() -> Self { - Self::new() - } + pub errors: Option>, } impl HealthNotReadyStatus { pub fn new() -> HealthNotReadyStatus { HealthNotReadyStatus { - errors: None, + errors: None, } } } - diff --git a/clients/hydra/rust/src/models/health_status.rs b/clients/hydra/rust/src/models/health_status.rs index 8f069581fba..cdbea416e03 100644 --- a/clients/hydra/rust/src/models/health_status.rs +++ b/clients/hydra/rust/src/models/health_status.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HealthStatus { /// Status always contains \"ok\". #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } -impl Default for HealthStatus { - fn default() -> Self { - Self::new() - } -} - impl HealthStatus { pub fn new() -> HealthStatus { HealthStatus { - status: None, + status: None, } } } - diff --git a/clients/hydra/rust/src/models/introspected_o_auth2_token.rs b/clients/hydra/rust/src/models/introspected_o_auth2_token.rs index 640e80dc94b..4d6c8195890 100644 --- a/clients/hydra/rust/src/models/introspected_o_auth2_token.rs +++ b/clients/hydra/rust/src/models/introspected_o_auth2_token.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// IntrospectedOAuth2Token : Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// IntrospectedOAuth2Token : Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IntrospectedOAuth2Token { /// Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). #[serde(rename = "active")] @@ -28,7 +28,7 @@ pub struct IntrospectedOAuth2Token { pub exp: Option, /// Extra is arbitrary data set by the session. #[serde(rename = "ext", skip_serializing_if = "Option::is_none")] - pub ext: Option<::std::collections::HashMap>, + pub ext: Option>, /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. #[serde(rename = "iat", skip_serializing_if = "Option::is_none")] pub iat: Option, @@ -58,27 +58,25 @@ pub struct IntrospectedOAuth2Token { pub username: Option, } - impl IntrospectedOAuth2Token { /// Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) pub fn new(active: bool) -> IntrospectedOAuth2Token { IntrospectedOAuth2Token { - active, - aud: None, - client_id: None, - exp: None, - ext: None, - iat: None, - iss: None, - nbf: None, - obfuscated_subject: None, - scope: None, - sub: None, - token_type: None, - token_use: None, - username: None, + active, + aud: None, + client_id: None, + exp: None, + ext: None, + iat: None, + iss: None, + nbf: None, + obfuscated_subject: None, + scope: None, + sub: None, + token_type: None, + token_use: None, + username: None, } } } - diff --git a/clients/hydra/rust/src/models/is_ready_200_response.rs b/clients/hydra/rust/src/models/is_ready_200_response.rs index 42b86279aff..cc9bf0c53dd 100644 --- a/clients/hydra/rust/src/models/is_ready_200_response.rs +++ b/clients/hydra/rust/src/models/is_ready_200_response.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IsReady200Response { /// Always \"ok\". #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } -impl Default for IsReady200Response { - fn default() -> Self { - Self::new() - } -} - impl IsReady200Response { pub fn new() -> IsReady200Response { IsReady200Response { - status: None, + status: None, } } } - diff --git a/clients/hydra/rust/src/models/is_ready_503_response.rs b/clients/hydra/rust/src/models/is_ready_503_response.rs index d1df243706c..fc36839c0c5 100644 --- a/clients/hydra/rust/src/models/is_ready_503_response.rs +++ b/clients/hydra/rust/src/models/is_ready_503_response.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IsReady503Response { /// Errors contains a list of errors that caused the not ready status. #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] - pub errors: Option<::std::collections::HashMap>, -} - -impl Default for IsReady503Response { - fn default() -> Self { - Self::new() - } + pub errors: Option>, } impl IsReady503Response { pub fn new() -> IsReady503Response { IsReady503Response { - errors: None, + errors: None, } } } - diff --git a/clients/hydra/rust/src/models/json_patch.rs b/clients/hydra/rust/src/models/json_patch.rs index cf998bab883..fe24e9d28e6 100644 --- a/clients/hydra/rust/src/models/json_patch.rs +++ b/clients/hydra/rust/src/models/json_patch.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// JsonPatch : A JSONPatch document as defined by RFC 6902 - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// JsonPatch : A JSONPatch document as defined by RFC 6902 +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct JsonPatch { /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). #[serde(rename = "from", skip_serializing_if = "Option::is_none")] @@ -24,21 +24,19 @@ pub struct JsonPatch { #[serde(rename = "path")] pub path: String, /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, + #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub value: Option>, } - impl JsonPatch { /// A JSONPatch document as defined by RFC 6902 pub fn new(op: String, path: String) -> JsonPatch { JsonPatch { - from: None, - op, - path, - value: None, + from: None, + op, + path, + value: None, } } } - diff --git a/clients/hydra/rust/src/models/json_web_key.rs b/clients/hydra/rust/src/models/json_web_key.rs index 999b2522e55..70f941e7cc5 100644 --- a/clients/hydra/rust/src/models/json_web_key.rs +++ b/clients/hydra/rust/src/models/json_web_key.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct JsonWebKey { /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. #[serde(rename = "alg")] @@ -44,7 +44,7 @@ pub struct JsonWebKey { pub qi: Option, /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). #[serde(rename = "use")] - pub _use: String, + pub r#use: String, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, /// The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. @@ -54,29 +54,27 @@ pub struct JsonWebKey { pub y: Option, } - impl JsonWebKey { - pub fn new(alg: String, kid: String, kty: String, _use: String) -> JsonWebKey { + pub fn new(alg: String, kid: String, kty: String, r#use: String) -> JsonWebKey { JsonWebKey { - alg, - crv: None, - d: None, - dp: None, - dq: None, - e: None, - k: None, - kid, - kty, - n: None, - p: None, - q: None, - qi: None, - _use, - x: None, - x5c: None, - y: None, + alg, + crv: None, + d: None, + dp: None, + dq: None, + e: None, + k: None, + kid, + kty, + n: None, + p: None, + q: None, + qi: None, + r#use, + x: None, + x5c: None, + y: None, } } } - diff --git a/clients/hydra/rust/src/models/json_web_key_set.rs b/clients/hydra/rust/src/models/json_web_key_set.rs index ec14f9fc632..0c9d340d4d6 100644 --- a/clients/hydra/rust/src/models/json_web_key_set.rs +++ b/clients/hydra/rust/src/models/json_web_key_set.rs @@ -3,35 +3,28 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// JsonWebKeySet : JSON Web Key Set - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// JsonWebKeySet : JSON Web Key Set +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct JsonWebKeySet { /// List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. #[serde(rename = "keys", skip_serializing_if = "Option::is_none")] - pub keys: Option>, -} - -impl Default for JsonWebKeySet { - fn default() -> Self { - Self::new() - } + pub keys: Option>, } impl JsonWebKeySet { /// JSON Web Key Set pub fn new() -> JsonWebKeySet { JsonWebKeySet { - keys: None, + keys: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_client.rs b/clients/hydra/rust/src/models/o_auth2_client.rs index 623fb2063d6..aeac8f079dd 100644 --- a/clients/hydra/rust/src/models/o_auth2_client.rs +++ b/clients/hydra/rust/src/models/o_auth2_client.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2Client : OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OAuth2Client : OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2Client { /// OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. #[serde(rename = "access_token_strategy", skip_serializing_if = "Option::is_none")] @@ -74,8 +74,8 @@ pub struct OAuth2Client { #[serde(rename = "implicit_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] pub implicit_grant_id_token_lifespan: Option, /// OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. - #[serde(rename = "jwks", skip_serializing_if = "Option::is_none")] - pub jwks: Option, + #[serde(rename = "jwks", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub jwks: Option>, /// OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. #[serde(rename = "jwks_uri", skip_serializing_if = "Option::is_none")] pub jwks_uri: Option, @@ -85,8 +85,8 @@ pub struct OAuth2Client { /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. #[serde(rename = "logo_uri", skip_serializing_if = "Option::is_none")] pub logo_uri: Option, - #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] - pub metadata: Option, + #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. #[serde(rename = "owner", skip_serializing_if = "Option::is_none")] pub owner: Option, @@ -151,66 +151,59 @@ pub struct OAuth2Client { pub userinfo_signed_response_alg: Option, } -impl Default for OAuth2Client { - fn default() -> Self { - Self::new() - } -} - impl OAuth2Client { /// OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. pub fn new() -> OAuth2Client { OAuth2Client { - access_token_strategy: None, - allowed_cors_origins: None, - audience: None, - authorization_code_grant_access_token_lifespan: None, - authorization_code_grant_id_token_lifespan: None, - authorization_code_grant_refresh_token_lifespan: None, - backchannel_logout_session_required: None, - backchannel_logout_uri: None, - client_credentials_grant_access_token_lifespan: None, - client_id: None, - client_name: None, - client_secret: None, - client_secret_expires_at: None, - client_uri: None, - contacts: None, - created_at: None, - frontchannel_logout_session_required: None, - frontchannel_logout_uri: None, - grant_types: None, - implicit_grant_access_token_lifespan: None, - implicit_grant_id_token_lifespan: None, - jwks: None, - jwks_uri: None, - jwt_bearer_grant_access_token_lifespan: None, - logo_uri: None, - metadata: None, - owner: None, - policy_uri: None, - post_logout_redirect_uris: None, - redirect_uris: None, - refresh_token_grant_access_token_lifespan: None, - refresh_token_grant_id_token_lifespan: None, - refresh_token_grant_refresh_token_lifespan: None, - registration_access_token: None, - registration_client_uri: None, - request_object_signing_alg: None, - request_uris: None, - response_types: None, - scope: None, - sector_identifier_uri: None, - skip_consent: None, - skip_logout_consent: None, - subject_type: None, - token_endpoint_auth_method: None, - token_endpoint_auth_signing_alg: None, - tos_uri: None, - updated_at: None, - userinfo_signed_response_alg: None, + access_token_strategy: None, + allowed_cors_origins: None, + audience: None, + authorization_code_grant_access_token_lifespan: None, + authorization_code_grant_id_token_lifespan: None, + authorization_code_grant_refresh_token_lifespan: None, + backchannel_logout_session_required: None, + backchannel_logout_uri: None, + client_credentials_grant_access_token_lifespan: None, + client_id: None, + client_name: None, + client_secret: None, + client_secret_expires_at: None, + client_uri: None, + contacts: None, + created_at: None, + frontchannel_logout_session_required: None, + frontchannel_logout_uri: None, + grant_types: None, + implicit_grant_access_token_lifespan: None, + implicit_grant_id_token_lifespan: None, + jwks: None, + jwks_uri: None, + jwt_bearer_grant_access_token_lifespan: None, + logo_uri: None, + metadata: None, + owner: None, + policy_uri: None, + post_logout_redirect_uris: None, + redirect_uris: None, + refresh_token_grant_access_token_lifespan: None, + refresh_token_grant_id_token_lifespan: None, + refresh_token_grant_refresh_token_lifespan: None, + registration_access_token: None, + registration_client_uri: None, + request_object_signing_alg: None, + request_uris: None, + response_types: None, + scope: None, + sector_identifier_uri: None, + skip_consent: None, + skip_logout_consent: None, + subject_type: None, + token_endpoint_auth_method: None, + token_endpoint_auth_signing_alg: None, + tos_uri: None, + updated_at: None, + userinfo_signed_response_alg: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs b/clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs index be69bfa7148..b00dc2f0c5b 100644 --- a/clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs +++ b/clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2ClientTokenLifespans : Lifespans of different token types issued for this OAuth 2.0 Client. - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OAuth2ClientTokenLifespans : Lifespans of different token types issued for this OAuth 2.0 Client. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2ClientTokenLifespans { /// Specify a time duration in milliseconds, seconds, minutes, hours. #[serde(rename = "authorization_code_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] @@ -46,28 +46,21 @@ pub struct OAuth2ClientTokenLifespans { pub refresh_token_grant_refresh_token_lifespan: Option, } -impl Default for OAuth2ClientTokenLifespans { - fn default() -> Self { - Self::new() - } -} - impl OAuth2ClientTokenLifespans { /// Lifespans of different token types issued for this OAuth 2.0 Client. pub fn new() -> OAuth2ClientTokenLifespans { OAuth2ClientTokenLifespans { - authorization_code_grant_access_token_lifespan: None, - authorization_code_grant_id_token_lifespan: None, - authorization_code_grant_refresh_token_lifespan: None, - client_credentials_grant_access_token_lifespan: None, - implicit_grant_access_token_lifespan: None, - implicit_grant_id_token_lifespan: None, - jwt_bearer_grant_access_token_lifespan: None, - refresh_token_grant_access_token_lifespan: None, - refresh_token_grant_id_token_lifespan: None, - refresh_token_grant_refresh_token_lifespan: None, + authorization_code_grant_access_token_lifespan: None, + authorization_code_grant_id_token_lifespan: None, + authorization_code_grant_refresh_token_lifespan: None, + client_credentials_grant_access_token_lifespan: None, + implicit_grant_access_token_lifespan: None, + implicit_grant_id_token_lifespan: None, + jwt_bearer_grant_access_token_lifespan: None, + refresh_token_grant_access_token_lifespan: None, + refresh_token_grant_id_token_lifespan: None, + refresh_token_grant_refresh_token_lifespan: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_consent_request.rs b/clients/hydra/rust/src/models/o_auth2_consent_request.rs index d76e808dc09..b021fad8f1d 100644 --- a/clients/hydra/rust/src/models/o_auth2_consent_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_request.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2ConsentRequest { /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. #[serde(rename = "acr", skip_serializing_if = "Option::is_none")] @@ -22,9 +22,9 @@ pub struct OAuth2ConsentRequest { #[serde(rename = "challenge")] pub challenge: String, #[serde(rename = "client", skip_serializing_if = "Option::is_none")] - pub client: Option>, - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, + pub client: Option>, + #[serde(rename = "context", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub context: Option>, /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. #[serde(rename = "login_challenge", skip_serializing_if = "Option::is_none")] pub login_challenge: Option, @@ -32,7 +32,7 @@ pub struct OAuth2ConsentRequest { #[serde(rename = "login_session_id", skip_serializing_if = "Option::is_none")] pub login_session_id: Option, #[serde(rename = "oidc_context", skip_serializing_if = "Option::is_none")] - pub oidc_context: Option>, + pub oidc_context: Option>, /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. #[serde(rename = "request_url", skip_serializing_if = "Option::is_none")] pub request_url: Option, @@ -48,25 +48,23 @@ pub struct OAuth2ConsentRequest { pub subject: Option, } - impl OAuth2ConsentRequest { pub fn new(challenge: String) -> OAuth2ConsentRequest { OAuth2ConsentRequest { - acr: None, - amr: None, - challenge, - client: None, - context: None, - login_challenge: None, - login_session_id: None, - oidc_context: None, - request_url: None, - requested_access_token_audience: None, - requested_scope: None, - skip: None, - subject: None, + acr: None, + amr: None, + challenge, + client: None, + context: None, + login_challenge: None, + login_session_id: None, + oidc_context: None, + request_url: None, + requested_access_token_audience: None, + requested_scope: None, + skip: None, + subject: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs b/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs index c6e65bc0d9c..8381457028c 100644 --- a/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2ConsentRequestOpenIdConnectContext { /// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. #[serde(rename = "acr_values", skip_serializing_if = "Option::is_none")] @@ -21,7 +21,7 @@ pub struct OAuth2ConsentRequestOpenIdConnectContext { pub display: Option, /// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. #[serde(rename = "id_token_hint_claims", skip_serializing_if = "Option::is_none")] - pub id_token_hint_claims: Option<::std::collections::HashMap>, + pub id_token_hint_claims: Option>, /// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. #[serde(rename = "login_hint", skip_serializing_if = "Option::is_none")] pub login_hint: Option, @@ -30,22 +30,15 @@ pub struct OAuth2ConsentRequestOpenIdConnectContext { pub ui_locales: Option>, } -impl Default for OAuth2ConsentRequestOpenIdConnectContext { - fn default() -> Self { - Self::new() - } -} - impl OAuth2ConsentRequestOpenIdConnectContext { pub fn new() -> OAuth2ConsentRequestOpenIdConnectContext { OAuth2ConsentRequestOpenIdConnectContext { - acr_values: None, - display: None, - id_token_hint_claims: None, - login_hint: None, - ui_locales: None, + acr_values: None, + display: None, + id_token_hint_claims: None, + login_hint: None, + ui_locales: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_consent_session.rs b/clients/hydra/rust/src/models/o_auth2_consent_session.rs index 67130fd10c3..40614886fd6 100644 --- a/clients/hydra/rust/src/models/o_auth2_consent_session.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_session.rs @@ -3,23 +3,23 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2ConsentSession : A completed OAuth 2.0 Consent Session. - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OAuth2ConsentSession : A completed OAuth 2.0 Consent Session. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2ConsentSession { #[serde(rename = "consent_request", skip_serializing_if = "Option::is_none")] - pub consent_request: Option>, - #[serde(rename = "context", skip_serializing_if = "Option::is_none")] - pub context: Option, + pub consent_request: Option>, + #[serde(rename = "context", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub context: Option>, #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")] - pub expires_at: Option>, + pub expires_at: Option>, #[serde(rename = "grant_access_token_audience", skip_serializing_if = "Option::is_none")] pub grant_access_token_audience: Option>, #[serde(rename = "grant_scope", skip_serializing_if = "Option::is_none")] @@ -33,30 +33,23 @@ pub struct OAuth2ConsentSession { #[serde(rename = "remember_for", skip_serializing_if = "Option::is_none")] pub remember_for: Option, #[serde(rename = "session", skip_serializing_if = "Option::is_none")] - pub session: Option>, -} - -impl Default for OAuth2ConsentSession { - fn default() -> Self { - Self::new() - } + pub session: Option>, } impl OAuth2ConsentSession { /// A completed OAuth 2.0 Consent Session. pub fn new() -> OAuth2ConsentSession { OAuth2ConsentSession { - consent_request: None, - context: None, - expires_at: None, - grant_access_token_audience: None, - grant_scope: None, - handled_at: None, - remember: None, - remember_for: None, - session: None, + consent_request: None, + context: None, + expires_at: None, + grant_access_token_audience: None, + grant_scope: None, + handled_at: None, + remember: None, + remember_for: None, + session: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs b/clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs index ceb8253833a..70a13347ef5 100644 --- a/clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2ConsentSessionExpiresAt { #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] pub access_token: Option, @@ -25,22 +25,15 @@ pub struct OAuth2ConsentSessionExpiresAt { pub refresh_token: Option, } -impl Default for OAuth2ConsentSessionExpiresAt { - fn default() -> Self { - Self::new() - } -} - impl OAuth2ConsentSessionExpiresAt { pub fn new() -> OAuth2ConsentSessionExpiresAt { OAuth2ConsentSessionExpiresAt { - access_token: None, - authorize_code: None, - id_token: None, - par_context: None, - refresh_token: None, + access_token: None, + authorize_code: None, + id_token: None, + par_context: None, + refresh_token: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_login_request.rs b/clients/hydra/rust/src/models/o_auth2_login_request.rs index 2cebd9b961e..4425c98bc91 100644 --- a/clients/hydra/rust/src/models/o_auth2_login_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_login_request.rs @@ -3,23 +3,23 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2LoginRequest { /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. #[serde(rename = "challenge")] pub challenge: String, #[serde(rename = "client")] - pub client: Box, + pub client: Box, #[serde(rename = "oidc_context", skip_serializing_if = "Option::is_none")] - pub oidc_context: Option>, + pub oidc_context: Option>, /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. #[serde(rename = "request_url")] pub request_url: String, @@ -38,21 +38,19 @@ pub struct OAuth2LoginRequest { pub subject: String, } - impl OAuth2LoginRequest { - pub fn new(challenge: String, client: crate::models::OAuth2Client, request_url: String, skip: bool, subject: String) -> OAuth2LoginRequest { + pub fn new(challenge: String, client: models::OAuth2Client, request_url: String, skip: bool, subject: String) -> OAuth2LoginRequest { OAuth2LoginRequest { - challenge, - client: Box::new(client), - oidc_context: None, - request_url, - requested_access_token_audience: None, - requested_scope: None, - session_id: None, - skip, - subject, + challenge, + client: Box::new(client), + oidc_context: None, + request_url, + requested_access_token_audience: None, + requested_scope: None, + session_id: None, + skip, + subject, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_logout_request.rs b/clients/hydra/rust/src/models/o_auth2_logout_request.rs index c8d844fcdf8..6948d68ec09 100644 --- a/clients/hydra/rust/src/models/o_auth2_logout_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_logout_request.rs @@ -3,21 +3,21 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2LogoutRequest { /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")] pub challenge: Option, #[serde(rename = "client", skip_serializing_if = "Option::is_none")] - pub client: Option>, + pub client: Option>, /// RequestURL is the original Logout URL requested. #[serde(rename = "request_url", skip_serializing_if = "Option::is_none")] pub request_url: Option, @@ -32,23 +32,16 @@ pub struct OAuth2LogoutRequest { pub subject: Option, } -impl Default for OAuth2LogoutRequest { - fn default() -> Self { - Self::new() - } -} - impl OAuth2LogoutRequest { pub fn new() -> OAuth2LogoutRequest { OAuth2LogoutRequest { - challenge: None, - client: None, - request_url: None, - rp_initiated: None, - sid: None, - subject: None, + challenge: None, + client: None, + request_url: None, + rp_initiated: None, + sid: None, + subject: None, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_redirect_to.rs b/clients/hydra/rust/src/models/o_auth2_redirect_to.rs index c65cd07eddd..b41c5e1eafd 100644 --- a/clients/hydra/rust/src/models/o_auth2_redirect_to.rs +++ b/clients/hydra/rust/src/models/o_auth2_redirect_to.rs @@ -3,30 +3,28 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2RedirectTo : Contains a redirect URL used to complete a login, consent, or logout request. - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OAuth2RedirectTo : Contains a redirect URL used to complete a login, consent, or logout request. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2RedirectTo { /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. #[serde(rename = "redirect_to")] pub redirect_to: String, } - impl OAuth2RedirectTo { /// Contains a redirect URL used to complete a login, consent, or logout request. pub fn new(redirect_to: String) -> OAuth2RedirectTo { OAuth2RedirectTo { - redirect_to, + redirect_to, } } } - diff --git a/clients/hydra/rust/src/models/o_auth2_token_exchange.rs b/clients/hydra/rust/src/models/o_auth2_token_exchange.rs index 790d88e995b..733bdc5bc21 100644 --- a/clients/hydra/rust/src/models/o_auth2_token_exchange.rs +++ b/clients/hydra/rust/src/models/o_auth2_token_exchange.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2TokenExchange : OAuth2 Token Exchange Result - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OAuth2TokenExchange : OAuth2 Token Exchange Result +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OAuth2TokenExchange { /// The access token issued by the authorization server. #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] @@ -34,24 +34,17 @@ pub struct OAuth2TokenExchange { pub token_type: Option, } -impl Default for OAuth2TokenExchange { - fn default() -> Self { - Self::new() - } -} - impl OAuth2TokenExchange { /// OAuth2 Token Exchange Result pub fn new() -> OAuth2TokenExchange { OAuth2TokenExchange { - access_token: None, - expires_in: None, - id_token: None, - refresh_token: None, - scope: None, - token_type: None, + access_token: None, + expires_in: None, + id_token: None, + refresh_token: None, + scope: None, + token_type: None, } } } - diff --git a/clients/hydra/rust/src/models/oidc_configuration.rs b/clients/hydra/rust/src/models/oidc_configuration.rs index 39b8b8702a3..435bb907140 100644 --- a/clients/hydra/rust/src/models/oidc_configuration.rs +++ b/clients/hydra/rust/src/models/oidc_configuration.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OidcConfiguration : Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OidcConfiguration : Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OidcConfiguration { /// OAuth 2.0 Authorization Endpoint URL #[serde(rename = "authorization_endpoint")] @@ -37,7 +37,7 @@ pub struct OidcConfiguration { pub credentials_endpoint_draft_00: Option, /// OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. #[serde(rename = "credentials_supported_draft_00", skip_serializing_if = "Option::is_none")] - pub credentials_supported_draft_00: Option>, + pub credentials_supported_draft_00: Option>, /// OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. #[serde(rename = "end_session_endpoint", skip_serializing_if = "Option::is_none")] pub end_session_endpoint: Option, @@ -109,44 +109,42 @@ pub struct OidcConfiguration { pub userinfo_signing_alg_values_supported: Option>, } - impl OidcConfiguration { /// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. pub fn new(authorization_endpoint: String, id_token_signed_response_alg: Vec, id_token_signing_alg_values_supported: Vec, issuer: String, jwks_uri: String, response_types_supported: Vec, subject_types_supported: Vec, token_endpoint: String, userinfo_signed_response_alg: Vec) -> OidcConfiguration { OidcConfiguration { - authorization_endpoint, - backchannel_logout_session_supported: None, - backchannel_logout_supported: None, - claims_parameter_supported: None, - claims_supported: None, - code_challenge_methods_supported: None, - credentials_endpoint_draft_00: None, - credentials_supported_draft_00: None, - end_session_endpoint: None, - frontchannel_logout_session_supported: None, - frontchannel_logout_supported: None, - grant_types_supported: None, - id_token_signed_response_alg, - id_token_signing_alg_values_supported, - issuer, - jwks_uri, - registration_endpoint: None, - request_object_signing_alg_values_supported: None, - request_parameter_supported: None, - request_uri_parameter_supported: None, - require_request_uri_registration: None, - response_modes_supported: None, - response_types_supported, - revocation_endpoint: None, - scopes_supported: None, - subject_types_supported, - token_endpoint, - token_endpoint_auth_methods_supported: None, - userinfo_endpoint: None, - userinfo_signed_response_alg, - userinfo_signing_alg_values_supported: None, + authorization_endpoint, + backchannel_logout_session_supported: None, + backchannel_logout_supported: None, + claims_parameter_supported: None, + claims_supported: None, + code_challenge_methods_supported: None, + credentials_endpoint_draft_00: None, + credentials_supported_draft_00: None, + end_session_endpoint: None, + frontchannel_logout_session_supported: None, + frontchannel_logout_supported: None, + grant_types_supported: None, + id_token_signed_response_alg, + id_token_signing_alg_values_supported, + issuer, + jwks_uri, + registration_endpoint: None, + request_object_signing_alg_values_supported: None, + request_parameter_supported: None, + request_uri_parameter_supported: None, + require_request_uri_registration: None, + response_modes_supported: None, + response_types_supported, + revocation_endpoint: None, + scopes_supported: None, + subject_types_supported, + token_endpoint, + token_endpoint_auth_methods_supported: None, + userinfo_endpoint: None, + userinfo_signed_response_alg, + userinfo_signing_alg_values_supported: None, } } } - diff --git a/clients/hydra/rust/src/models/oidc_user_info.rs b/clients/hydra/rust/src/models/oidc_user_info.rs index 20715a73723..470f3f18fab 100644 --- a/clients/hydra/rust/src/models/oidc_user_info.rs +++ b/clients/hydra/rust/src/models/oidc_user_info.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OidcUserInfo : OpenID Connect Userinfo - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// OidcUserInfo : OpenID Connect Userinfo +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OidcUserInfo { /// End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. #[serde(rename = "birthdate", skip_serializing_if = "Option::is_none")] @@ -73,37 +73,30 @@ pub struct OidcUserInfo { pub zoneinfo: Option, } -impl Default for OidcUserInfo { - fn default() -> Self { - Self::new() - } -} - impl OidcUserInfo { /// OpenID Connect Userinfo pub fn new() -> OidcUserInfo { OidcUserInfo { - birthdate: None, - email: None, - email_verified: None, - family_name: None, - gender: None, - given_name: None, - locale: None, - middle_name: None, - name: None, - nickname: None, - phone_number: None, - phone_number_verified: None, - picture: None, - preferred_username: None, - profile: None, - sub: None, - updated_at: None, - website: None, - zoneinfo: None, + birthdate: None, + email: None, + email_verified: None, + family_name: None, + gender: None, + given_name: None, + locale: None, + middle_name: None, + name: None, + nickname: None, + phone_number: None, + phone_number_verified: None, + picture: None, + preferred_username: None, + profile: None, + sub: None, + updated_at: None, + website: None, + zoneinfo: None, } } } - diff --git a/clients/hydra/rust/src/models/pagination.rs b/clients/hydra/rust/src/models/pagination.rs index fc235179e30..ddb42250b71 100644 --- a/clients/hydra/rust/src/models/pagination.rs +++ b/clients/hydra/rust/src/models/pagination.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Pagination { /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). #[serde(rename = "page_size", skip_serializing_if = "Option::is_none")] @@ -21,19 +21,12 @@ pub struct Pagination { pub page_token: Option, } -impl Default for Pagination { - fn default() -> Self { - Self::new() - } -} - impl Pagination { pub fn new() -> Pagination { Pagination { - page_size: None, - page_token: None, + page_size: None, + page_token: None, } } } - diff --git a/clients/hydra/rust/src/models/pagination_headers.rs b/clients/hydra/rust/src/models/pagination_headers.rs index d28492d9bbf..2c639609870 100644 --- a/clients/hydra/rust/src/models/pagination_headers.rs +++ b/clients/hydra/rust/src/models/pagination_headers.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PaginationHeaders { /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header #[serde(rename = "link", skip_serializing_if = "Option::is_none")] @@ -21,19 +21,12 @@ pub struct PaginationHeaders { pub x_total_count: Option, } -impl Default for PaginationHeaders { - fn default() -> Self { - Self::new() - } -} - impl PaginationHeaders { pub fn new() -> PaginationHeaders { PaginationHeaders { - link: None, - x_total_count: None, + link: None, + x_total_count: None, } } } - diff --git a/clients/hydra/rust/src/models/reject_o_auth2_request.rs b/clients/hydra/rust/src/models/reject_o_auth2_request.rs index 67e8e862e6b..d957eebd466 100644 --- a/clients/hydra/rust/src/models/reject_o_auth2_request.rs +++ b/clients/hydra/rust/src/models/reject_o_auth2_request.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RejectOAuth2Request { /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. #[serde(rename = "error", skip_serializing_if = "Option::is_none")] @@ -30,22 +30,15 @@ pub struct RejectOAuth2Request { pub status_code: Option, } -impl Default for RejectOAuth2Request { - fn default() -> Self { - Self::new() - } -} - impl RejectOAuth2Request { pub fn new() -> RejectOAuth2Request { RejectOAuth2Request { - error: None, - error_debug: None, - error_description: None, - error_hint: None, - status_code: None, + error: None, + error_debug: None, + error_description: None, + error_hint: None, + status_code: None, } } } - diff --git a/clients/hydra/rust/src/models/rfc6749_error_json.rs b/clients/hydra/rust/src/models/rfc6749_error_json.rs index 7350244f547..e00726fc84e 100644 --- a/clients/hydra/rust/src/models/rfc6749_error_json.rs +++ b/clients/hydra/rust/src/models/rfc6749_error_json.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Rfc6749ErrorJson { #[serde(rename = "error", skip_serializing_if = "Option::is_none")] pub error: Option, @@ -25,22 +25,15 @@ pub struct Rfc6749ErrorJson { pub status_code: Option, } -impl Default for Rfc6749ErrorJson { - fn default() -> Self { - Self::new() - } -} - impl Rfc6749ErrorJson { pub fn new() -> Rfc6749ErrorJson { Rfc6749ErrorJson { - error: None, - error_debug: None, - error_description: None, - error_hint: None, - status_code: None, + error: None, + error_debug: None, + error_description: None, + error_hint: None, + status_code: None, } } } - diff --git a/clients/hydra/rust/src/models/token_pagination.rs b/clients/hydra/rust/src/models/token_pagination.rs index 2c78be589ed..87937d10928 100644 --- a/clients/hydra/rust/src/models/token_pagination.rs +++ b/clients/hydra/rust/src/models/token_pagination.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TokenPagination { /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). #[serde(rename = "page_size", skip_serializing_if = "Option::is_none")] @@ -21,19 +21,12 @@ pub struct TokenPagination { pub page_token: Option, } -impl Default for TokenPagination { - fn default() -> Self { - Self::new() - } -} - impl TokenPagination { pub fn new() -> TokenPagination { TokenPagination { - page_size: None, - page_token: None, + page_size: None, + page_token: None, } } } - diff --git a/clients/hydra/rust/src/models/token_pagination_headers.rs b/clients/hydra/rust/src/models/token_pagination_headers.rs index b8b91935c13..510f3decc99 100644 --- a/clients/hydra/rust/src/models/token_pagination_headers.rs +++ b/clients/hydra/rust/src/models/token_pagination_headers.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TokenPaginationHeaders { /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header #[serde(rename = "link", skip_serializing_if = "Option::is_none")] @@ -21,19 +21,12 @@ pub struct TokenPaginationHeaders { pub x_total_count: Option, } -impl Default for TokenPaginationHeaders { - fn default() -> Self { - Self::new() - } -} - impl TokenPaginationHeaders { pub fn new() -> TokenPaginationHeaders { TokenPaginationHeaders { - link: None, - x_total_count: None, + link: None, + x_total_count: None, } } } - diff --git a/clients/hydra/rust/src/models/token_pagination_request_parameters.rs b/clients/hydra/rust/src/models/token_pagination_request_parameters.rs index b663324bc83..87cfdf11785 100644 --- a/clients/hydra/rust/src/models/token_pagination_request_parameters.rs +++ b/clients/hydra/rust/src/models/token_pagination_request_parameters.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// TokenPaginationRequestParameters : The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// TokenPaginationRequestParameters : The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TokenPaginationRequestParameters { /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). #[serde(rename = "page_size", skip_serializing_if = "Option::is_none")] @@ -22,20 +22,13 @@ pub struct TokenPaginationRequestParameters { pub page_token: Option, } -impl Default for TokenPaginationRequestParameters { - fn default() -> Self { - Self::new() - } -} - impl TokenPaginationRequestParameters { /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). pub fn new() -> TokenPaginationRequestParameters { TokenPaginationRequestParameters { - page_size: None, - page_token: None, + page_size: None, + page_token: None, } } } - diff --git a/clients/hydra/rust/src/models/token_pagination_response_headers.rs b/clients/hydra/rust/src/models/token_pagination_response_headers.rs index dabbbcac0c8..405dc8886af 100644 --- a/clients/hydra/rust/src/models/token_pagination_response_headers.rs +++ b/clients/hydra/rust/src/models/token_pagination_response_headers.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// TokenPaginationResponseHeaders : The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// TokenPaginationResponseHeaders : The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TokenPaginationResponseHeaders { /// The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: ; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\" #[serde(rename = "link", skip_serializing_if = "Option::is_none")] @@ -22,20 +22,13 @@ pub struct TokenPaginationResponseHeaders { pub x_total_count: Option, } -impl Default for TokenPaginationResponseHeaders { - fn default() -> Self { - Self::new() - } -} - impl TokenPaginationResponseHeaders { /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). pub fn new() -> TokenPaginationResponseHeaders { TokenPaginationResponseHeaders { - link: None, - x_total_count: None, + link: None, + x_total_count: None, } } } - diff --git a/clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs b/clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs index e4e86fde24d..73603874ef6 100644 --- a/clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs +++ b/clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// TrustOAuth2JwtGrantIssuer : Trust OAuth2 JWT Bearer Grant Type Issuer Request Body - - +use crate::models; +use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// TrustOAuth2JwtGrantIssuer : Trust OAuth2 JWT Bearer Grant Type Issuer Request Body +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrustOAuth2JwtGrantIssuer { /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. #[serde(rename = "allow_any_subject", skip_serializing_if = "Option::is_none")] @@ -24,7 +24,7 @@ pub struct TrustOAuth2JwtGrantIssuer { #[serde(rename = "issuer")] pub issuer: String, #[serde(rename = "jwk")] - pub jwk: Box, + pub jwk: Box, /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) #[serde(rename = "scope")] pub scope: Vec, @@ -33,19 +33,17 @@ pub struct TrustOAuth2JwtGrantIssuer { pub subject: Option, } - impl TrustOAuth2JwtGrantIssuer { /// Trust OAuth2 JWT Bearer Grant Type Issuer Request Body - pub fn new(expires_at: String, issuer: String, jwk: crate::models::JsonWebKey, scope: Vec) -> TrustOAuth2JwtGrantIssuer { + pub fn new(expires_at: String, issuer: String, jwk: models::JsonWebKey, scope: Vec) -> TrustOAuth2JwtGrantIssuer { TrustOAuth2JwtGrantIssuer { - allow_any_subject: None, - expires_at, - issuer, - jwk: Box::new(jwk), - scope, - subject: None, + allow_any_subject: None, + expires_at, + issuer, + jwk: Box::new(jwk), + scope, + subject: None, } } } - diff --git a/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs index 1a6e85841a4..0e188c93c73 100644 --- a/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs +++ b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// TrustedOAuth2JwtGrantIssuer : OAuth2 JWT Bearer Grant Type Issuer Trust Relationship - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// TrustedOAuth2JwtGrantIssuer : OAuth2 JWT Bearer Grant Type Issuer Trust Relationship +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrustedOAuth2JwtGrantIssuer { /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. #[serde(rename = "allow_any_subject", skip_serializing_if = "Option::is_none")] @@ -29,7 +29,7 @@ pub struct TrustedOAuth2JwtGrantIssuer { #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")] pub issuer: Option, #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")] - pub public_key: Option>, + pub public_key: Option>, /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] pub scope: Option>, @@ -38,26 +38,19 @@ pub struct TrustedOAuth2JwtGrantIssuer { pub subject: Option, } -impl Default for TrustedOAuth2JwtGrantIssuer { - fn default() -> Self { - Self::new() - } -} - impl TrustedOAuth2JwtGrantIssuer { /// OAuth2 JWT Bearer Grant Type Issuer Trust Relationship pub fn new() -> TrustedOAuth2JwtGrantIssuer { TrustedOAuth2JwtGrantIssuer { - allow_any_subject: None, - created_at: None, - expires_at: None, - id: None, - issuer: None, - public_key: None, - scope: None, - subject: None, + allow_any_subject: None, + created_at: None, + expires_at: None, + id: None, + issuer: None, + public_key: None, + scope: None, + subject: None, } } } - diff --git a/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs index 5fd97b9b43b..05d3aebcac9 100644 --- a/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs +++ b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs @@ -3,16 +3,16 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// TrustedOAuth2JwtGrantJsonWebKey : OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key - +use crate::models; +use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +/// TrustedOAuth2JwtGrantJsonWebKey : OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrustedOAuth2JwtGrantJsonWebKey { /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). #[serde(rename = "kid", skip_serializing_if = "Option::is_none")] @@ -22,20 +22,13 @@ pub struct TrustedOAuth2JwtGrantJsonWebKey { pub set: Option, } -impl Default for TrustedOAuth2JwtGrantJsonWebKey { - fn default() -> Self { - Self::new() - } -} - impl TrustedOAuth2JwtGrantJsonWebKey { /// OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key pub fn new() -> TrustedOAuth2JwtGrantJsonWebKey { TrustedOAuth2JwtGrantJsonWebKey { - kid: None, - set: None, + kid: None, + set: None, } } } - diff --git a/clients/hydra/rust/src/models/verifiable_credential_priming_response.rs b/clients/hydra/rust/src/models/verifiable_credential_priming_response.rs index 04b0ee5c964..5ed0f371cc1 100644 --- a/clients/hydra/rust/src/models/verifiable_credential_priming_response.rs +++ b/clients/hydra/rust/src/models/verifiable_credential_priming_response.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifiableCredentialPrimingResponse { #[serde(rename = "c_nonce", skip_serializing_if = "Option::is_none")] pub c_nonce: Option, @@ -31,25 +31,18 @@ pub struct VerifiableCredentialPrimingResponse { pub status_code: Option, } -impl Default for VerifiableCredentialPrimingResponse { - fn default() -> Self { - Self::new() - } -} - impl VerifiableCredentialPrimingResponse { pub fn new() -> VerifiableCredentialPrimingResponse { VerifiableCredentialPrimingResponse { - c_nonce: None, - c_nonce_expires_in: None, - error: None, - error_debug: None, - error_description: None, - error_hint: None, - format: None, - status_code: None, + c_nonce: None, + c_nonce_expires_in: None, + error: None, + error_debug: None, + error_description: None, + error_hint: None, + format: None, + status_code: None, } } } - diff --git a/clients/hydra/rust/src/models/verifiable_credential_proof.rs b/clients/hydra/rust/src/models/verifiable_credential_proof.rs index 04972be5009..acfb3c794b3 100644 --- a/clients/hydra/rust/src/models/verifiable_credential_proof.rs +++ b/clients/hydra/rust/src/models/verifiable_credential_proof.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifiableCredentialProof { #[serde(rename = "jwt", skip_serializing_if = "Option::is_none")] pub jwt: Option, @@ -19,19 +19,12 @@ pub struct VerifiableCredentialProof { pub proof_type: Option, } -impl Default for VerifiableCredentialProof { - fn default() -> Self { - Self::new() - } -} - impl VerifiableCredentialProof { pub fn new() -> VerifiableCredentialProof { VerifiableCredentialProof { - jwt: None, - proof_type: None, + jwt: None, + proof_type: None, } } } - diff --git a/clients/hydra/rust/src/models/verifiable_credential_response.rs b/clients/hydra/rust/src/models/verifiable_credential_response.rs index 8a9bdf27d64..b002355377a 100644 --- a/clients/hydra/rust/src/models/verifiable_credential_response.rs +++ b/clients/hydra/rust/src/models/verifiable_credential_response.rs @@ -3,15 +3,15 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifiableCredentialResponse { #[serde(rename = "credential_draft_00", skip_serializing_if = "Option::is_none")] pub credential_draft_00: Option, @@ -19,19 +19,12 @@ pub struct VerifiableCredentialResponse { pub format: Option, } -impl Default for VerifiableCredentialResponse { - fn default() -> Self { - Self::new() - } -} - impl VerifiableCredentialResponse { pub fn new() -> VerifiableCredentialResponse { VerifiableCredentialResponse { - credential_draft_00: None, - format: None, + credential_draft_00: None, + format: None, } } } - diff --git a/clients/hydra/rust/src/models/version.rs b/clients/hydra/rust/src/models/version.rs index 8c133efe56a..740434690b1 100644 --- a/clients/hydra/rust/src/models/version.rs +++ b/clients/hydra/rust/src/models/version.rs @@ -3,33 +3,26 @@ * * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +use crate::models; +use serde::{Deserialize, Serialize}; - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Version { /// Version is the service's version. #[serde(rename = "version", skip_serializing_if = "Option::is_none")] pub version: Option, } -impl Default for Version { - fn default() -> Self { - Self::new() - } -} - impl Version { pub fn new() -> Version { Version { - version: None, + version: None, } } } - diff --git a/clients/hydra/typescript-fetch/.gitignore b/clients/hydra/typescript-fetch/.gitignore new file mode 100644 index 00000000000..149b5765472 --- /dev/null +++ b/clients/hydra/typescript-fetch/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/clients/hydra/typescript-fetch/.npmignore b/clients/hydra/typescript-fetch/.npmignore new file mode 100644 index 00000000000..42061c01a1c --- /dev/null +++ b/clients/hydra/typescript-fetch/.npmignore @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/clients/hydra/typescript-fetch/.openapi-generator-ignore b/clients/hydra/typescript-fetch/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/clients/hydra/typescript-fetch/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/clients/hydra/typescript-fetch/.openapi-generator/FILES b/clients/hydra/typescript-fetch/.openapi-generator/FILES new file mode 100644 index 00000000000..7e5e4afed28 --- /dev/null +++ b/clients/hydra/typescript-fetch/.openapi-generator/FILES @@ -0,0 +1,60 @@ +.gitignore +.npmignore +.openapi-generator-ignore +README.md +package.json +src/apis/JwkApi.ts +src/apis/MetadataApi.ts +src/apis/OAuth2Api.ts +src/apis/OidcApi.ts +src/apis/WellknownApi.ts +src/apis/index.ts +src/index.ts +src/models/AcceptOAuth2ConsentRequest.ts +src/models/AcceptOAuth2ConsentRequestSession.ts +src/models/AcceptOAuth2LoginRequest.ts +src/models/CreateJsonWebKeySet.ts +src/models/CreateVerifiableCredentialRequestBody.ts +src/models/CredentialSupportedDraft00.ts +src/models/ErrorOAuth2.ts +src/models/GenericError.ts +src/models/GetVersion200Response.ts +src/models/HealthNotReadyStatus.ts +src/models/HealthStatus.ts +src/models/IntrospectedOAuth2Token.ts +src/models/IsReady200Response.ts +src/models/IsReady503Response.ts +src/models/JsonPatch.ts +src/models/JsonWebKey.ts +src/models/JsonWebKeySet.ts +src/models/OAuth2Client.ts +src/models/OAuth2ClientTokenLifespans.ts +src/models/OAuth2ConsentRequest.ts +src/models/OAuth2ConsentRequestOpenIDConnectContext.ts +src/models/OAuth2ConsentSession.ts +src/models/OAuth2ConsentSessionExpiresAt.ts +src/models/OAuth2LoginRequest.ts +src/models/OAuth2LogoutRequest.ts +src/models/OAuth2RedirectTo.ts +src/models/OAuth2TokenExchange.ts +src/models/OidcConfiguration.ts +src/models/OidcUserInfo.ts +src/models/Pagination.ts +src/models/PaginationHeaders.ts +src/models/RFC6749ErrorJson.ts +src/models/RejectOAuth2Request.ts +src/models/TokenPagination.ts +src/models/TokenPaginationHeaders.ts +src/models/TokenPaginationRequestParameters.ts +src/models/TokenPaginationResponseHeaders.ts +src/models/TrustOAuth2JwtGrantIssuer.ts +src/models/TrustedOAuth2JwtGrantIssuer.ts +src/models/TrustedOAuth2JwtGrantJsonWebKey.ts +src/models/VerifiableCredentialPrimingResponse.ts +src/models/VerifiableCredentialProof.ts +src/models/VerifiableCredentialResponse.ts +src/models/Version.ts +src/models/index.ts +src/runtime.ts +tsconfig.esm.json +tsconfig.json diff --git a/clients/hydra/typescript-fetch/.openapi-generator/VERSION b/clients/hydra/typescript-fetch/.openapi-generator/VERSION new file mode 100644 index 00000000000..1985849fb58 --- /dev/null +++ b/clients/hydra/typescript-fetch/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0 diff --git a/clients/hydra/typescript-fetch/LICENSE b/clients/hydra/typescript-fetch/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/clients/hydra/typescript-fetch/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/hydra/typescript-fetch/README.md b/clients/hydra/typescript-fetch/README.md new file mode 100644 index 00000000000..6a3ef1170c0 --- /dev/null +++ b/clients/hydra/typescript-fetch/README.md @@ -0,0 +1,46 @@ +## @ory/hydra-client-fetch@v2.2.1 + +This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run `npm publish` + +### Consuming + +navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install @ory/hydra-client-fetch@v2.2.1 --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save +``` diff --git a/clients/hydra/typescript-fetch/package-lock.json b/clients/hydra/typescript-fetch/package-lock.json new file mode 100644 index 00000000000..ae454872c1f --- /dev/null +++ b/clients/hydra/typescript-fetch/package-lock.json @@ -0,0 +1,30 @@ +{ + "name": "@ory/hydra-client-fetch", + "version": "v2.2.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@ory/hydra-client-fetch", + "version": "v2.2.1", + "license": "Apache-2.0", + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } + }, + "node_modules/typescript": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + } +} diff --git a/clients/hydra/typescript-fetch/package.json b/clients/hydra/typescript-fetch/package.json new file mode 100644 index 00000000000..fd16c526db6 --- /dev/null +++ b/clients/hydra/typescript-fetch/package.json @@ -0,0 +1,22 @@ +{ + "name": "@ory/hydra-client-fetch", + "version": "v2.2.1", + "description": "OpenAPI client for @ory/hydra-client-fetch", + "author": "Ory Corp", + "repository": { + "type": "git", + "url": "https://github.com/ory/sdk.git" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + }, + "license": "Apache-2.0" +} diff --git a/clients/hydra/typescript-fetch/src/apis/JwkApi.ts b/clients/hydra/typescript-fetch/src/apis/JwkApi.ts new file mode 100644 index 00000000000..351e152de1d --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/JwkApi.ts @@ -0,0 +1,353 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateJsonWebKeySet, + ErrorOAuth2, + JsonWebKey, + JsonWebKeySet, +} from '../models/index'; +import { + CreateJsonWebKeySetFromJSON, + CreateJsonWebKeySetToJSON, + ErrorOAuth2FromJSON, + ErrorOAuth2ToJSON, + JsonWebKeyFromJSON, + JsonWebKeyToJSON, + JsonWebKeySetFromJSON, + JsonWebKeySetToJSON, +} from '../models/index'; + +export interface CreateJsonWebKeySetRequest { + set: string; + createJsonWebKeySet: CreateJsonWebKeySet; +} + +export interface DeleteJsonWebKeyRequest { + set: string; + kid: string; +} + +export interface DeleteJsonWebKeySetRequest { + set: string; +} + +export interface GetJsonWebKeyRequest { + set: string; + kid: string; +} + +export interface GetJsonWebKeySetRequest { + set: string; +} + +export interface SetJsonWebKeyRequest { + set: string; + kid: string; + jsonWebKey?: JsonWebKey; +} + +export interface SetJsonWebKeySetRequest { + set: string; + jsonWebKeySet?: JsonWebKeySet; +} + +/** + * + */ +export class JwkApi extends runtime.BaseAPI { + + /** + * This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Create JSON Web Key + */ + async createJsonWebKeySetRaw(requestParameters: CreateJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling createJsonWebKeySet().' + ); + } + + if (requestParameters['createJsonWebKeySet'] == null) { + throw new runtime.RequiredError( + 'createJsonWebKeySet', + 'Required parameter "createJsonWebKeySet" was null or undefined when calling createJsonWebKeySet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/keys/{set}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateJsonWebKeySetToJSON(requestParameters['createJsonWebKeySet']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeySetFromJSON(jsonValue)); + } + + /** + * This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Create JSON Web Key + */ + async createJsonWebKeySet(requestParameters: CreateJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createJsonWebKeySetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Delete JSON Web Key + */ + async deleteJsonWebKeyRaw(requestParameters: DeleteJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling deleteJsonWebKey().' + ); + } + + if (requestParameters['kid'] == null) { + throw new runtime.RequiredError( + 'kid', + 'Required parameter "kid" was null or undefined when calling deleteJsonWebKey().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/keys/{set}/{kid}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))).replace(`{${"kid"}}`, encodeURIComponent(String(requestParameters['kid']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Delete JSON Web Key + */ + async deleteJsonWebKey(requestParameters: DeleteJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteJsonWebKeyRaw(requestParameters, initOverrides); + } + + /** + * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Delete JSON Web Key Set + */ + async deleteJsonWebKeySetRaw(requestParameters: DeleteJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling deleteJsonWebKeySet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/keys/{set}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Delete JSON Web Key Set + */ + async deleteJsonWebKeySet(requestParameters: DeleteJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteJsonWebKeySetRaw(requestParameters, initOverrides); + } + + /** + * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + * Get JSON Web Key + */ + async getJsonWebKeyRaw(requestParameters: GetJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling getJsonWebKey().' + ); + } + + if (requestParameters['kid'] == null) { + throw new runtime.RequiredError( + 'kid', + 'Required parameter "kid" was null or undefined when calling getJsonWebKey().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/keys/{set}/{kid}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))).replace(`{${"kid"}}`, encodeURIComponent(String(requestParameters['kid']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeySetFromJSON(jsonValue)); + } + + /** + * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + * Get JSON Web Key + */ + async getJsonWebKey(requestParameters: GetJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getJsonWebKeyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Retrieve a JSON Web Key Set + */ + async getJsonWebKeySetRaw(requestParameters: GetJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling getJsonWebKeySet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/keys/{set}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeySetFromJSON(jsonValue)); + } + + /** + * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Retrieve a JSON Web Key Set + */ + async getJsonWebKeySet(requestParameters: GetJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getJsonWebKeySetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Set JSON Web Key + */ + async setJsonWebKeyRaw(requestParameters: SetJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling setJsonWebKey().' + ); + } + + if (requestParameters['kid'] == null) { + throw new runtime.RequiredError( + 'kid', + 'Required parameter "kid" was null or undefined when calling setJsonWebKey().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/keys/{set}/{kid}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))).replace(`{${"kid"}}`, encodeURIComponent(String(requestParameters['kid']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: JsonWebKeyToJSON(requestParameters['jsonWebKey']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeyFromJSON(jsonValue)); + } + + /** + * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Set JSON Web Key + */ + async setJsonWebKey(requestParameters: SetJsonWebKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.setJsonWebKeyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Update a JSON Web Key Set + */ + async setJsonWebKeySetRaw(requestParameters: SetJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['set'] == null) { + throw new runtime.RequiredError( + 'set', + 'Required parameter "set" was null or undefined when calling setJsonWebKeySet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/keys/{set}`.replace(`{${"set"}}`, encodeURIComponent(String(requestParameters['set']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: JsonWebKeySetToJSON(requestParameters['jsonWebKeySet']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeySetFromJSON(jsonValue)); + } + + /** + * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + * Update a JSON Web Key Set + */ + async setJsonWebKeySet(requestParameters: SetJsonWebKeySetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.setJsonWebKeySetRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/clients/hydra/typescript-fetch/src/apis/MetadataApi.ts b/clients/hydra/typescript-fetch/src/apis/MetadataApi.ts new file mode 100644 index 00000000000..b027a74ce21 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/MetadataApi.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + GetVersion200Response, + HealthStatus, + IsReady200Response, + IsReady503Response, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + GetVersion200ResponseFromJSON, + GetVersion200ResponseToJSON, + HealthStatusFromJSON, + HealthStatusToJSON, + IsReady200ResponseFromJSON, + IsReady200ResponseToJSON, + IsReady503ResponseFromJSON, + IsReady503ResponseToJSON, +} from '../models/index'; + +/** + * + */ +export class MetadataApi extends runtime.BaseAPI { + + /** + * This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + * Return Running Software Version. + */ + async getVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/version`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetVersion200ResponseFromJSON(jsonValue)); + } + + /** + * This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + * Return Running Software Version. + */ + async getVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getVersionRaw(initOverrides); + return await response.value(); + } + + /** + * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + * Check HTTP Server Status + */ + async isAliveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/health/alive`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthStatusFromJSON(jsonValue)); + } + + /** + * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + * Check HTTP Server Status + */ + async isAlive(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.isAliveRaw(initOverrides); + return await response.value(); + } + + /** + * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + * Check HTTP Server and Database Status + */ + async isReadyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/health/ready`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IsReady200ResponseFromJSON(jsonValue)); + } + + /** + * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + * Check HTTP Server and Database Status + */ + async isReady(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.isReadyRaw(initOverrides); + return await response.value(); + } + +} diff --git a/clients/hydra/typescript-fetch/src/apis/OAuth2Api.ts b/clients/hydra/typescript-fetch/src/apis/OAuth2Api.ts new file mode 100644 index 00000000000..6c8853f0108 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/OAuth2Api.ts @@ -0,0 +1,1395 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AcceptOAuth2ConsentRequest, + AcceptOAuth2LoginRequest, + ErrorOAuth2, + GenericError, + IntrospectedOAuth2Token, + JsonPatch, + OAuth2Client, + OAuth2ClientTokenLifespans, + OAuth2ConsentRequest, + OAuth2ConsentSession, + OAuth2LoginRequest, + OAuth2LogoutRequest, + OAuth2RedirectTo, + OAuth2TokenExchange, + RejectOAuth2Request, + TrustOAuth2JwtGrantIssuer, + TrustedOAuth2JwtGrantIssuer, +} from '../models/index'; +import { + AcceptOAuth2ConsentRequestFromJSON, + AcceptOAuth2ConsentRequestToJSON, + AcceptOAuth2LoginRequestFromJSON, + AcceptOAuth2LoginRequestToJSON, + ErrorOAuth2FromJSON, + ErrorOAuth2ToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + IntrospectedOAuth2TokenFromJSON, + IntrospectedOAuth2TokenToJSON, + JsonPatchFromJSON, + JsonPatchToJSON, + OAuth2ClientFromJSON, + OAuth2ClientToJSON, + OAuth2ClientTokenLifespansFromJSON, + OAuth2ClientTokenLifespansToJSON, + OAuth2ConsentRequestFromJSON, + OAuth2ConsentRequestToJSON, + OAuth2ConsentSessionFromJSON, + OAuth2ConsentSessionToJSON, + OAuth2LoginRequestFromJSON, + OAuth2LoginRequestToJSON, + OAuth2LogoutRequestFromJSON, + OAuth2LogoutRequestToJSON, + OAuth2RedirectToFromJSON, + OAuth2RedirectToToJSON, + OAuth2TokenExchangeFromJSON, + OAuth2TokenExchangeToJSON, + RejectOAuth2RequestFromJSON, + RejectOAuth2RequestToJSON, + TrustOAuth2JwtGrantIssuerFromJSON, + TrustOAuth2JwtGrantIssuerToJSON, + TrustedOAuth2JwtGrantIssuerFromJSON, + TrustedOAuth2JwtGrantIssuerToJSON, +} from '../models/index'; + +export interface AcceptOAuth2ConsentRequestRequest { + consentChallenge: string; + acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest; +} + +export interface AcceptOAuth2LoginRequestRequest { + loginChallenge: string; + acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest; +} + +export interface AcceptOAuth2LogoutRequestRequest { + logoutChallenge: string; +} + +export interface CreateOAuth2ClientRequest { + oAuth2Client: OAuth2Client; +} + +export interface DeleteOAuth2ClientRequest { + id: string; +} + +export interface DeleteOAuth2TokenRequest { + clientId: string; +} + +export interface DeleteTrustedOAuth2JwtGrantIssuerRequest { + id: string; +} + +export interface GetOAuth2ClientRequest { + id: string; +} + +export interface GetOAuth2ConsentRequestRequest { + consentChallenge: string; +} + +export interface GetOAuth2LoginRequestRequest { + loginChallenge: string; +} + +export interface GetOAuth2LogoutRequestRequest { + logoutChallenge: string; +} + +export interface GetTrustedOAuth2JwtGrantIssuerRequest { + id: string; +} + +export interface IntrospectOAuth2TokenRequest { + token: string; + scope?: string; +} + +export interface ListOAuth2ClientsRequest { + pageSize?: number; + pageToken?: string; + clientName?: string; + owner?: string; +} + +export interface ListOAuth2ConsentSessionsRequest { + subject: string; + pageSize?: number; + pageToken?: string; + loginSessionId?: string; +} + +export interface ListTrustedOAuth2JwtGrantIssuersRequest { + maxItems?: number; + defaultItems?: number; + issuer?: string; +} + +export interface Oauth2TokenExchangeRequest { + grantType: string; + clientId?: string; + code?: string; + redirectUri?: string; + refreshToken?: string; +} + +export interface PatchOAuth2ClientRequest { + id: string; + jsonPatch: Array; +} + +export interface RejectOAuth2ConsentRequestRequest { + consentChallenge: string; + rejectOAuth2Request?: RejectOAuth2Request; +} + +export interface RejectOAuth2LoginRequestRequest { + loginChallenge: string; + rejectOAuth2Request?: RejectOAuth2Request; +} + +export interface RejectOAuth2LogoutRequestRequest { + logoutChallenge: string; +} + +export interface RevokeOAuth2ConsentSessionsRequest { + subject: string; + client?: string; + all?: boolean; +} + +export interface RevokeOAuth2LoginSessionsRequest { + subject?: string; + sid?: string; +} + +export interface RevokeOAuth2TokenRequest { + token: string; + clientId?: string; + clientSecret?: string; +} + +export interface SetOAuth2ClientRequest { + id: string; + oAuth2Client: OAuth2Client; +} + +export interface SetOAuth2ClientLifespansRequest { + id: string; + oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans; +} + +export interface TrustOAuth2JwtGrantIssuerRequest { + trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer; +} + +/** + * + */ +export class OAuth2Api extends runtime.BaseAPI { + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Accept OAuth 2.0 Consent Request + */ + async acceptOAuth2ConsentRequestRaw(requestParameters: AcceptOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['consentChallenge'] == null) { + throw new runtime.RequiredError( + 'consentChallenge', + 'Required parameter "consentChallenge" was null or undefined when calling acceptOAuth2ConsentRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['consentChallenge'] != null) { + queryParameters['consent_challenge'] = requestParameters['consentChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/consent/accept`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AcceptOAuth2ConsentRequestToJSON(requestParameters['acceptOAuth2ConsentRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2RedirectToFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Accept OAuth 2.0 Consent Request + */ + async acceptOAuth2ConsentRequest(requestParameters: AcceptOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.acceptOAuth2ConsentRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + * Accept OAuth 2.0 Login Request + */ + async acceptOAuth2LoginRequestRaw(requestParameters: AcceptOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginChallenge'] == null) { + throw new runtime.RequiredError( + 'loginChallenge', + 'Required parameter "loginChallenge" was null or undefined when calling acceptOAuth2LoginRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['loginChallenge'] != null) { + queryParameters['login_challenge'] = requestParameters['loginChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/login/accept`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AcceptOAuth2LoginRequestToJSON(requestParameters['acceptOAuth2LoginRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2RedirectToFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + * Accept OAuth 2.0 Login Request + */ + async acceptOAuth2LoginRequest(requestParameters: AcceptOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.acceptOAuth2LoginRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + * Accept OAuth 2.0 Session Logout Request + */ + async acceptOAuth2LogoutRequestRaw(requestParameters: AcceptOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['logoutChallenge'] == null) { + throw new runtime.RequiredError( + 'logoutChallenge', + 'Required parameter "logoutChallenge" was null or undefined when calling acceptOAuth2LogoutRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['logoutChallenge'] != null) { + queryParameters['logout_challenge'] = requestParameters['logoutChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/logout/accept`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2RedirectToFromJSON(jsonValue)); + } + + /** + * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + * Accept OAuth 2.0 Session Logout Request + */ + async acceptOAuth2LogoutRequest(requestParameters: AcceptOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.acceptOAuth2LogoutRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + * Create OAuth 2.0 Client + */ + async createOAuth2ClientRaw(requestParameters: CreateOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['oAuth2Client'] == null) { + throw new runtime.RequiredError( + 'oAuth2Client', + 'Required parameter "oAuth2Client" was null or undefined when calling createOAuth2Client().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/clients`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OAuth2ClientToJSON(requestParameters['oAuth2Client']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + * Create OAuth 2.0 Client + */ + async createOAuth2Client(requestParameters: CreateOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createOAuth2ClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + * Delete OAuth 2.0 Client + */ + async deleteOAuth2ClientRaw(requestParameters: DeleteOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteOAuth2Client().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + * Delete OAuth 2.0 Client + */ + async deleteOAuth2Client(requestParameters: DeleteOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteOAuth2ClientRaw(requestParameters, initOverrides); + } + + /** + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + */ + async deleteOAuth2TokenRaw(requestParameters: DeleteOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['clientId'] == null) { + throw new runtime.RequiredError( + 'clientId', + 'Required parameter "clientId" was null or undefined when calling deleteOAuth2Token().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['clientId'] != null) { + queryParameters['client_id'] = requestParameters['clientId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/tokens`, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + */ + async deleteOAuth2Token(requestParameters: DeleteOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteOAuth2TokenRaw(requestParameters, initOverrides); + } + + /** + * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + */ + async deleteTrustedOAuth2JwtGrantIssuerRaw(requestParameters: DeleteTrustedOAuth2JwtGrantIssuerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteTrustedOAuth2JwtGrantIssuer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/trust/grants/jwt-bearer/issuers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + */ + async deleteTrustedOAuth2JwtGrantIssuer(requestParameters: DeleteTrustedOAuth2JwtGrantIssuerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteTrustedOAuth2JwtGrantIssuerRaw(requestParameters, initOverrides); + } + + /** + * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Get an OAuth 2.0 Client + */ + async getOAuth2ClientRaw(requestParameters: GetOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getOAuth2Client().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Get an OAuth 2.0 Client + */ + async getOAuth2Client(requestParameters: GetOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOAuth2ClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Get OAuth 2.0 Consent Request + */ + async getOAuth2ConsentRequestRaw(requestParameters: GetOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['consentChallenge'] == null) { + throw new runtime.RequiredError( + 'consentChallenge', + 'Required parameter "consentChallenge" was null or undefined when calling getOAuth2ConsentRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['consentChallenge'] != null) { + queryParameters['consent_challenge'] = requestParameters['consentChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/consent`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ConsentRequestFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Get OAuth 2.0 Consent Request + */ + async getOAuth2ConsentRequest(requestParameters: GetOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOAuth2ConsentRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + * Get OAuth 2.0 Login Request + */ + async getOAuth2LoginRequestRaw(requestParameters: GetOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginChallenge'] == null) { + throw new runtime.RequiredError( + 'loginChallenge', + 'Required parameter "loginChallenge" was null or undefined when calling getOAuth2LoginRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['loginChallenge'] != null) { + queryParameters['login_challenge'] = requestParameters['loginChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/login`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2LoginRequestFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + * Get OAuth 2.0 Login Request + */ + async getOAuth2LoginRequest(requestParameters: GetOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOAuth2LoginRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * Get OAuth 2.0 Session Logout Request + */ + async getOAuth2LogoutRequestRaw(requestParameters: GetOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['logoutChallenge'] == null) { + throw new runtime.RequiredError( + 'logoutChallenge', + 'Required parameter "logoutChallenge" was null or undefined when calling getOAuth2LogoutRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['logoutChallenge'] != null) { + queryParameters['logout_challenge'] = requestParameters['logoutChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/logout`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2LogoutRequestFromJSON(jsonValue)); + } + + /** + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * Get OAuth 2.0 Session Logout Request + */ + async getOAuth2LogoutRequest(requestParameters: GetOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOAuth2LogoutRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer + */ + async getTrustedOAuth2JwtGrantIssuerRaw(requestParameters: GetTrustedOAuth2JwtGrantIssuerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getTrustedOAuth2JwtGrantIssuer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/trust/grants/jwt-bearer/issuers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrustedOAuth2JwtGrantIssuerFromJSON(jsonValue)); + } + + /** + * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer + */ + async getTrustedOAuth2JwtGrantIssuer(requestParameters: GetTrustedOAuth2JwtGrantIssuerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrustedOAuth2JwtGrantIssuerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + * Introspect OAuth2 Access and Refresh Tokens + */ + async introspectOAuth2TokenRaw(requestParameters: IntrospectOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling introspectOAuth2Token().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['scope'] != null) { + formParams.append('scope', requestParameters['scope'] as any); + } + + if (requestParameters['token'] != null) { + formParams.append('token', requestParameters['token'] as any); + } + + const response = await this.request({ + path: `/admin/oauth2/introspect`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IntrospectedOAuth2TokenFromJSON(jsonValue)); + } + + /** + * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + * Introspect OAuth2 Access and Refresh Tokens + */ + async introspectOAuth2Token(requestParameters: IntrospectOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.introspectOAuth2TokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + * List OAuth 2.0 Clients + */ + async listOAuth2ClientsRaw(requestParameters: ListOAuth2ClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pageToken'] != null) { + queryParameters['page_token'] = requestParameters['pageToken']; + } + + if (requestParameters['clientName'] != null) { + queryParameters['client_name'] = requestParameters['clientName']; + } + + if (requestParameters['owner'] != null) { + queryParameters['owner'] = requestParameters['owner']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/clients`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OAuth2ClientFromJSON)); + } + + /** + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + * List OAuth 2.0 Clients + */ + async listOAuth2Clients(requestParameters: ListOAuth2ClientsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listOAuth2ClientsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + * List OAuth 2.0 Consent Sessions of a Subject + */ + async listOAuth2ConsentSessionsRaw(requestParameters: ListOAuth2ConsentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling listOAuth2ConsentSessions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pageToken'] != null) { + queryParameters['page_token'] = requestParameters['pageToken']; + } + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['loginSessionId'] != null) { + queryParameters['login_session_id'] = requestParameters['loginSessionId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/sessions/consent`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OAuth2ConsentSessionFromJSON)); + } + + /** + * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + * List OAuth 2.0 Consent Sessions of a Subject + */ + async listOAuth2ConsentSessions(requestParameters: ListOAuth2ConsentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listOAuth2ConsentSessionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + */ + async listTrustedOAuth2JwtGrantIssuersRaw(requestParameters: ListTrustedOAuth2JwtGrantIssuersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['maxItems'] != null) { + queryParameters['MaxItems'] = requestParameters['maxItems']; + } + + if (requestParameters['defaultItems'] != null) { + queryParameters['DefaultItems'] = requestParameters['defaultItems']; + } + + if (requestParameters['issuer'] != null) { + queryParameters['issuer'] = requestParameters['issuer']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/trust/grants/jwt-bearer/issuers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrustedOAuth2JwtGrantIssuerFromJSON)); + } + + /** + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + */ + async listTrustedOAuth2JwtGrantIssuers(requestParameters: ListTrustedOAuth2JwtGrantIssuersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listTrustedOAuth2JwtGrantIssuersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + * OAuth 2.0 Authorize Endpoint + */ + async oAuth2AuthorizeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/oauth2/auth`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ErrorOAuth2FromJSON(jsonValue)); + } + + /** + * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + * OAuth 2.0 Authorize Endpoint + */ + async oAuth2Authorize(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oAuth2AuthorizeRaw(initOverrides); + return await response.value(); + } + + /** + * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + * The OAuth 2.0 Token Endpoint + */ + async oauth2TokenExchangeRaw(requestParameters: Oauth2TokenExchangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['grantType'] == null) { + throw new runtime.RequiredError( + 'grantType', + 'Required parameter "grantType" was null or undefined when calling oauth2TokenExchange().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []); + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['clientId'] != null) { + formParams.append('client_id', requestParameters['clientId'] as any); + } + + if (requestParameters['code'] != null) { + formParams.append('code', requestParameters['code'] as any); + } + + if (requestParameters['grantType'] != null) { + formParams.append('grant_type', requestParameters['grantType'] as any); + } + + if (requestParameters['redirectUri'] != null) { + formParams.append('redirect_uri', requestParameters['redirectUri'] as any); + } + + if (requestParameters['refreshToken'] != null) { + formParams.append('refresh_token', requestParameters['refreshToken'] as any); + } + + const response = await this.request({ + path: `/oauth2/token`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2TokenExchangeFromJSON(jsonValue)); + } + + /** + * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + * The OAuth 2.0 Token Endpoint + */ + async oauth2TokenExchange(requestParameters: Oauth2TokenExchangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2TokenExchangeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Patch OAuth 2.0 Client + */ + async patchOAuth2ClientRaw(requestParameters: PatchOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling patchOAuth2Client().' + ); + } + + if (requestParameters['jsonPatch'] == null) { + throw new runtime.RequiredError( + 'jsonPatch', + 'Required parameter "jsonPatch" was null or undefined when calling patchOAuth2Client().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: requestParameters['jsonPatch']!.map(JsonPatchToJSON), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Patch OAuth 2.0 Client + */ + async patchOAuth2Client(requestParameters: PatchOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.patchOAuth2ClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Reject OAuth 2.0 Consent Request + */ + async rejectOAuth2ConsentRequestRaw(requestParameters: RejectOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['consentChallenge'] == null) { + throw new runtime.RequiredError( + 'consentChallenge', + 'Required parameter "consentChallenge" was null or undefined when calling rejectOAuth2ConsentRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['consentChallenge'] != null) { + queryParameters['consent_challenge'] = requestParameters['consentChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/consent/reject`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RejectOAuth2RequestToJSON(requestParameters['rejectOAuth2Request']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2RedirectToFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + * Reject OAuth 2.0 Consent Request + */ + async rejectOAuth2ConsentRequest(requestParameters: RejectOAuth2ConsentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rejectOAuth2ConsentRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + * Reject OAuth 2.0 Login Request + */ + async rejectOAuth2LoginRequestRaw(requestParameters: RejectOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginChallenge'] == null) { + throw new runtime.RequiredError( + 'loginChallenge', + 'Required parameter "loginChallenge" was null or undefined when calling rejectOAuth2LoginRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['loginChallenge'] != null) { + queryParameters['login_challenge'] = requestParameters['loginChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/login/reject`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RejectOAuth2RequestToJSON(requestParameters['rejectOAuth2Request']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2RedirectToFromJSON(jsonValue)); + } + + /** + * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + * Reject OAuth 2.0 Login Request + */ + async rejectOAuth2LoginRequest(requestParameters: RejectOAuth2LoginRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rejectOAuth2LoginRequestRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + * Reject OAuth 2.0 Session Logout Request + */ + async rejectOAuth2LogoutRequestRaw(requestParameters: RejectOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['logoutChallenge'] == null) { + throw new runtime.RequiredError( + 'logoutChallenge', + 'Required parameter "logoutChallenge" was null or undefined when calling rejectOAuth2LogoutRequest().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['logoutChallenge'] != null) { + queryParameters['logout_challenge'] = requestParameters['logoutChallenge']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/requests/logout/reject`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + * Reject OAuth 2.0 Session Logout Request + */ + async rejectOAuth2LogoutRequest(requestParameters: RejectOAuth2LogoutRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rejectOAuth2LogoutRequestRaw(requestParameters, initOverrides); + } + + /** + * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + * Revoke OAuth 2.0 Consent Sessions of a Subject + */ + async revokeOAuth2ConsentSessionsRaw(requestParameters: RevokeOAuth2ConsentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling revokeOAuth2ConsentSessions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['client'] != null) { + queryParameters['client'] = requestParameters['client']; + } + + if (requestParameters['all'] != null) { + queryParameters['all'] = requestParameters['all']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/sessions/consent`, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + * Revoke OAuth 2.0 Consent Sessions of a Subject + */ + async revokeOAuth2ConsentSessions(requestParameters: RevokeOAuth2ConsentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeOAuth2ConsentSessionsRaw(requestParameters, initOverrides); + } + + /** + * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + * Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + */ + async revokeOAuth2LoginSessionsRaw(requestParameters: RevokeOAuth2LoginSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['sid'] != null) { + queryParameters['sid'] = requestParameters['sid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/admin/oauth2/auth/sessions/login`, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + * Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + */ + async revokeOAuth2LoginSessions(requestParameters: RevokeOAuth2LoginSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeOAuth2LoginSessionsRaw(requestParameters, initOverrides); + } + + /** + * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + * Revoke OAuth 2.0 Access or Refresh Token + */ + async revokeOAuth2TokenRaw(requestParameters: RevokeOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['token'] == null) { + throw new runtime.RequiredError( + 'token', + 'Required parameter "token" was null or undefined when calling revokeOAuth2Token().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []); + } + + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['clientId'] != null) { + formParams.append('client_id', requestParameters['clientId'] as any); + } + + if (requestParameters['clientSecret'] != null) { + formParams.append('client_secret', requestParameters['clientSecret'] as any); + } + + if (requestParameters['token'] != null) { + formParams.append('token', requestParameters['token'] as any); + } + + const response = await this.request({ + path: `/oauth2/revoke`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + * Revoke OAuth 2.0 Access or Refresh Token + */ + async revokeOAuth2Token(requestParameters: RevokeOAuth2TokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeOAuth2TokenRaw(requestParameters, initOverrides); + } + + /** + * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Set OAuth 2.0 Client + */ + async setOAuth2ClientRaw(requestParameters: SetOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling setOAuth2Client().' + ); + } + + if (requestParameters['oAuth2Client'] == null) { + throw new runtime.RequiredError( + 'oAuth2Client', + 'Required parameter "oAuth2Client" was null or undefined when calling setOAuth2Client().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuth2ClientToJSON(requestParameters['oAuth2Client']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Set OAuth 2.0 Client + */ + async setOAuth2Client(requestParameters: SetOAuth2ClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.setOAuth2ClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * Set OAuth2 Client Token Lifespans + */ + async setOAuth2ClientLifespansRaw(requestParameters: SetOAuth2ClientLifespansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling setOAuth2ClientLifespans().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/clients/{id}/lifespans`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuth2ClientTokenLifespansToJSON(requestParameters['oAuth2ClientTokenLifespans']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * Set OAuth2 Client Token Lifespans + */ + async setOAuth2ClientLifespans(requestParameters: SetOAuth2ClientLifespansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.setOAuth2ClientLifespansRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + * Trust OAuth2 JWT Bearer Grant Type Issuer + */ + async trustOAuth2JwtGrantIssuerRaw(requestParameters: TrustOAuth2JwtGrantIssuerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/admin/trust/grants/jwt-bearer/issuers`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TrustOAuth2JwtGrantIssuerToJSON(requestParameters['trustOAuth2JwtGrantIssuer']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TrustedOAuth2JwtGrantIssuerFromJSON(jsonValue)); + } + + /** + * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + * Trust OAuth2 JWT Bearer Grant Type Issuer + */ + async trustOAuth2JwtGrantIssuer(requestParameters: TrustOAuth2JwtGrantIssuerRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.trustOAuth2JwtGrantIssuerRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/clients/hydra/typescript-fetch/src/apis/OidcApi.ts b/clients/hydra/typescript-fetch/src/apis/OidcApi.ts new file mode 100644 index 00000000000..1c7f0b8d96b --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/OidcApi.ts @@ -0,0 +1,367 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateVerifiableCredentialRequestBody, + ErrorOAuth2, + GenericError, + OAuth2Client, + OidcConfiguration, + OidcUserInfo, + VerifiableCredentialPrimingResponse, + VerifiableCredentialResponse, +} from '../models/index'; +import { + CreateVerifiableCredentialRequestBodyFromJSON, + CreateVerifiableCredentialRequestBodyToJSON, + ErrorOAuth2FromJSON, + ErrorOAuth2ToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + OAuth2ClientFromJSON, + OAuth2ClientToJSON, + OidcConfigurationFromJSON, + OidcConfigurationToJSON, + OidcUserInfoFromJSON, + OidcUserInfoToJSON, + VerifiableCredentialPrimingResponseFromJSON, + VerifiableCredentialPrimingResponseToJSON, + VerifiableCredentialResponseFromJSON, + VerifiableCredentialResponseToJSON, +} from '../models/index'; + +export interface CreateOidcDynamicClientRequest { + oAuth2Client: OAuth2Client; +} + +export interface CreateVerifiableCredentialRequest { + createVerifiableCredentialRequestBody?: CreateVerifiableCredentialRequestBody; +} + +export interface DeleteOidcDynamicClientRequest { + id: string; +} + +export interface GetOidcDynamicClientRequest { + id: string; +} + +export interface SetOidcDynamicClientRequest { + id: string; + oAuth2Client: OAuth2Client; +} + +/** + * + */ +export class OidcApi extends runtime.BaseAPI { + + /** + * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + * Register OAuth2 Client using OpenID Dynamic Client Registration + */ + async createOidcDynamicClientRaw(requestParameters: CreateOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['oAuth2Client'] == null) { + throw new runtime.RequiredError( + 'oAuth2Client', + 'Required parameter "oAuth2Client" was null or undefined when calling createOidcDynamicClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/oauth2/register`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OAuth2ClientToJSON(requestParameters['oAuth2Client']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + * Register OAuth2 Client using OpenID Dynamic Client Registration + */ + async createOidcDynamicClient(requestParameters: CreateOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createOidcDynamicClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + * Issues a Verifiable Credential + */ + async createVerifiableCredentialRaw(requestParameters: CreateVerifiableCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/credentials`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateVerifiableCredentialRequestBodyToJSON(requestParameters['createVerifiableCredentialRequestBody']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VerifiableCredentialResponseFromJSON(jsonValue)); + } + + /** + * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + * Issues a Verifiable Credential + */ + async createVerifiableCredential(requestParameters: CreateVerifiableCredentialRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createVerifiableCredentialRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + */ + async deleteOidcDynamicClientRaw(requestParameters: DeleteOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteOidcDynamicClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearer", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/oauth2/register/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + */ + async deleteOidcDynamicClient(requestParameters: DeleteOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteOidcDynamicClientRaw(requestParameters, initOverrides); + } + + /** + * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + * OpenID Connect Discovery + */ + async discoverOidcConfigurationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/.well-known/openid-configuration`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OidcConfigurationFromJSON(jsonValue)); + } + + /** + * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + * OpenID Connect Discovery + */ + async discoverOidcConfiguration(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.discoverOidcConfigurationRaw(initOverrides); + return await response.value(); + } + + /** + * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + * Get OAuth2 Client using OpenID Dynamic Client Registration + */ + async getOidcDynamicClientRaw(requestParameters: GetOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getOidcDynamicClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearer", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/oauth2/register/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + * Get OAuth2 Client using OpenID Dynamic Client Registration + */ + async getOidcDynamicClient(requestParameters: GetOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOidcDynamicClientRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + * OpenID Connect Userinfo + */ + async getOidcUserInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []); + } + + const response = await this.request({ + path: `/userinfo`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OidcUserInfoFromJSON(jsonValue)); + } + + /** + * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + * OpenID Connect Userinfo + */ + async getOidcUserInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOidcUserInfoRaw(initOverrides); + return await response.value(); + } + + /** + * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + * OpenID Connect Front- and Back-channel Enabled Logout + */ + async revokeOidcSessionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/oauth2/sessions/logout`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + * OpenID Connect Front- and Back-channel Enabled Logout + */ + async revokeOidcSession(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeOidcSessionRaw(initOverrides); + } + + /** + * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Set OAuth2 Client using OpenID Dynamic Client Registration + */ + async setOidcDynamicClientRaw(requestParameters: SetOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling setOidcDynamicClient().' + ); + } + + if (requestParameters['oAuth2Client'] == null) { + throw new runtime.RequiredError( + 'oAuth2Client', + 'Required parameter "oAuth2Client" was null or undefined when calling setOidcDynamicClient().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearer", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/oauth2/register/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuth2ClientToJSON(requestParameters['oAuth2Client']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ClientFromJSON(jsonValue)); + } + + /** + * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * Set OAuth2 Client using OpenID Dynamic Client Registration + */ + async setOidcDynamicClient(requestParameters: SetOidcDynamicClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.setOidcDynamicClientRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/clients/hydra/typescript-fetch/src/apis/WellknownApi.ts b/clients/hydra/typescript-fetch/src/apis/WellknownApi.ts new file mode 100644 index 00000000000..b5478311fad --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/WellknownApi.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorOAuth2, + JsonWebKeySet, +} from '../models/index'; +import { + ErrorOAuth2FromJSON, + ErrorOAuth2ToJSON, + JsonWebKeySetFromJSON, + JsonWebKeySetToJSON, +} from '../models/index'; + +/** + * + */ +export class WellknownApi extends runtime.BaseAPI { + + /** + * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + * Discover Well-Known JSON Web Keys + */ + async discoverJsonWebKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/.well-known/jwks.json`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => JsonWebKeySetFromJSON(jsonValue)); + } + + /** + * This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + * Discover Well-Known JSON Web Keys + */ + async discoverJsonWebKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.discoverJsonWebKeysRaw(initOverrides); + return await response.value(); + } + +} diff --git a/clients/hydra/typescript-fetch/src/apis/index.ts b/clients/hydra/typescript-fetch/src/apis/index.ts new file mode 100644 index 00000000000..26329dd8e72 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/apis/index.ts @@ -0,0 +1,7 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './JwkApi'; +export * from './MetadataApi'; +export * from './OAuth2Api'; +export * from './OidcApi'; +export * from './WellknownApi'; diff --git a/clients/hydra/typescript-fetch/src/index.ts b/clients/hydra/typescript-fetch/src/index.ts new file mode 100644 index 00000000000..bebe8bbbe20 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequest.ts b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequest.ts new file mode 100644 index 00000000000..a10de46eb50 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequest.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { AcceptOAuth2ConsentRequestSession } from './AcceptOAuth2ConsentRequestSession'; +import { + AcceptOAuth2ConsentRequestSessionFromJSON, + AcceptOAuth2ConsentRequestSessionFromJSONTyped, + AcceptOAuth2ConsentRequestSessionToJSON, +} from './AcceptOAuth2ConsentRequestSession'; + +/** + * + * @export + * @interface AcceptOAuth2ConsentRequest + */ +export interface AcceptOAuth2ConsentRequest { + /** + * + * @type {any} + * @memberof AcceptOAuth2ConsentRequest + */ + context?: any | null; + /** + * + * @type {Array} + * @memberof AcceptOAuth2ConsentRequest + */ + grant_access_token_audience?: Array; + /** + * + * @type {Array} + * @memberof AcceptOAuth2ConsentRequest + */ + grant_scope?: Array; + /** + * + * @type {Date} + * @memberof AcceptOAuth2ConsentRequest + */ + handled_at?: Date; + /** + * Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same + * client asks the same user for the same, or a subset of, scope. + * @type {boolean} + * @memberof AcceptOAuth2ConsentRequest + */ + remember?: boolean; + /** + * RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the + * authorization will be remembered indefinitely. + * @type {number} + * @memberof AcceptOAuth2ConsentRequest + */ + remember_for?: number; + /** + * + * @type {AcceptOAuth2ConsentRequestSession} + * @memberof AcceptOAuth2ConsentRequest + */ + session?: AcceptOAuth2ConsentRequestSession; +} + +/** + * Check if a given object implements the AcceptOAuth2ConsentRequest interface. + */ +export function instanceOfAcceptOAuth2ConsentRequest(value: object): value is AcceptOAuth2ConsentRequest { + return true; +} + +export function AcceptOAuth2ConsentRequestFromJSON(json: any): AcceptOAuth2ConsentRequest { + return AcceptOAuth2ConsentRequestFromJSONTyped(json, false); +} + +export function AcceptOAuth2ConsentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptOAuth2ConsentRequest { + if (json == null) { + return json; + } + return { + + 'context': json['context'] == null ? undefined : json['context'], + 'grant_access_token_audience': json['grant_access_token_audience'] == null ? undefined : json['grant_access_token_audience'], + 'grant_scope': json['grant_scope'] == null ? undefined : json['grant_scope'], + 'handled_at': json['handled_at'] == null ? undefined : (new Date(json['handled_at'])), + 'remember': json['remember'] == null ? undefined : json['remember'], + 'remember_for': json['remember_for'] == null ? undefined : json['remember_for'], + 'session': json['session'] == null ? undefined : AcceptOAuth2ConsentRequestSessionFromJSON(json['session']), + }; +} + +export function AcceptOAuth2ConsentRequestToJSON(value?: AcceptOAuth2ConsentRequest | null): any { + if (value == null) { + return value; + } + return { + + 'context': value['context'], + 'grant_access_token_audience': value['grant_access_token_audience'], + 'grant_scope': value['grant_scope'], + 'handled_at': value['handled_at'] == null ? undefined : ((value['handled_at']).toISOString()), + 'remember': value['remember'], + 'remember_for': value['remember_for'], + 'session': AcceptOAuth2ConsentRequestSessionToJSON(value['session']), + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequestSession.ts b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequestSession.ts new file mode 100644 index 00000000000..351691b8a55 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2ConsentRequestSession.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AcceptOAuth2ConsentRequestSession + */ +export interface AcceptOAuth2ConsentRequestSession { + /** + * AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the + * refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. + * If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties + * can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! + * @type {any} + * @memberof AcceptOAuth2ConsentRequestSession + */ + access_token?: any | null; + /** + * IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable + * by anyone that has access to the ID Challenge. Use with care! + * @type {any} + * @memberof AcceptOAuth2ConsentRequestSession + */ + id_token?: any | null; +} + +/** + * Check if a given object implements the AcceptOAuth2ConsentRequestSession interface. + */ +export function instanceOfAcceptOAuth2ConsentRequestSession(value: object): value is AcceptOAuth2ConsentRequestSession { + return true; +} + +export function AcceptOAuth2ConsentRequestSessionFromJSON(json: any): AcceptOAuth2ConsentRequestSession { + return AcceptOAuth2ConsentRequestSessionFromJSONTyped(json, false); +} + +export function AcceptOAuth2ConsentRequestSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptOAuth2ConsentRequestSession { + if (json == null) { + return json; + } + return { + + 'access_token': json['access_token'] == null ? undefined : json['access_token'], + 'id_token': json['id_token'] == null ? undefined : json['id_token'], + }; +} + +export function AcceptOAuth2ConsentRequestSessionToJSON(value?: AcceptOAuth2ConsentRequestSession | null): any { + if (value == null) { + return value; + } + return { + + 'access_token': value['access_token'], + 'id_token': value['id_token'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/AcceptOAuth2LoginRequest.ts b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2LoginRequest.ts new file mode 100644 index 00000000000..59e3daf960e --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/AcceptOAuth2LoginRequest.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AcceptOAuth2LoginRequest + */ +export interface AcceptOAuth2LoginRequest { + /** + * ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it + * to express that, for example, a user authenticated using two factor authentication. + * @type {string} + * @memberof AcceptOAuth2LoginRequest + */ + acr?: string; + /** + * + * @type {Array} + * @memberof AcceptOAuth2LoginRequest + */ + amr?: Array; + /** + * + * @type {any} + * @memberof AcceptOAuth2LoginRequest + */ + context?: any | null; + /** + * Extend OAuth2 authentication session lifespan + * + * If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. + * + * This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. + * @type {boolean} + * @memberof AcceptOAuth2LoginRequest + */ + extend_session_lifespan?: boolean; + /** + * ForceSubjectIdentifier forces the "pairwise" user ID of the end-user that authenticated. The "pairwise" user ID refers to the + * (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID + * Connect specification. It allows you to set an obfuscated subject ("user") identifier that is unique to the client. + * + * Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the + * sub claim in the OAuth 2.0 Introspection. + * + * Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself + * you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in + * ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's + * configuration). + * + * Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies + * that you have to compute this value on every authentication process (probably depending on the client ID or some + * other unique value). + * + * If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. + * @type {string} + * @memberof AcceptOAuth2LoginRequest + */ + force_subject_identifier?: string; + /** + * IdentityProviderSessionID is the session ID of the end-user that authenticated. + * If specified, we will use this value to propagate the logout. + * @type {string} + * @memberof AcceptOAuth2LoginRequest + */ + identity_provider_session_id?: string; + /** + * Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store + * a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she + * will not be asked to log in again. + * @type {boolean} + * @memberof AcceptOAuth2LoginRequest + */ + remember?: boolean; + /** + * RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the + * authorization will be remembered for the duration of the browser session (using a session cookie). + * @type {number} + * @memberof AcceptOAuth2LoginRequest + */ + remember_for?: number; + /** + * Subject is the user ID of the end-user that authenticated. + * @type {string} + * @memberof AcceptOAuth2LoginRequest + */ + subject: string; +} + +/** + * Check if a given object implements the AcceptOAuth2LoginRequest interface. + */ +export function instanceOfAcceptOAuth2LoginRequest(value: object): value is AcceptOAuth2LoginRequest { + if (!('subject' in value) || value['subject'] === undefined) return false; + return true; +} + +export function AcceptOAuth2LoginRequestFromJSON(json: any): AcceptOAuth2LoginRequest { + return AcceptOAuth2LoginRequestFromJSONTyped(json, false); +} + +export function AcceptOAuth2LoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptOAuth2LoginRequest { + if (json == null) { + return json; + } + return { + + 'acr': json['acr'] == null ? undefined : json['acr'], + 'amr': json['amr'] == null ? undefined : json['amr'], + 'context': json['context'] == null ? undefined : json['context'], + 'extend_session_lifespan': json['extend_session_lifespan'] == null ? undefined : json['extend_session_lifespan'], + 'force_subject_identifier': json['force_subject_identifier'] == null ? undefined : json['force_subject_identifier'], + 'identity_provider_session_id': json['identity_provider_session_id'] == null ? undefined : json['identity_provider_session_id'], + 'remember': json['remember'] == null ? undefined : json['remember'], + 'remember_for': json['remember_for'] == null ? undefined : json['remember_for'], + 'subject': json['subject'], + }; +} + +export function AcceptOAuth2LoginRequestToJSON(value?: AcceptOAuth2LoginRequest | null): any { + if (value == null) { + return value; + } + return { + + 'acr': value['acr'], + 'amr': value['amr'], + 'context': value['context'], + 'extend_session_lifespan': value['extend_session_lifespan'], + 'force_subject_identifier': value['force_subject_identifier'], + 'identity_provider_session_id': value['identity_provider_session_id'], + 'remember': value['remember'], + 'remember_for': value['remember_for'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/CreateJsonWebKeySet.ts b/clients/hydra/typescript-fetch/src/models/CreateJsonWebKeySet.ts new file mode 100644 index 00000000000..3b4f5a1a107 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/CreateJsonWebKeySet.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Create JSON Web Key Set Request Body + * @export + * @interface CreateJsonWebKeySet + */ +export interface CreateJsonWebKeySet { + /** + * JSON Web Key Algorithm + * + * The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + * @type {string} + * @memberof CreateJsonWebKeySet + */ + alg: string; + /** + * JSON Web Key ID + * + * The Key ID of the key to be created. + * @type {string} + * @memberof CreateJsonWebKeySet + */ + kid: string; + /** + * JSON Web Key Use + * + * The "use" (public key use) parameter identifies the intended use of + * the public key. The "use" parameter is employed to indicate whether + * a public key is used for encrypting data or verifying the signature + * on data. Valid values are "enc" and "sig". + * @type {string} + * @memberof CreateJsonWebKeySet + */ + use: string; +} + +/** + * Check if a given object implements the CreateJsonWebKeySet interface. + */ +export function instanceOfCreateJsonWebKeySet(value: object): value is CreateJsonWebKeySet { + if (!('alg' in value) || value['alg'] === undefined) return false; + if (!('kid' in value) || value['kid'] === undefined) return false; + if (!('use' in value) || value['use'] === undefined) return false; + return true; +} + +export function CreateJsonWebKeySetFromJSON(json: any): CreateJsonWebKeySet { + return CreateJsonWebKeySetFromJSONTyped(json, false); +} + +export function CreateJsonWebKeySetFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateJsonWebKeySet { + if (json == null) { + return json; + } + return { + + 'alg': json['alg'], + 'kid': json['kid'], + 'use': json['use'], + }; +} + +export function CreateJsonWebKeySetToJSON(value?: CreateJsonWebKeySet | null): any { + if (value == null) { + return value; + } + return { + + 'alg': value['alg'], + 'kid': value['kid'], + 'use': value['use'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/CreateVerifiableCredentialRequestBody.ts b/clients/hydra/typescript-fetch/src/models/CreateVerifiableCredentialRequestBody.ts new file mode 100644 index 00000000000..98e72894433 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/CreateVerifiableCredentialRequestBody.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { VerifiableCredentialProof } from './VerifiableCredentialProof'; +import { + VerifiableCredentialProofFromJSON, + VerifiableCredentialProofFromJSONTyped, + VerifiableCredentialProofToJSON, +} from './VerifiableCredentialProof'; + +/** + * + * @export + * @interface CreateVerifiableCredentialRequestBody + */ +export interface CreateVerifiableCredentialRequestBody { + /** + * + * @type {string} + * @memberof CreateVerifiableCredentialRequestBody + */ + format?: string; + /** + * + * @type {VerifiableCredentialProof} + * @memberof CreateVerifiableCredentialRequestBody + */ + proof?: VerifiableCredentialProof; + /** + * + * @type {Array} + * @memberof CreateVerifiableCredentialRequestBody + */ + types?: Array; +} + +/** + * Check if a given object implements the CreateVerifiableCredentialRequestBody interface. + */ +export function instanceOfCreateVerifiableCredentialRequestBody(value: object): value is CreateVerifiableCredentialRequestBody { + return true; +} + +export function CreateVerifiableCredentialRequestBodyFromJSON(json: any): CreateVerifiableCredentialRequestBody { + return CreateVerifiableCredentialRequestBodyFromJSONTyped(json, false); +} + +export function CreateVerifiableCredentialRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateVerifiableCredentialRequestBody { + if (json == null) { + return json; + } + return { + + 'format': json['format'] == null ? undefined : json['format'], + 'proof': json['proof'] == null ? undefined : VerifiableCredentialProofFromJSON(json['proof']), + 'types': json['types'] == null ? undefined : json['types'], + }; +} + +export function CreateVerifiableCredentialRequestBodyToJSON(value?: CreateVerifiableCredentialRequestBody | null): any { + if (value == null) { + return value; + } + return { + + 'format': value['format'], + 'proof': VerifiableCredentialProofToJSON(value['proof']), + 'types': value['types'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/CredentialSupportedDraft00.ts b/clients/hydra/typescript-fetch/src/models/CredentialSupportedDraft00.ts new file mode 100644 index 00000000000..588ffd215f8 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/CredentialSupportedDraft00.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Includes information about the supported verifiable credentials. + * @export + * @interface CredentialSupportedDraft00 + */ +export interface CredentialSupportedDraft00 { + /** + * OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported + * + * Contains a list of cryptographic binding methods supported for signing the proof. + * @type {Array} + * @memberof CredentialSupportedDraft00 + */ + cryptographic_binding_methods_supported?: Array; + /** + * OpenID Connect Verifiable Credentials Cryptographic Suites Supported + * + * Contains a list of cryptographic suites methods supported for signing the proof. + * @type {Array} + * @memberof CredentialSupportedDraft00 + */ + cryptographic_suites_supported?: Array; + /** + * OpenID Connect Verifiable Credentials Format + * + * Contains the format that is supported by this authorization server. + * @type {string} + * @memberof CredentialSupportedDraft00 + */ + format?: string; + /** + * OpenID Connect Verifiable Credentials Types + * + * Contains the types of verifiable credentials supported. + * @type {Array} + * @memberof CredentialSupportedDraft00 + */ + types?: Array; +} + +/** + * Check if a given object implements the CredentialSupportedDraft00 interface. + */ +export function instanceOfCredentialSupportedDraft00(value: object): value is CredentialSupportedDraft00 { + return true; +} + +export function CredentialSupportedDraft00FromJSON(json: any): CredentialSupportedDraft00 { + return CredentialSupportedDraft00FromJSONTyped(json, false); +} + +export function CredentialSupportedDraft00FromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialSupportedDraft00 { + if (json == null) { + return json; + } + return { + + 'cryptographic_binding_methods_supported': json['cryptographic_binding_methods_supported'] == null ? undefined : json['cryptographic_binding_methods_supported'], + 'cryptographic_suites_supported': json['cryptographic_suites_supported'] == null ? undefined : json['cryptographic_suites_supported'], + 'format': json['format'] == null ? undefined : json['format'], + 'types': json['types'] == null ? undefined : json['types'], + }; +} + +export function CredentialSupportedDraft00ToJSON(value?: CredentialSupportedDraft00 | null): any { + if (value == null) { + return value; + } + return { + + 'cryptographic_binding_methods_supported': value['cryptographic_binding_methods_supported'], + 'cryptographic_suites_supported': value['cryptographic_suites_supported'], + 'format': value['format'], + 'types': value['types'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/ErrorOAuth2.ts b/clients/hydra/typescript-fetch/src/models/ErrorOAuth2.ts new file mode 100644 index 00000000000..d80f30cc40c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/ErrorOAuth2.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Error + * @export + * @interface ErrorOAuth2 + */ +export interface ErrorOAuth2 { + /** + * Error + * @type {string} + * @memberof ErrorOAuth2 + */ + error?: string; + /** + * Error Debug Information + * + * Only available in dev mode. + * @type {string} + * @memberof ErrorOAuth2 + */ + error_debug?: string; + /** + * Error Description + * @type {string} + * @memberof ErrorOAuth2 + */ + error_description?: string; + /** + * Error Hint + * + * Helps the user identify the error cause. + * @type {string} + * @memberof ErrorOAuth2 + */ + error_hint?: string; + /** + * HTTP Status Code + * @type {number} + * @memberof ErrorOAuth2 + */ + status_code?: number; +} + +/** + * Check if a given object implements the ErrorOAuth2 interface. + */ +export function instanceOfErrorOAuth2(value: object): value is ErrorOAuth2 { + return true; +} + +export function ErrorOAuth2FromJSON(json: any): ErrorOAuth2 { + return ErrorOAuth2FromJSONTyped(json, false); +} + +export function ErrorOAuth2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorOAuth2 { + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + 'error_debug': json['error_debug'] == null ? undefined : json['error_debug'], + 'error_description': json['error_description'] == null ? undefined : json['error_description'], + 'error_hint': json['error_hint'] == null ? undefined : json['error_hint'], + 'status_code': json['status_code'] == null ? undefined : json['status_code'], + }; +} + +export function ErrorOAuth2ToJSON(value?: ErrorOAuth2 | null): any { + if (value == null) { + return value; + } + return { + + 'error': value['error'], + 'error_debug': value['error_debug'], + 'error_description': value['error_description'], + 'error_hint': value['error_hint'], + 'status_code': value['status_code'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/GenericError.ts b/clients/hydra/typescript-fetch/src/models/GenericError.ts new file mode 100644 index 00000000000..a4440867b15 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/GenericError.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface GenericError + */ +export interface GenericError { + /** + * The status code + * @type {number} + * @memberof GenericError + */ + code?: number; + /** + * Debug information + * + * This field is often not exposed to protect against leaking + * sensitive information. + * @type {string} + * @memberof GenericError + */ + debug?: string; + /** + * Further error details + * @type {any} + * @memberof GenericError + */ + details?: any | null; + /** + * The error ID + * + * Useful when trying to identify various errors in application logic. + * @type {string} + * @memberof GenericError + */ + id?: string; + /** + * Error message + * + * The error's message. + * @type {string} + * @memberof GenericError + */ + message: string; + /** + * A human-readable reason for the error + * @type {string} + * @memberof GenericError + */ + reason?: string; + /** + * The request ID + * + * The request ID is often exposed internally in order to trace + * errors across service architectures. This is often a UUID. + * @type {string} + * @memberof GenericError + */ + request?: string; + /** + * The status description + * @type {string} + * @memberof GenericError + */ + status?: string; +} + +/** + * Check if a given object implements the GenericError interface. + */ +export function instanceOfGenericError(value: object): value is GenericError { + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function GenericErrorFromJSON(json: any): GenericError { + return GenericErrorFromJSONTyped(json, false); +} + +export function GenericErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericError { + if (json == null) { + return json; + } + return { + + 'code': json['code'] == null ? undefined : json['code'], + 'debug': json['debug'] == null ? undefined : json['debug'], + 'details': json['details'] == null ? undefined : json['details'], + 'id': json['id'] == null ? undefined : json['id'], + 'message': json['message'], + 'reason': json['reason'] == null ? undefined : json['reason'], + 'request': json['request'] == null ? undefined : json['request'], + 'status': json['status'] == null ? undefined : json['status'], + }; +} + +export function GenericErrorToJSON(value?: GenericError | null): any { + if (value == null) { + return value; + } + return { + + 'code': value['code'], + 'debug': value['debug'], + 'details': value['details'], + 'id': value['id'], + 'message': value['message'], + 'reason': value['reason'], + 'request': value['request'], + 'status': value['status'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/GetVersion200Response.ts b/clients/hydra/typescript-fetch/src/models/GetVersion200Response.ts new file mode 100644 index 00000000000..7f4451d089b --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/GetVersion200Response.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface GetVersion200Response + */ +export interface GetVersion200Response { + /** + * The version of Ory Hydra. + * @type {string} + * @memberof GetVersion200Response + */ + version?: string; +} + +/** + * Check if a given object implements the GetVersion200Response interface. + */ +export function instanceOfGetVersion200Response(value: object): value is GetVersion200Response { + return true; +} + +export function GetVersion200ResponseFromJSON(json: any): GetVersion200Response { + return GetVersion200ResponseFromJSONTyped(json, false); +} + +export function GetVersion200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetVersion200Response { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function GetVersion200ResponseToJSON(value?: GetVersion200Response | null): any { + if (value == null) { + return value; + } + return { + + 'version': value['version'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/HealthNotReadyStatus.ts b/clients/hydra/typescript-fetch/src/models/HealthNotReadyStatus.ts new file mode 100644 index 00000000000..dd863bcf4bd --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/HealthNotReadyStatus.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface HealthNotReadyStatus + */ +export interface HealthNotReadyStatus { + /** + * Errors contains a list of errors that caused the not ready status. + * @type {{ [key: string]: string; }} + * @memberof HealthNotReadyStatus + */ + errors?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the HealthNotReadyStatus interface. + */ +export function instanceOfHealthNotReadyStatus(value: object): value is HealthNotReadyStatus { + return true; +} + +export function HealthNotReadyStatusFromJSON(json: any): HealthNotReadyStatus { + return HealthNotReadyStatusFromJSONTyped(json, false); +} + +export function HealthNotReadyStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthNotReadyStatus { + if (json == null) { + return json; + } + return { + + 'errors': json['errors'] == null ? undefined : json['errors'], + }; +} + +export function HealthNotReadyStatusToJSON(value?: HealthNotReadyStatus | null): any { + if (value == null) { + return value; + } + return { + + 'errors': value['errors'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/HealthStatus.ts b/clients/hydra/typescript-fetch/src/models/HealthStatus.ts new file mode 100644 index 00000000000..009fd40b76c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/HealthStatus.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface HealthStatus + */ +export interface HealthStatus { + /** + * Status always contains "ok". + * @type {string} + * @memberof HealthStatus + */ + status?: string; +} + +/** + * Check if a given object implements the HealthStatus interface. + */ +export function instanceOfHealthStatus(value: object): value is HealthStatus { + return true; +} + +export function HealthStatusFromJSON(json: any): HealthStatus { + return HealthStatusFromJSONTyped(json, false); +} + +export function HealthStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthStatus { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + }; +} + +export function HealthStatusToJSON(value?: HealthStatus | null): any { + if (value == null) { + return value; + } + return { + + 'status': value['status'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/IntrospectedOAuth2Token.ts b/clients/hydra/typescript-fetch/src/models/IntrospectedOAuth2Token.ts new file mode 100644 index 00000000000..c7e4fc07f50 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/IntrospectedOAuth2Token.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Introspection contains an access token's session data as specified by + * [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + * @export + * @interface IntrospectedOAuth2Token + */ +export interface IntrospectedOAuth2Token { + /** + * Active is a boolean indicator of whether or not the presented token + * is currently active. The specifics of a token's "active" state + * will vary depending on the implementation of the authorization + * server and the information it keeps about its tokens, but a "true" + * value return for the "active" property will generally indicate + * that a given token has been issued by this authorization server, + * has not been revoked by the resource owner, and is within its + * given time window of validity (e.g., after its issuance time and + * before its expiration time). + * @type {boolean} + * @memberof IntrospectedOAuth2Token + */ + active: boolean; + /** + * Audience contains a list of the token's intended audiences. + * @type {Array} + * @memberof IntrospectedOAuth2Token + */ + aud?: Array; + /** + * ID is aclient identifier for the OAuth 2.0 client that + * requested this token. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + client_id?: string; + /** + * Expires at is an integer timestamp, measured in the number of seconds + * since January 1 1970 UTC, indicating when this token will expire. + * @type {number} + * @memberof IntrospectedOAuth2Token + */ + exp?: number; + /** + * Extra is arbitrary data set by the session. + * @type {{ [key: string]: any; }} + * @memberof IntrospectedOAuth2Token + */ + ext?: { [key: string]: any; }; + /** + * Issued at is an integer timestamp, measured in the number of seconds + * since January 1 1970 UTC, indicating when this token was + * originally issued. + * @type {number} + * @memberof IntrospectedOAuth2Token + */ + iat?: number; + /** + * IssuerURL is a string representing the issuer of this token + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + iss?: string; + /** + * NotBefore is an integer timestamp, measured in the number of seconds + * since January 1 1970 UTC, indicating when this token is not to be + * used before. + * @type {number} + * @memberof IntrospectedOAuth2Token + */ + nbf?: number; + /** + * ObfuscatedSubject is set when the subject identifier algorithm was set to "pairwise" during authorization. + * It is the `sub` value of the ID Token that was issued. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + obfuscated_subject?: string; + /** + * Scope is a JSON string containing a space-separated list of + * scopes associated with this token. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + scope?: string; + /** + * Subject of the token, as defined in JWT [RFC7519]. + * Usually a machine-readable identifier of the resource owner who + * authorized this token. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + sub?: string; + /** + * TokenType is the introspected token's type, typically `Bearer`. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + token_type?: string; + /** + * TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + token_use?: string; + /** + * Username is a human-readable identifier for the resource owner who + * authorized this token. + * @type {string} + * @memberof IntrospectedOAuth2Token + */ + username?: string; +} + +/** + * Check if a given object implements the IntrospectedOAuth2Token interface. + */ +export function instanceOfIntrospectedOAuth2Token(value: object): value is IntrospectedOAuth2Token { + if (!('active' in value) || value['active'] === undefined) return false; + return true; +} + +export function IntrospectedOAuth2TokenFromJSON(json: any): IntrospectedOAuth2Token { + return IntrospectedOAuth2TokenFromJSONTyped(json, false); +} + +export function IntrospectedOAuth2TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntrospectedOAuth2Token { + if (json == null) { + return json; + } + return { + + 'active': json['active'], + 'aud': json['aud'] == null ? undefined : json['aud'], + 'client_id': json['client_id'] == null ? undefined : json['client_id'], + 'exp': json['exp'] == null ? undefined : json['exp'], + 'ext': json['ext'] == null ? undefined : json['ext'], + 'iat': json['iat'] == null ? undefined : json['iat'], + 'iss': json['iss'] == null ? undefined : json['iss'], + 'nbf': json['nbf'] == null ? undefined : json['nbf'], + 'obfuscated_subject': json['obfuscated_subject'] == null ? undefined : json['obfuscated_subject'], + 'scope': json['scope'] == null ? undefined : json['scope'], + 'sub': json['sub'] == null ? undefined : json['sub'], + 'token_type': json['token_type'] == null ? undefined : json['token_type'], + 'token_use': json['token_use'] == null ? undefined : json['token_use'], + 'username': json['username'] == null ? undefined : json['username'], + }; +} + +export function IntrospectedOAuth2TokenToJSON(value?: IntrospectedOAuth2Token | null): any { + if (value == null) { + return value; + } + return { + + 'active': value['active'], + 'aud': value['aud'], + 'client_id': value['client_id'], + 'exp': value['exp'], + 'ext': value['ext'], + 'iat': value['iat'], + 'iss': value['iss'], + 'nbf': value['nbf'], + 'obfuscated_subject': value['obfuscated_subject'], + 'scope': value['scope'], + 'sub': value['sub'], + 'token_type': value['token_type'], + 'token_use': value['token_use'], + 'username': value['username'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/IsReady200Response.ts b/clients/hydra/typescript-fetch/src/models/IsReady200Response.ts new file mode 100644 index 00000000000..d6977974a56 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/IsReady200Response.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface IsReady200Response + */ +export interface IsReady200Response { + /** + * Always "ok". + * @type {string} + * @memberof IsReady200Response + */ + status?: string; +} + +/** + * Check if a given object implements the IsReady200Response interface. + */ +export function instanceOfIsReady200Response(value: object): value is IsReady200Response { + return true; +} + +export function IsReady200ResponseFromJSON(json: any): IsReady200Response { + return IsReady200ResponseFromJSONTyped(json, false); +} + +export function IsReady200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IsReady200Response { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + }; +} + +export function IsReady200ResponseToJSON(value?: IsReady200Response | null): any { + if (value == null) { + return value; + } + return { + + 'status': value['status'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/IsReady503Response.ts b/clients/hydra/typescript-fetch/src/models/IsReady503Response.ts new file mode 100644 index 00000000000..23922dff311 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/IsReady503Response.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface IsReady503Response + */ +export interface IsReady503Response { + /** + * Errors contains a list of errors that caused the not ready status. + * @type {{ [key: string]: string; }} + * @memberof IsReady503Response + */ + errors?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the IsReady503Response interface. + */ +export function instanceOfIsReady503Response(value: object): value is IsReady503Response { + return true; +} + +export function IsReady503ResponseFromJSON(json: any): IsReady503Response { + return IsReady503ResponseFromJSONTyped(json, false); +} + +export function IsReady503ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IsReady503Response { + if (json == null) { + return json; + } + return { + + 'errors': json['errors'] == null ? undefined : json['errors'], + }; +} + +export function IsReady503ResponseToJSON(value?: IsReady503Response | null): any { + if (value == null) { + return value; + } + return { + + 'errors': value['errors'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/JsonPatch.ts b/clients/hydra/typescript-fetch/src/models/JsonPatch.ts new file mode 100644 index 00000000000..29fa47e18d1 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/JsonPatch.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * A JSONPatch document as defined by RFC 6902 + * @export + * @interface JsonPatch + */ +export interface JsonPatch { + /** + * This field is used together with operation "move" and uses JSON Pointer notation. + * + * Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + * @type {string} + * @memberof JsonPatch + */ + from?: string; + /** + * The operation to be performed. One of "add", "remove", "replace", "move", "copy", or "test". + * @type {string} + * @memberof JsonPatch + */ + op: string; + /** + * The path to the target path. Uses JSON pointer notation. + * + * Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + * @type {string} + * @memberof JsonPatch + */ + path: string; + /** + * The value to be used within the operations. + * + * Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + * @type {any} + * @memberof JsonPatch + */ + value?: any | null; +} + +/** + * Check if a given object implements the JsonPatch interface. + */ +export function instanceOfJsonPatch(value: object): value is JsonPatch { + if (!('op' in value) || value['op'] === undefined) return false; + if (!('path' in value) || value['path'] === undefined) return false; + return true; +} + +export function JsonPatchFromJSON(json: any): JsonPatch { + return JsonPatchFromJSONTyped(json, false); +} + +export function JsonPatchFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatch { + if (json == null) { + return json; + } + return { + + 'from': json['from'] == null ? undefined : json['from'], + 'op': json['op'], + 'path': json['path'], + 'value': json['value'] == null ? undefined : json['value'], + }; +} + +export function JsonPatchToJSON(value?: JsonPatch | null): any { + if (value == null) { + return value; + } + return { + + 'from': value['from'], + 'op': value['op'], + 'path': value['path'], + 'value': value['value'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/JsonWebKey.ts b/clients/hydra/typescript-fetch/src/models/JsonWebKey.ts new file mode 100644 index 00000000000..dca3ab52587 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/JsonWebKey.ts @@ -0,0 +1,217 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface JsonWebKey + */ +export interface JsonWebKey { + /** + * The "alg" (algorithm) parameter identifies the algorithm intended for + * use with the key. The values used should either be registered in the + * IANA "JSON Web Signature and Encryption Algorithms" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. + * @type {string} + * @memberof JsonWebKey + */ + alg: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + crv?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + d?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + dp?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + dq?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + e?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + k?: string; + /** + * The "kid" (key ID) parameter is used to match a specific key. This + * is used, for instance, to choose among a set of keys within a JWK Set + * during key rollover. The structure of the "kid" value is + * unspecified. When "kid" values are used within a JWK Set, different + * keys within the JWK Set SHOULD use distinct "kid" values. (One + * example in which different keys might use the same "kid" value is if + * they have different "kty" (key type) values but are considered to be + * equivalent alternatives by the application using them.) The "kid" + * value is a case-sensitive string. + * @type {string} + * @memberof JsonWebKey + */ + kid: string; + /** + * The "kty" (key type) parameter identifies the cryptographic algorithm + * family used with the key, such as "RSA" or "EC". "kty" values should + * either be registered in the IANA "JSON Web Key Types" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. The "kty" value is a case-sensitive string. + * @type {string} + * @memberof JsonWebKey + */ + kty: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + n?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + p?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + q?: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + qi?: string; + /** + * Use ("public key use") identifies the intended use of + * the public key. The "use" parameter is employed to indicate whether + * a public key is used for encrypting data or verifying the signature + * on data. Values are commonly "sig" (signature) or "enc" (encryption). + * @type {string} + * @memberof JsonWebKey + */ + use: string; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + x?: string; + /** + * The "x5c" (X.509 certificate chain) parameter contains a chain of one + * or more PKIX certificates [RFC5280]. The certificate chain is + * represented as a JSON array of certificate value strings. Each + * string in the array is a base64-encoded (Section 4 of [RFC4648] -- + * not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. + * The PKIX certificate containing the key value MUST be the first + * certificate. + * @type {Array} + * @memberof JsonWebKey + */ + x5c?: Array; + /** + * + * @type {string} + * @memberof JsonWebKey + */ + y?: string; +} + +/** + * Check if a given object implements the JsonWebKey interface. + */ +export function instanceOfJsonWebKey(value: object): value is JsonWebKey { + if (!('alg' in value) || value['alg'] === undefined) return false; + if (!('kid' in value) || value['kid'] === undefined) return false; + if (!('kty' in value) || value['kty'] === undefined) return false; + if (!('use' in value) || value['use'] === undefined) return false; + return true; +} + +export function JsonWebKeyFromJSON(json: any): JsonWebKey { + return JsonWebKeyFromJSONTyped(json, false); +} + +export function JsonWebKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonWebKey { + if (json == null) { + return json; + } + return { + + 'alg': json['alg'], + 'crv': json['crv'] == null ? undefined : json['crv'], + 'd': json['d'] == null ? undefined : json['d'], + 'dp': json['dp'] == null ? undefined : json['dp'], + 'dq': json['dq'] == null ? undefined : json['dq'], + 'e': json['e'] == null ? undefined : json['e'], + 'k': json['k'] == null ? undefined : json['k'], + 'kid': json['kid'], + 'kty': json['kty'], + 'n': json['n'] == null ? undefined : json['n'], + 'p': json['p'] == null ? undefined : json['p'], + 'q': json['q'] == null ? undefined : json['q'], + 'qi': json['qi'] == null ? undefined : json['qi'], + 'use': json['use'], + 'x': json['x'] == null ? undefined : json['x'], + 'x5c': json['x5c'] == null ? undefined : json['x5c'], + 'y': json['y'] == null ? undefined : json['y'], + }; +} + +export function JsonWebKeyToJSON(value?: JsonWebKey | null): any { + if (value == null) { + return value; + } + return { + + 'alg': value['alg'], + 'crv': value['crv'], + 'd': value['d'], + 'dp': value['dp'], + 'dq': value['dq'], + 'e': value['e'], + 'k': value['k'], + 'kid': value['kid'], + 'kty': value['kty'], + 'n': value['n'], + 'p': value['p'], + 'q': value['q'], + 'qi': value['qi'], + 'use': value['use'], + 'x': value['x'], + 'x5c': value['x5c'], + 'y': value['y'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/JsonWebKeySet.ts b/clients/hydra/typescript-fetch/src/models/JsonWebKeySet.ts new file mode 100644 index 00000000000..463765fe5aa --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/JsonWebKeySet.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { JsonWebKey } from './JsonWebKey'; +import { + JsonWebKeyFromJSON, + JsonWebKeyFromJSONTyped, + JsonWebKeyToJSON, +} from './JsonWebKey'; + +/** + * JSON Web Key Set + * @export + * @interface JsonWebKeySet + */ +export interface JsonWebKeySet { + /** + * List of JSON Web Keys + * + * The value of the "keys" parameter is an array of JSON Web Key (JWK) + * values. By default, the order of the JWK values within the array does + * not imply an order of preference among them, although applications + * of JWK Sets can choose to assign a meaning to the order for their + * purposes, if desired. + * @type {Array} + * @memberof JsonWebKeySet + */ + keys?: Array; +} + +/** + * Check if a given object implements the JsonWebKeySet interface. + */ +export function instanceOfJsonWebKeySet(value: object): value is JsonWebKeySet { + return true; +} + +export function JsonWebKeySetFromJSON(json: any): JsonWebKeySet { + return JsonWebKeySetFromJSONTyped(json, false); +} + +export function JsonWebKeySetFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonWebKeySet { + if (json == null) { + return json; + } + return { + + 'keys': json['keys'] == null ? undefined : ((json['keys'] as Array).map(JsonWebKeyFromJSON)), + }; +} + +export function JsonWebKeySetToJSON(value?: JsonWebKeySet | null): any { + if (value == null) { + return value; + } + return { + + 'keys': value['keys'] == null ? undefined : ((value['keys'] as Array).map(JsonWebKeyToJSON)), + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2Client.ts b/clients/hydra/typescript-fetch/src/models/OAuth2Client.ts new file mode 100644 index 00000000000..57943672366 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2Client.ts @@ -0,0 +1,537 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are + * generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + * @export + * @interface OAuth2Client + */ +export interface OAuth2Client { + /** + * OAuth 2.0 Access Token Strategy + * + * AccessTokenStrategy is the strategy used to generate access tokens. + * Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens + * Setting the stragegy here overrides the global setting in `strategies.access_token`. + * @type {string} + * @memberof OAuth2Client + */ + access_token_strategy?: string; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + allowed_cors_origins?: Array; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + audience?: Array; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + authorization_code_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + authorization_code_grant_id_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + authorization_code_grant_refresh_token_lifespan?: string; + /** + * OpenID Connect Back-Channel Logout Session Required + * + * Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout + * Token to identify the RP session with the OP when the backchannel_logout_uri is used. + * If omitted, the default value is false. + * @type {boolean} + * @memberof OAuth2Client + */ + backchannel_logout_session_required?: boolean; + /** + * OpenID Connect Back-Channel Logout URI + * + * RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + * @type {string} + * @memberof OAuth2Client + */ + backchannel_logout_uri?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + client_credentials_grant_access_token_lifespan?: string; + /** + * OAuth 2.0 Client ID + * + * The ID is immutable. If no ID is provided, a UUID4 will be generated. + * @type {string} + * @memberof OAuth2Client + */ + client_id?: string; + /** + * OAuth 2.0 Client Name + * + * The human-readable name of the client to be presented to the + * end-user during authorization. + * @type {string} + * @memberof OAuth2Client + */ + client_name?: string; + /** + * OAuth 2.0 Client Secret + * + * The secret will be included in the create request as cleartext, and then + * never again. The secret is kept in hashed format and is not recoverable once lost. + * @type {string} + * @memberof OAuth2Client + */ + client_secret?: string; + /** + * OAuth 2.0 Client Secret Expires At + * + * The field is currently not supported and its value is always 0. + * @type {number} + * @memberof OAuth2Client + */ + client_secret_expires_at?: number; + /** + * OAuth 2.0 Client URI + * + * ClientURI is a URL string of a web page providing information about the client. + * If present, the server SHOULD display this URL to the end-user in + * a clickable fashion. + * @type {string} + * @memberof OAuth2Client + */ + client_uri?: string; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + contacts?: Array; + /** + * OAuth 2.0 Client Creation Date + * + * CreatedAt returns the timestamp of the client's creation. + * @type {Date} + * @memberof OAuth2Client + */ + created_at?: Date; + /** + * OpenID Connect Front-Channel Logout Session Required + * + * Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be + * included to identify the RP session with the OP when the frontchannel_logout_uri is used. + * If omitted, the default value is false. + * @type {boolean} + * @memberof OAuth2Client + */ + frontchannel_logout_session_required?: boolean; + /** + * OpenID Connect Front-Channel Logout URI + * + * RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query + * parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the + * request and to determine which of the potentially multiple sessions is to be logged out; if either is + * included, both MUST be. + * @type {string} + * @memberof OAuth2Client + */ + frontchannel_logout_uri?: string; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + grant_types?: Array; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + implicit_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + implicit_grant_id_token_lifespan?: string; + /** + * OAuth 2.0 Client JSON Web Key Set + * + * Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as + * the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter + * is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for + * instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client + * can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation + * (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks + * parameters MUST NOT be used together. + * @type {any} + * @memberof OAuth2Client + */ + jwks?: any | null; + /** + * OAuth 2.0 Client JSON Web Key Set URL + * + * URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains + * the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the + * Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing + * and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced + * JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both + * signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used + * to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST + * match those in the certificate. + * @type {string} + * @memberof OAuth2Client + */ + jwks_uri?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + jwt_bearer_grant_access_token_lifespan?: string; + /** + * OAuth 2.0 Client Logo URI + * + * A URL string referencing the client's logo. + * @type {string} + * @memberof OAuth2Client + */ + logo_uri?: string; + /** + * + * @type {any} + * @memberof OAuth2Client + */ + metadata?: any | null; + /** + * OAuth 2.0 Client Owner + * + * Owner is a string identifying the owner of the OAuth 2.0 Client. + * @type {string} + * @memberof OAuth2Client + */ + owner?: string; + /** + * OAuth 2.0 Client Policy URI + * + * PolicyURI is a URL string that points to a human-readable privacy policy document + * that describes how the deployment organization collects, uses, + * retains, and discloses personal data. + * @type {string} + * @memberof OAuth2Client + */ + policy_uri?: string; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + post_logout_redirect_uris?: Array; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + redirect_uris?: Array; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + refresh_token_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + refresh_token_grant_id_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2Client + */ + refresh_token_grant_refresh_token_lifespan?: string; + /** + * OpenID Connect Dynamic Client Registration Access Token + * + * RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client + * using Dynamic Client Registration. + * @type {string} + * @memberof OAuth2Client + */ + registration_access_token?: string; + /** + * OpenID Connect Dynamic Client Registration URL + * + * RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + * @type {string} + * @memberof OAuth2Client + */ + registration_client_uri?: string; + /** + * OpenID Connect Request Object Signing Algorithm + * + * JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects + * from this Client MUST be rejected, if not signed with this algorithm. + * @type {string} + * @memberof OAuth2Client + */ + request_object_signing_alg?: string; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + request_uris?: Array; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + response_types?: Array; + /** + * OAuth 2.0 Client Scope + * + * Scope is a string containing a space-separated list of scope values (as + * described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client + * can use when requesting access tokens. + * @type {string} + * @memberof OAuth2Client + */ + scope?: string; + /** + * OpenID Connect Sector Identifier URI + * + * URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a + * file with a single JSON array of redirect_uri values. + * @type {string} + * @memberof OAuth2Client + */ + sector_identifier_uri?: string; + /** + * SkipConsent skips the consent screen for this client. This field can only + * be set from the admin API. + * @type {boolean} + * @memberof OAuth2Client + */ + skip_consent?: boolean; + /** + * SkipLogoutConsent skips the logout consent screen for this client. This field can only + * be set from the admin API. + * @type {boolean} + * @memberof OAuth2Client + */ + skip_logout_consent?: boolean; + /** + * OpenID Connect Subject Type + * + * The `subject_types_supported` Discovery parameter contains a + * list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + * @type {string} + * @memberof OAuth2Client + */ + subject_type?: string; + /** + * OAuth 2.0 Token Endpoint Authentication Method + * + * Requested Client Authentication method for the Token Endpoint. The options are: + * + * `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. + * `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. + * `private_key_jwt`: Use JSON Web Tokens to authenticate the client. + * `none`: Used for public clients (native apps, mobile apps) which can not have secrets. + * @type {string} + * @memberof OAuth2Client + */ + token_endpoint_auth_method?: string; + /** + * OAuth 2.0 Token Endpoint Signing Algorithm + * + * Requested Client Authentication signing algorithm for the Token Endpoint. + * @type {string} + * @memberof OAuth2Client + */ + token_endpoint_auth_signing_alg?: string; + /** + * OAuth 2.0 Client Terms of Service URI + * + * A URL string pointing to a human-readable terms of service + * document for the client that describes a contractual relationship + * between the end-user and the client that the end-user accepts when + * authorizing the client. + * @type {string} + * @memberof OAuth2Client + */ + tos_uri?: string; + /** + * OAuth 2.0 Client Last Update Date + * + * UpdatedAt returns the timestamp of the last update. + * @type {Date} + * @memberof OAuth2Client + */ + updated_at?: Date; + /** + * OpenID Connect Request Userinfo Signed Response Algorithm + * + * JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT + * [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims + * as a UTF-8 encoded JSON object using the application/json content-type. + * @type {string} + * @memberof OAuth2Client + */ + userinfo_signed_response_alg?: string; +} + +/** + * Check if a given object implements the OAuth2Client interface. + */ +export function instanceOfOAuth2Client(value: object): value is OAuth2Client { + return true; +} + +export function OAuth2ClientFromJSON(json: any): OAuth2Client { + return OAuth2ClientFromJSONTyped(json, false); +} + +export function OAuth2ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2Client { + if (json == null) { + return json; + } + return { + + 'access_token_strategy': json['access_token_strategy'] == null ? undefined : json['access_token_strategy'], + 'allowed_cors_origins': json['allowed_cors_origins'] == null ? undefined : json['allowed_cors_origins'], + 'audience': json['audience'] == null ? undefined : json['audience'], + 'authorization_code_grant_access_token_lifespan': json['authorization_code_grant_access_token_lifespan'] == null ? undefined : json['authorization_code_grant_access_token_lifespan'], + 'authorization_code_grant_id_token_lifespan': json['authorization_code_grant_id_token_lifespan'] == null ? undefined : json['authorization_code_grant_id_token_lifespan'], + 'authorization_code_grant_refresh_token_lifespan': json['authorization_code_grant_refresh_token_lifespan'] == null ? undefined : json['authorization_code_grant_refresh_token_lifespan'], + 'backchannel_logout_session_required': json['backchannel_logout_session_required'] == null ? undefined : json['backchannel_logout_session_required'], + 'backchannel_logout_uri': json['backchannel_logout_uri'] == null ? undefined : json['backchannel_logout_uri'], + 'client_credentials_grant_access_token_lifespan': json['client_credentials_grant_access_token_lifespan'] == null ? undefined : json['client_credentials_grant_access_token_lifespan'], + 'client_id': json['client_id'] == null ? undefined : json['client_id'], + 'client_name': json['client_name'] == null ? undefined : json['client_name'], + 'client_secret': json['client_secret'] == null ? undefined : json['client_secret'], + 'client_secret_expires_at': json['client_secret_expires_at'] == null ? undefined : json['client_secret_expires_at'], + 'client_uri': json['client_uri'] == null ? undefined : json['client_uri'], + 'contacts': json['contacts'] == null ? undefined : json['contacts'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'frontchannel_logout_session_required': json['frontchannel_logout_session_required'] == null ? undefined : json['frontchannel_logout_session_required'], + 'frontchannel_logout_uri': json['frontchannel_logout_uri'] == null ? undefined : json['frontchannel_logout_uri'], + 'grant_types': json['grant_types'] == null ? undefined : json['grant_types'], + 'implicit_grant_access_token_lifespan': json['implicit_grant_access_token_lifespan'] == null ? undefined : json['implicit_grant_access_token_lifespan'], + 'implicit_grant_id_token_lifespan': json['implicit_grant_id_token_lifespan'] == null ? undefined : json['implicit_grant_id_token_lifespan'], + 'jwks': json['jwks'] == null ? undefined : json['jwks'], + 'jwks_uri': json['jwks_uri'] == null ? undefined : json['jwks_uri'], + 'jwt_bearer_grant_access_token_lifespan': json['jwt_bearer_grant_access_token_lifespan'] == null ? undefined : json['jwt_bearer_grant_access_token_lifespan'], + 'logo_uri': json['logo_uri'] == null ? undefined : json['logo_uri'], + 'metadata': json['metadata'] == null ? undefined : json['metadata'], + 'owner': json['owner'] == null ? undefined : json['owner'], + 'policy_uri': json['policy_uri'] == null ? undefined : json['policy_uri'], + 'post_logout_redirect_uris': json['post_logout_redirect_uris'] == null ? undefined : json['post_logout_redirect_uris'], + 'redirect_uris': json['redirect_uris'] == null ? undefined : json['redirect_uris'], + 'refresh_token_grant_access_token_lifespan': json['refresh_token_grant_access_token_lifespan'] == null ? undefined : json['refresh_token_grant_access_token_lifespan'], + 'refresh_token_grant_id_token_lifespan': json['refresh_token_grant_id_token_lifespan'] == null ? undefined : json['refresh_token_grant_id_token_lifespan'], + 'refresh_token_grant_refresh_token_lifespan': json['refresh_token_grant_refresh_token_lifespan'] == null ? undefined : json['refresh_token_grant_refresh_token_lifespan'], + 'registration_access_token': json['registration_access_token'] == null ? undefined : json['registration_access_token'], + 'registration_client_uri': json['registration_client_uri'] == null ? undefined : json['registration_client_uri'], + 'request_object_signing_alg': json['request_object_signing_alg'] == null ? undefined : json['request_object_signing_alg'], + 'request_uris': json['request_uris'] == null ? undefined : json['request_uris'], + 'response_types': json['response_types'] == null ? undefined : json['response_types'], + 'scope': json['scope'] == null ? undefined : json['scope'], + 'sector_identifier_uri': json['sector_identifier_uri'] == null ? undefined : json['sector_identifier_uri'], + 'skip_consent': json['skip_consent'] == null ? undefined : json['skip_consent'], + 'skip_logout_consent': json['skip_logout_consent'] == null ? undefined : json['skip_logout_consent'], + 'subject_type': json['subject_type'] == null ? undefined : json['subject_type'], + 'token_endpoint_auth_method': json['token_endpoint_auth_method'] == null ? undefined : json['token_endpoint_auth_method'], + 'token_endpoint_auth_signing_alg': json['token_endpoint_auth_signing_alg'] == null ? undefined : json['token_endpoint_auth_signing_alg'], + 'tos_uri': json['tos_uri'] == null ? undefined : json['tos_uri'], + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'userinfo_signed_response_alg': json['userinfo_signed_response_alg'] == null ? undefined : json['userinfo_signed_response_alg'], + }; +} + +export function OAuth2ClientToJSON(value?: OAuth2Client | null): any { + if (value == null) { + return value; + } + return { + + 'access_token_strategy': value['access_token_strategy'], + 'allowed_cors_origins': value['allowed_cors_origins'], + 'audience': value['audience'], + 'authorization_code_grant_access_token_lifespan': value['authorization_code_grant_access_token_lifespan'], + 'authorization_code_grant_id_token_lifespan': value['authorization_code_grant_id_token_lifespan'], + 'authorization_code_grant_refresh_token_lifespan': value['authorization_code_grant_refresh_token_lifespan'], + 'backchannel_logout_session_required': value['backchannel_logout_session_required'], + 'backchannel_logout_uri': value['backchannel_logout_uri'], + 'client_credentials_grant_access_token_lifespan': value['client_credentials_grant_access_token_lifespan'], + 'client_id': value['client_id'], + 'client_name': value['client_name'], + 'client_secret': value['client_secret'], + 'client_secret_expires_at': value['client_secret_expires_at'], + 'client_uri': value['client_uri'], + 'contacts': value['contacts'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'frontchannel_logout_session_required': value['frontchannel_logout_session_required'], + 'frontchannel_logout_uri': value['frontchannel_logout_uri'], + 'grant_types': value['grant_types'], + 'implicit_grant_access_token_lifespan': value['implicit_grant_access_token_lifespan'], + 'implicit_grant_id_token_lifespan': value['implicit_grant_id_token_lifespan'], + 'jwks': value['jwks'], + 'jwks_uri': value['jwks_uri'], + 'jwt_bearer_grant_access_token_lifespan': value['jwt_bearer_grant_access_token_lifespan'], + 'logo_uri': value['logo_uri'], + 'metadata': value['metadata'], + 'owner': value['owner'], + 'policy_uri': value['policy_uri'], + 'post_logout_redirect_uris': value['post_logout_redirect_uris'], + 'redirect_uris': value['redirect_uris'], + 'refresh_token_grant_access_token_lifespan': value['refresh_token_grant_access_token_lifespan'], + 'refresh_token_grant_id_token_lifespan': value['refresh_token_grant_id_token_lifespan'], + 'refresh_token_grant_refresh_token_lifespan': value['refresh_token_grant_refresh_token_lifespan'], + 'registration_access_token': value['registration_access_token'], + 'registration_client_uri': value['registration_client_uri'], + 'request_object_signing_alg': value['request_object_signing_alg'], + 'request_uris': value['request_uris'], + 'response_types': value['response_types'], + 'scope': value['scope'], + 'sector_identifier_uri': value['sector_identifier_uri'], + 'skip_consent': value['skip_consent'], + 'skip_logout_consent': value['skip_logout_consent'], + 'subject_type': value['subject_type'], + 'token_endpoint_auth_method': value['token_endpoint_auth_method'], + 'token_endpoint_auth_signing_alg': value['token_endpoint_auth_signing_alg'], + 'tos_uri': value['tos_uri'], + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'userinfo_signed_response_alg': value['userinfo_signed_response_alg'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2ClientTokenLifespans.ts b/clients/hydra/typescript-fetch/src/models/OAuth2ClientTokenLifespans.ts new file mode 100644 index 00000000000..7c3249761de --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2ClientTokenLifespans.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Lifespans of different token types issued for this OAuth 2.0 Client. + * @export + * @interface OAuth2ClientTokenLifespans + */ +export interface OAuth2ClientTokenLifespans { + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + authorization_code_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + authorization_code_grant_id_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + authorization_code_grant_refresh_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + client_credentials_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + implicit_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + implicit_grant_id_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + jwt_bearer_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + refresh_token_grant_access_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + refresh_token_grant_id_token_lifespan?: string; + /** + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans + */ + refresh_token_grant_refresh_token_lifespan?: string; +} + +/** + * Check if a given object implements the OAuth2ClientTokenLifespans interface. + */ +export function instanceOfOAuth2ClientTokenLifespans(value: object): value is OAuth2ClientTokenLifespans { + return true; +} + +export function OAuth2ClientTokenLifespansFromJSON(json: any): OAuth2ClientTokenLifespans { + return OAuth2ClientTokenLifespansFromJSONTyped(json, false); +} + +export function OAuth2ClientTokenLifespansFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ClientTokenLifespans { + if (json == null) { + return json; + } + return { + + 'authorization_code_grant_access_token_lifespan': json['authorization_code_grant_access_token_lifespan'] == null ? undefined : json['authorization_code_grant_access_token_lifespan'], + 'authorization_code_grant_id_token_lifespan': json['authorization_code_grant_id_token_lifespan'] == null ? undefined : json['authorization_code_grant_id_token_lifespan'], + 'authorization_code_grant_refresh_token_lifespan': json['authorization_code_grant_refresh_token_lifespan'] == null ? undefined : json['authorization_code_grant_refresh_token_lifespan'], + 'client_credentials_grant_access_token_lifespan': json['client_credentials_grant_access_token_lifespan'] == null ? undefined : json['client_credentials_grant_access_token_lifespan'], + 'implicit_grant_access_token_lifespan': json['implicit_grant_access_token_lifespan'] == null ? undefined : json['implicit_grant_access_token_lifespan'], + 'implicit_grant_id_token_lifespan': json['implicit_grant_id_token_lifespan'] == null ? undefined : json['implicit_grant_id_token_lifespan'], + 'jwt_bearer_grant_access_token_lifespan': json['jwt_bearer_grant_access_token_lifespan'] == null ? undefined : json['jwt_bearer_grant_access_token_lifespan'], + 'refresh_token_grant_access_token_lifespan': json['refresh_token_grant_access_token_lifespan'] == null ? undefined : json['refresh_token_grant_access_token_lifespan'], + 'refresh_token_grant_id_token_lifespan': json['refresh_token_grant_id_token_lifespan'] == null ? undefined : json['refresh_token_grant_id_token_lifespan'], + 'refresh_token_grant_refresh_token_lifespan': json['refresh_token_grant_refresh_token_lifespan'] == null ? undefined : json['refresh_token_grant_refresh_token_lifespan'], + }; +} + +export function OAuth2ClientTokenLifespansToJSON(value?: OAuth2ClientTokenLifespans | null): any { + if (value == null) { + return value; + } + return { + + 'authorization_code_grant_access_token_lifespan': value['authorization_code_grant_access_token_lifespan'], + 'authorization_code_grant_id_token_lifespan': value['authorization_code_grant_id_token_lifespan'], + 'authorization_code_grant_refresh_token_lifespan': value['authorization_code_grant_refresh_token_lifespan'], + 'client_credentials_grant_access_token_lifespan': value['client_credentials_grant_access_token_lifespan'], + 'implicit_grant_access_token_lifespan': value['implicit_grant_access_token_lifespan'], + 'implicit_grant_id_token_lifespan': value['implicit_grant_id_token_lifespan'], + 'jwt_bearer_grant_access_token_lifespan': value['jwt_bearer_grant_access_token_lifespan'], + 'refresh_token_grant_access_token_lifespan': value['refresh_token_grant_access_token_lifespan'], + 'refresh_token_grant_id_token_lifespan': value['refresh_token_grant_id_token_lifespan'], + 'refresh_token_grant_refresh_token_lifespan': value['refresh_token_grant_refresh_token_lifespan'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequest.ts b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequest.ts new file mode 100644 index 00000000000..632146f3589 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequest.ts @@ -0,0 +1,181 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OAuth2ConsentRequestOpenIDConnectContext } from './OAuth2ConsentRequestOpenIDConnectContext'; +import { + OAuth2ConsentRequestOpenIDConnectContextFromJSON, + OAuth2ConsentRequestOpenIDConnectContextFromJSONTyped, + OAuth2ConsentRequestOpenIDConnectContextToJSON, +} from './OAuth2ConsentRequestOpenIDConnectContext'; +import type { OAuth2Client } from './OAuth2Client'; +import { + OAuth2ClientFromJSON, + OAuth2ClientFromJSONTyped, + OAuth2ClientToJSON, +} from './OAuth2Client'; + +/** + * + * @export + * @interface OAuth2ConsentRequest + */ +export interface OAuth2ConsentRequest { + /** + * ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it + * to express that, for example, a user authenticated using two factor authentication. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + acr?: string; + /** + * + * @type {Array} + * @memberof OAuth2ConsentRequest + */ + amr?: Array; + /** + * ID is the identifier ("authorization challenge") of the consent authorization request. It is used to + * identify the session. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + challenge: string; + /** + * + * @type {OAuth2Client} + * @memberof OAuth2ConsentRequest + */ + client?: OAuth2Client; + /** + * + * @type {any} + * @memberof OAuth2ConsentRequest + */ + context?: any | null; + /** + * LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate + * a login and consent request in the login & consent app. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + login_challenge?: string; + /** + * LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) + * this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) + * this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC Front-/Back- + * channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + login_session_id?: string; + /** + * + * @type {OAuth2ConsentRequestOpenIDConnectContext} + * @memberof OAuth2ConsentRequest + */ + oidc_context?: OAuth2ConsentRequestOpenIDConnectContext; + /** + * RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which + * initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but + * might come in handy if you want to deal with additional request parameters. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + request_url?: string; + /** + * + * @type {Array} + * @memberof OAuth2ConsentRequest + */ + requested_access_token_audience?: Array; + /** + * + * @type {Array} + * @memberof OAuth2ConsentRequest + */ + requested_scope?: Array; + /** + * Skip, if true, implies that the client has requested the same scopes from the same user previously. + * If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the + * consent request using the usual API call. + * @type {boolean} + * @memberof OAuth2ConsentRequest + */ + skip?: boolean; + /** + * Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope + * requested by the OAuth 2.0 client. + * @type {string} + * @memberof OAuth2ConsentRequest + */ + subject?: string; +} + +/** + * Check if a given object implements the OAuth2ConsentRequest interface. + */ +export function instanceOfOAuth2ConsentRequest(value: object): value is OAuth2ConsentRequest { + if (!('challenge' in value) || value['challenge'] === undefined) return false; + return true; +} + +export function OAuth2ConsentRequestFromJSON(json: any): OAuth2ConsentRequest { + return OAuth2ConsentRequestFromJSONTyped(json, false); +} + +export function OAuth2ConsentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ConsentRequest { + if (json == null) { + return json; + } + return { + + 'acr': json['acr'] == null ? undefined : json['acr'], + 'amr': json['amr'] == null ? undefined : json['amr'], + 'challenge': json['challenge'], + 'client': json['client'] == null ? undefined : OAuth2ClientFromJSON(json['client']), + 'context': json['context'] == null ? undefined : json['context'], + 'login_challenge': json['login_challenge'] == null ? undefined : json['login_challenge'], + 'login_session_id': json['login_session_id'] == null ? undefined : json['login_session_id'], + 'oidc_context': json['oidc_context'] == null ? undefined : OAuth2ConsentRequestOpenIDConnectContextFromJSON(json['oidc_context']), + 'request_url': json['request_url'] == null ? undefined : json['request_url'], + 'requested_access_token_audience': json['requested_access_token_audience'] == null ? undefined : json['requested_access_token_audience'], + 'requested_scope': json['requested_scope'] == null ? undefined : json['requested_scope'], + 'skip': json['skip'] == null ? undefined : json['skip'], + 'subject': json['subject'] == null ? undefined : json['subject'], + }; +} + +export function OAuth2ConsentRequestToJSON(value?: OAuth2ConsentRequest | null): any { + if (value == null) { + return value; + } + return { + + 'acr': value['acr'], + 'amr': value['amr'], + 'challenge': value['challenge'], + 'client': OAuth2ClientToJSON(value['client']), + 'context': value['context'], + 'login_challenge': value['login_challenge'], + 'login_session_id': value['login_session_id'], + 'oidc_context': OAuth2ConsentRequestOpenIDConnectContextToJSON(value['oidc_context']), + 'request_url': value['request_url'], + 'requested_access_token_audience': value['requested_access_token_audience'], + 'requested_scope': value['requested_scope'], + 'skip': value['skip'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequestOpenIDConnectContext.ts b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequestOpenIDConnectContext.ts new file mode 100644 index 00000000000..30d9bed6c60 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentRequestOpenIDConnectContext.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface OAuth2ConsentRequestOpenIDConnectContext + */ +export interface OAuth2ConsentRequestOpenIDConnectContext { + /** + * ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. + * It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. + * + * OpenID Connect defines it as follows: + * > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values + * that the Authorization Server is being requested to use for processing this Authentication Request, with the + * values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication + * performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a + * Voluntary Claim by this parameter. + * @type {Array} + * @memberof OAuth2ConsentRequestOpenIDConnectContext + */ + acr_values?: Array; + /** + * Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. + * The defined values are: + * page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. + * popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. + * touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. + * wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a "feature phone" type display. + * + * The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. + * @type {string} + * @memberof OAuth2ConsentRequestOpenIDConnectContext + */ + display?: string; + /** + * IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the + * End-User's current or past authenticated session with the Client. + * @type {{ [key: string]: any; }} + * @memberof OAuth2ConsentRequestOpenIDConnectContext + */ + id_token_hint_claims?: { [key: string]: any; }; + /** + * LoginHint hints about the login identifier the End-User might use to log in (if necessary). + * This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) + * and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a + * phone number in the format specified for the phone_number Claim. The use of this parameter is optional. + * @type {string} + * @memberof OAuth2ConsentRequestOpenIDConnectContext + */ + login_hint?: string; + /** + * UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a + * space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value + * "fr-CA fr en" represents a preference for French as spoken in Canada, then French (without a region designation), + * followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested + * locales are not supported by the OpenID Provider. + * @type {Array} + * @memberof OAuth2ConsentRequestOpenIDConnectContext + */ + ui_locales?: Array; +} + +/** + * Check if a given object implements the OAuth2ConsentRequestOpenIDConnectContext interface. + */ +export function instanceOfOAuth2ConsentRequestOpenIDConnectContext(value: object): value is OAuth2ConsentRequestOpenIDConnectContext { + return true; +} + +export function OAuth2ConsentRequestOpenIDConnectContextFromJSON(json: any): OAuth2ConsentRequestOpenIDConnectContext { + return OAuth2ConsentRequestOpenIDConnectContextFromJSONTyped(json, false); +} + +export function OAuth2ConsentRequestOpenIDConnectContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ConsentRequestOpenIDConnectContext { + if (json == null) { + return json; + } + return { + + 'acr_values': json['acr_values'] == null ? undefined : json['acr_values'], + 'display': json['display'] == null ? undefined : json['display'], + 'id_token_hint_claims': json['id_token_hint_claims'] == null ? undefined : json['id_token_hint_claims'], + 'login_hint': json['login_hint'] == null ? undefined : json['login_hint'], + 'ui_locales': json['ui_locales'] == null ? undefined : json['ui_locales'], + }; +} + +export function OAuth2ConsentRequestOpenIDConnectContextToJSON(value?: OAuth2ConsentRequestOpenIDConnectContext | null): any { + if (value == null) { + return value; + } + return { + + 'acr_values': value['acr_values'], + 'display': value['display'], + 'id_token_hint_claims': value['id_token_hint_claims'], + 'login_hint': value['login_hint'], + 'ui_locales': value['ui_locales'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSession.ts b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSession.ts new file mode 100644 index 00000000000..24005361a8c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSession.ts @@ -0,0 +1,149 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OAuth2ConsentRequest } from './OAuth2ConsentRequest'; +import { + OAuth2ConsentRequestFromJSON, + OAuth2ConsentRequestFromJSONTyped, + OAuth2ConsentRequestToJSON, +} from './OAuth2ConsentRequest'; +import type { AcceptOAuth2ConsentRequestSession } from './AcceptOAuth2ConsentRequestSession'; +import { + AcceptOAuth2ConsentRequestSessionFromJSON, + AcceptOAuth2ConsentRequestSessionFromJSONTyped, + AcceptOAuth2ConsentRequestSessionToJSON, +} from './AcceptOAuth2ConsentRequestSession'; +import type { OAuth2ConsentSessionExpiresAt } from './OAuth2ConsentSessionExpiresAt'; +import { + OAuth2ConsentSessionExpiresAtFromJSON, + OAuth2ConsentSessionExpiresAtFromJSONTyped, + OAuth2ConsentSessionExpiresAtToJSON, +} from './OAuth2ConsentSessionExpiresAt'; + +/** + * A completed OAuth 2.0 Consent Session. + * @export + * @interface OAuth2ConsentSession + */ +export interface OAuth2ConsentSession { + /** + * + * @type {OAuth2ConsentRequest} + * @memberof OAuth2ConsentSession + */ + consent_request?: OAuth2ConsentRequest; + /** + * + * @type {any} + * @memberof OAuth2ConsentSession + */ + context?: any | null; + /** + * + * @type {OAuth2ConsentSessionExpiresAt} + * @memberof OAuth2ConsentSession + */ + expires_at?: OAuth2ConsentSessionExpiresAt; + /** + * + * @type {Array} + * @memberof OAuth2ConsentSession + */ + grant_access_token_audience?: Array; + /** + * + * @type {Array} + * @memberof OAuth2ConsentSession + */ + grant_scope?: Array; + /** + * + * @type {Date} + * @memberof OAuth2ConsentSession + */ + handled_at?: Date; + /** + * Remember Consent + * + * Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same + * client asks the same user for the same, or a subset of, scope. + * @type {boolean} + * @memberof OAuth2ConsentSession + */ + remember?: boolean; + /** + * Remember Consent For + * + * RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the + * authorization will be remembered indefinitely. + * @type {number} + * @memberof OAuth2ConsentSession + */ + remember_for?: number; + /** + * + * @type {AcceptOAuth2ConsentRequestSession} + * @memberof OAuth2ConsentSession + */ + session?: AcceptOAuth2ConsentRequestSession; +} + +/** + * Check if a given object implements the OAuth2ConsentSession interface. + */ +export function instanceOfOAuth2ConsentSession(value: object): value is OAuth2ConsentSession { + return true; +} + +export function OAuth2ConsentSessionFromJSON(json: any): OAuth2ConsentSession { + return OAuth2ConsentSessionFromJSONTyped(json, false); +} + +export function OAuth2ConsentSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ConsentSession { + if (json == null) { + return json; + } + return { + + 'consent_request': json['consent_request'] == null ? undefined : OAuth2ConsentRequestFromJSON(json['consent_request']), + 'context': json['context'] == null ? undefined : json['context'], + 'expires_at': json['expires_at'] == null ? undefined : OAuth2ConsentSessionExpiresAtFromJSON(json['expires_at']), + 'grant_access_token_audience': json['grant_access_token_audience'] == null ? undefined : json['grant_access_token_audience'], + 'grant_scope': json['grant_scope'] == null ? undefined : json['grant_scope'], + 'handled_at': json['handled_at'] == null ? undefined : (new Date(json['handled_at'])), + 'remember': json['remember'] == null ? undefined : json['remember'], + 'remember_for': json['remember_for'] == null ? undefined : json['remember_for'], + 'session': json['session'] == null ? undefined : AcceptOAuth2ConsentRequestSessionFromJSON(json['session']), + }; +} + +export function OAuth2ConsentSessionToJSON(value?: OAuth2ConsentSession | null): any { + if (value == null) { + return value; + } + return { + + 'consent_request': OAuth2ConsentRequestToJSON(value['consent_request']), + 'context': value['context'], + 'expires_at': OAuth2ConsentSessionExpiresAtToJSON(value['expires_at']), + 'grant_access_token_audience': value['grant_access_token_audience'], + 'grant_scope': value['grant_scope'], + 'handled_at': value['handled_at'] == null ? undefined : ((value['handled_at']).toISOString()), + 'remember': value['remember'], + 'remember_for': value['remember_for'], + 'session': AcceptOAuth2ConsentRequestSessionToJSON(value['session']), + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSessionExpiresAt.ts b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSessionExpiresAt.ts new file mode 100644 index 00000000000..84d3fa97813 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2ConsentSessionExpiresAt.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface OAuth2ConsentSessionExpiresAt + */ +export interface OAuth2ConsentSessionExpiresAt { + /** + * + * @type {Date} + * @memberof OAuth2ConsentSessionExpiresAt + */ + access_token?: Date; + /** + * + * @type {Date} + * @memberof OAuth2ConsentSessionExpiresAt + */ + authorize_code?: Date; + /** + * + * @type {Date} + * @memberof OAuth2ConsentSessionExpiresAt + */ + id_token?: Date; + /** + * + * @type {Date} + * @memberof OAuth2ConsentSessionExpiresAt + */ + par_context?: Date; + /** + * + * @type {Date} + * @memberof OAuth2ConsentSessionExpiresAt + */ + refresh_token?: Date; +} + +/** + * Check if a given object implements the OAuth2ConsentSessionExpiresAt interface. + */ +export function instanceOfOAuth2ConsentSessionExpiresAt(value: object): value is OAuth2ConsentSessionExpiresAt { + return true; +} + +export function OAuth2ConsentSessionExpiresAtFromJSON(json: any): OAuth2ConsentSessionExpiresAt { + return OAuth2ConsentSessionExpiresAtFromJSONTyped(json, false); +} + +export function OAuth2ConsentSessionExpiresAtFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ConsentSessionExpiresAt { + if (json == null) { + return json; + } + return { + + 'access_token': json['access_token'] == null ? undefined : (new Date(json['access_token'])), + 'authorize_code': json['authorize_code'] == null ? undefined : (new Date(json['authorize_code'])), + 'id_token': json['id_token'] == null ? undefined : (new Date(json['id_token'])), + 'par_context': json['par_context'] == null ? undefined : (new Date(json['par_context'])), + 'refresh_token': json['refresh_token'] == null ? undefined : (new Date(json['refresh_token'])), + }; +} + +export function OAuth2ConsentSessionExpiresAtToJSON(value?: OAuth2ConsentSessionExpiresAt | null): any { + if (value == null) { + return value; + } + return { + + 'access_token': value['access_token'] == null ? undefined : ((value['access_token']).toISOString()), + 'authorize_code': value['authorize_code'] == null ? undefined : ((value['authorize_code']).toISOString()), + 'id_token': value['id_token'] == null ? undefined : ((value['id_token']).toISOString()), + 'par_context': value['par_context'] == null ? undefined : ((value['par_context']).toISOString()), + 'refresh_token': value['refresh_token'] == null ? undefined : ((value['refresh_token']).toISOString()), + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2LoginRequest.ts b/clients/hydra/typescript-fetch/src/models/OAuth2LoginRequest.ts new file mode 100644 index 00000000000..eb2c5e9568c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2LoginRequest.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OAuth2ConsentRequestOpenIDConnectContext } from './OAuth2ConsentRequestOpenIDConnectContext'; +import { + OAuth2ConsentRequestOpenIDConnectContextFromJSON, + OAuth2ConsentRequestOpenIDConnectContextFromJSONTyped, + OAuth2ConsentRequestOpenIDConnectContextToJSON, +} from './OAuth2ConsentRequestOpenIDConnectContext'; +import type { OAuth2Client } from './OAuth2Client'; +import { + OAuth2ClientFromJSON, + OAuth2ClientFromJSONTyped, + OAuth2ClientToJSON, +} from './OAuth2Client'; + +/** + * + * @export + * @interface OAuth2LoginRequest + */ +export interface OAuth2LoginRequest { + /** + * ID is the identifier ("login challenge") of the login request. It is used to + * identify the session. + * @type {string} + * @memberof OAuth2LoginRequest + */ + challenge: string; + /** + * + * @type {OAuth2Client} + * @memberof OAuth2LoginRequest + */ + client: OAuth2Client; + /** + * + * @type {OAuth2ConsentRequestOpenIDConnectContext} + * @memberof OAuth2LoginRequest + */ + oidc_context?: OAuth2ConsentRequestOpenIDConnectContext; + /** + * RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which + * initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but + * might come in handy if you want to deal with additional request parameters. + * @type {string} + * @memberof OAuth2LoginRequest + */ + request_url: string; + /** + * + * @type {Array} + * @memberof OAuth2LoginRequest + */ + requested_access_token_audience?: Array; + /** + * + * @type {Array} + * @memberof OAuth2LoginRequest + */ + requested_scope?: Array; + /** + * SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) + * this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) + * this will be a new random value. This value is used as the "sid" parameter in the ID Token and in OIDC Front-/Back- + * channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + * @type {string} + * @memberof OAuth2LoginRequest + */ + session_id?: string; + /** + * Skip, if true, implies that the client has requested the same scopes from the same user previously. + * If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. + * + * This feature allows you to update / set session information. + * @type {boolean} + * @memberof OAuth2LoginRequest + */ + skip: boolean; + /** + * Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope + * requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type + * when accepting the login request, or the request will fail. + * @type {string} + * @memberof OAuth2LoginRequest + */ + subject: string; +} + +/** + * Check if a given object implements the OAuth2LoginRequest interface. + */ +export function instanceOfOAuth2LoginRequest(value: object): value is OAuth2LoginRequest { + if (!('challenge' in value) || value['challenge'] === undefined) return false; + if (!('client' in value) || value['client'] === undefined) return false; + if (!('request_url' in value) || value['request_url'] === undefined) return false; + if (!('skip' in value) || value['skip'] === undefined) return false; + if (!('subject' in value) || value['subject'] === undefined) return false; + return true; +} + +export function OAuth2LoginRequestFromJSON(json: any): OAuth2LoginRequest { + return OAuth2LoginRequestFromJSONTyped(json, false); +} + +export function OAuth2LoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2LoginRequest { + if (json == null) { + return json; + } + return { + + 'challenge': json['challenge'], + 'client': OAuth2ClientFromJSON(json['client']), + 'oidc_context': json['oidc_context'] == null ? undefined : OAuth2ConsentRequestOpenIDConnectContextFromJSON(json['oidc_context']), + 'request_url': json['request_url'], + 'requested_access_token_audience': json['requested_access_token_audience'] == null ? undefined : json['requested_access_token_audience'], + 'requested_scope': json['requested_scope'] == null ? undefined : json['requested_scope'], + 'session_id': json['session_id'] == null ? undefined : json['session_id'], + 'skip': json['skip'], + 'subject': json['subject'], + }; +} + +export function OAuth2LoginRequestToJSON(value?: OAuth2LoginRequest | null): any { + if (value == null) { + return value; + } + return { + + 'challenge': value['challenge'], + 'client': OAuth2ClientToJSON(value['client']), + 'oidc_context': OAuth2ConsentRequestOpenIDConnectContextToJSON(value['oidc_context']), + 'request_url': value['request_url'], + 'requested_access_token_audience': value['requested_access_token_audience'], + 'requested_scope': value['requested_scope'], + 'session_id': value['session_id'], + 'skip': value['skip'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2LogoutRequest.ts b/clients/hydra/typescript-fetch/src/models/OAuth2LogoutRequest.ts new file mode 100644 index 00000000000..1e53fa3393f --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2LogoutRequest.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OAuth2Client } from './OAuth2Client'; +import { + OAuth2ClientFromJSON, + OAuth2ClientFromJSONTyped, + OAuth2ClientToJSON, +} from './OAuth2Client'; + +/** + * + * @export + * @interface OAuth2LogoutRequest + */ +export interface OAuth2LogoutRequest { + /** + * Challenge is the identifier ("logout challenge") of the logout authentication request. It is used to + * identify the session. + * @type {string} + * @memberof OAuth2LogoutRequest + */ + challenge?: string; + /** + * + * @type {OAuth2Client} + * @memberof OAuth2LogoutRequest + */ + client?: OAuth2Client; + /** + * RequestURL is the original Logout URL requested. + * @type {string} + * @memberof OAuth2LogoutRequest + */ + request_url?: string; + /** + * RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. + * @type {boolean} + * @memberof OAuth2LogoutRequest + */ + rp_initiated?: boolean; + /** + * SessionID is the login session ID that was requested to log out. + * @type {string} + * @memberof OAuth2LogoutRequest + */ + sid?: string; + /** + * Subject is the user for whom the logout was request. + * @type {string} + * @memberof OAuth2LogoutRequest + */ + subject?: string; +} + +/** + * Check if a given object implements the OAuth2LogoutRequest interface. + */ +export function instanceOfOAuth2LogoutRequest(value: object): value is OAuth2LogoutRequest { + return true; +} + +export function OAuth2LogoutRequestFromJSON(json: any): OAuth2LogoutRequest { + return OAuth2LogoutRequestFromJSONTyped(json, false); +} + +export function OAuth2LogoutRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2LogoutRequest { + if (json == null) { + return json; + } + return { + + 'challenge': json['challenge'] == null ? undefined : json['challenge'], + 'client': json['client'] == null ? undefined : OAuth2ClientFromJSON(json['client']), + 'request_url': json['request_url'] == null ? undefined : json['request_url'], + 'rp_initiated': json['rp_initiated'] == null ? undefined : json['rp_initiated'], + 'sid': json['sid'] == null ? undefined : json['sid'], + 'subject': json['subject'] == null ? undefined : json['subject'], + }; +} + +export function OAuth2LogoutRequestToJSON(value?: OAuth2LogoutRequest | null): any { + if (value == null) { + return value; + } + return { + + 'challenge': value['challenge'], + 'client': OAuth2ClientToJSON(value['client']), + 'request_url': value['request_url'], + 'rp_initiated': value['rp_initiated'], + 'sid': value['sid'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2RedirectTo.ts b/clients/hydra/typescript-fetch/src/models/OAuth2RedirectTo.ts new file mode 100644 index 00000000000..9fc6dc10556 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2RedirectTo.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Contains a redirect URL used to complete a login, consent, or logout request. + * @export + * @interface OAuth2RedirectTo + */ +export interface OAuth2RedirectTo { + /** + * RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + * @type {string} + * @memberof OAuth2RedirectTo + */ + redirect_to: string; +} + +/** + * Check if a given object implements the OAuth2RedirectTo interface. + */ +export function instanceOfOAuth2RedirectTo(value: object): value is OAuth2RedirectTo { + if (!('redirect_to' in value) || value['redirect_to'] === undefined) return false; + return true; +} + +export function OAuth2RedirectToFromJSON(json: any): OAuth2RedirectTo { + return OAuth2RedirectToFromJSONTyped(json, false); +} + +export function OAuth2RedirectToFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2RedirectTo { + if (json == null) { + return json; + } + return { + + 'redirect_to': json['redirect_to'], + }; +} + +export function OAuth2RedirectToToJSON(value?: OAuth2RedirectTo | null): any { + if (value == null) { + return value; + } + return { + + 'redirect_to': value['redirect_to'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OAuth2TokenExchange.ts b/clients/hydra/typescript-fetch/src/models/OAuth2TokenExchange.ts new file mode 100644 index 00000000000..1937d6ab7f5 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OAuth2TokenExchange.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuth2 Token Exchange Result + * @export + * @interface OAuth2TokenExchange + */ +export interface OAuth2TokenExchange { + /** + * The access token issued by the authorization server. + * @type {string} + * @memberof OAuth2TokenExchange + */ + access_token?: string; + /** + * The lifetime in seconds of the access token. For + * example, the value "3600" denotes that the access token will + * expire in one hour from the time the response was generated. + * @type {number} + * @memberof OAuth2TokenExchange + */ + expires_in?: number; + /** + * To retrieve a refresh token request the id_token scope. + * @type {string} + * @memberof OAuth2TokenExchange + */ + id_token?: string; + /** + * The refresh token, which can be used to obtain new + * access tokens. To retrieve it add the scope "offline" to your access token request. + * @type {string} + * @memberof OAuth2TokenExchange + */ + refresh_token?: string; + /** + * The scope of the access token + * @type {string} + * @memberof OAuth2TokenExchange + */ + scope?: string; + /** + * The type of the token issued + * @type {string} + * @memberof OAuth2TokenExchange + */ + token_type?: string; +} + +/** + * Check if a given object implements the OAuth2TokenExchange interface. + */ +export function instanceOfOAuth2TokenExchange(value: object): value is OAuth2TokenExchange { + return true; +} + +export function OAuth2TokenExchangeFromJSON(json: any): OAuth2TokenExchange { + return OAuth2TokenExchangeFromJSONTyped(json, false); +} + +export function OAuth2TokenExchangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2TokenExchange { + if (json == null) { + return json; + } + return { + + 'access_token': json['access_token'] == null ? undefined : json['access_token'], + 'expires_in': json['expires_in'] == null ? undefined : json['expires_in'], + 'id_token': json['id_token'] == null ? undefined : json['id_token'], + 'refresh_token': json['refresh_token'] == null ? undefined : json['refresh_token'], + 'scope': json['scope'] == null ? undefined : json['scope'], + 'token_type': json['token_type'] == null ? undefined : json['token_type'], + }; +} + +export function OAuth2TokenExchangeToJSON(value?: OAuth2TokenExchange | null): any { + if (value == null) { + return value; + } + return { + + 'access_token': value['access_token'], + 'expires_in': value['expires_in'], + 'id_token': value['id_token'], + 'refresh_token': value['refresh_token'], + 'scope': value['scope'], + 'token_type': value['token_type'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OidcConfiguration.ts b/clients/hydra/typescript-fetch/src/models/OidcConfiguration.ts new file mode 100644 index 00000000000..5208e1f5aad --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OidcConfiguration.ts @@ -0,0 +1,395 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CredentialSupportedDraft00 } from './CredentialSupportedDraft00'; +import { + CredentialSupportedDraft00FromJSON, + CredentialSupportedDraft00FromJSONTyped, + CredentialSupportedDraft00ToJSON, +} from './CredentialSupportedDraft00'; + +/** + * Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms + * among others. + * @export + * @interface OidcConfiguration + */ +export interface OidcConfiguration { + /** + * OAuth 2.0 Authorization Endpoint URL + * @type {string} + * @memberof OidcConfiguration + */ + authorization_endpoint: string; + /** + * OpenID Connect Back-Channel Logout Session Required + * + * Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP + * session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP + * @type {boolean} + * @memberof OidcConfiguration + */ + backchannel_logout_session_supported?: boolean; + /** + * OpenID Connect Back-Channel Logout Supported + * + * Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration + */ + backchannel_logout_supported?: boolean; + /** + * OpenID Connect Claims Parameter Parameter Supported + * + * Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration + */ + claims_parameter_supported?: boolean; + /** + * OpenID Connect Supported Claims + * + * JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply + * values for. Note that for privacy or other reasons, this might not be an exhaustive list. + * @type {Array} + * @memberof OidcConfiguration + */ + claims_supported?: Array; + /** + * OAuth 2.0 PKCE Supported Code Challenge Methods + * + * JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported + * by this authorization server. + * @type {Array} + * @memberof OidcConfiguration + */ + code_challenge_methods_supported?: Array; + /** + * OpenID Connect Verifiable Credentials Endpoint + * + * Contains the URL of the Verifiable Credentials Endpoint. + * @type {string} + * @memberof OidcConfiguration + */ + credentials_endpoint_draft_00?: string; + /** + * OpenID Connect Verifiable Credentials Supported + * + * JSON array containing a list of the Verifiable Credentials supported by this authorization server. + * @type {Array} + * @memberof OidcConfiguration + */ + credentials_supported_draft_00?: Array; + /** + * OpenID Connect End-Session Endpoint + * + * URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + * @type {string} + * @memberof OidcConfiguration + */ + end_session_endpoint?: string; + /** + * OpenID Connect Front-Channel Logout Session Required + * + * Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify + * the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also + * included in ID Tokens issued by the OP. + * @type {boolean} + * @memberof OidcConfiguration + */ + frontchannel_logout_session_supported?: boolean; + /** + * OpenID Connect Front-Channel Logout Supported + * + * Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration + */ + frontchannel_logout_supported?: boolean; + /** + * OAuth 2.0 Supported Grant Types + * + * JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + * @type {Array} + * @memberof OidcConfiguration + */ + grant_types_supported?: Array; + /** + * OpenID Connect Default ID Token Signing Algorithms + * + * Algorithm used to sign OpenID Connect ID Tokens. + * @type {Array} + * @memberof OidcConfiguration + */ + id_token_signed_response_alg: Array; + /** + * OpenID Connect Supported ID Token Signing Algorithms + * + * JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token + * to encode the Claims in a JWT. + * @type {Array} + * @memberof OidcConfiguration + */ + id_token_signing_alg_values_supported: Array; + /** + * OpenID Connect Issuer URL + * + * An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. + * If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned + * by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. + * @type {string} + * @memberof OidcConfiguration + */ + issuer: string; + /** + * OpenID Connect Well-Known JSON Web Keys URL + * + * URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate + * signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs + * to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) + * parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. + * Although some algorithms allow the same key to be used for both signatures and encryption, doing so is + * NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of + * keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + * @type {string} + * @memberof OidcConfiguration + */ + jwks_uri: string; + /** + * OpenID Connect Dynamic Client Registration Endpoint URL + * @type {string} + * @memberof OidcConfiguration + */ + registration_endpoint?: string; + /** + * OpenID Connect Supported Request Object Signing Algorithms + * + * JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, + * which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when + * the Request Object is passed by value (using the request parameter) and when it is passed by reference + * (using the request_uri parameter). + * @type {Array} + * @memberof OidcConfiguration + */ + request_object_signing_alg_values_supported?: Array; + /** + * OpenID Connect Request Parameter Supported + * + * Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration + */ + request_parameter_supported?: boolean; + /** + * OpenID Connect Request URI Parameter Supported + * + * Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration + */ + request_uri_parameter_supported?: boolean; + /** + * OpenID Connect Requires Request URI Registration + * + * Boolean value specifying whether the OP requires any request_uri values used to be pre-registered + * using the request_uris registration parameter. + * @type {boolean} + * @memberof OidcConfiguration + */ + require_request_uri_registration?: boolean; + /** + * OAuth 2.0 Supported Response Modes + * + * JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + * @type {Array} + * @memberof OidcConfiguration + */ + response_modes_supported?: Array; + /** + * OAuth 2.0 Supported Response Types + * + * JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID + * Providers MUST support the code, id_token, and the token id_token Response Type values. + * @type {Array} + * @memberof OidcConfiguration + */ + response_types_supported: Array; + /** + * OAuth 2.0 Token Revocation URL + * + * URL of the authorization server's OAuth 2.0 revocation endpoint. + * @type {string} + * @memberof OidcConfiguration + */ + revocation_endpoint?: string; + /** + * OAuth 2.0 Supported Scope Values + * + * JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST + * support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used + * @type {Array} + * @memberof OidcConfiguration + */ + scopes_supported?: Array; + /** + * OpenID Connect Supported Subject Types + * + * JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include + * pairwise and public. + * @type {Array} + * @memberof OidcConfiguration + */ + subject_types_supported: Array; + /** + * OAuth 2.0 Token Endpoint URL + * @type {string} + * @memberof OidcConfiguration + */ + token_endpoint: string; + /** + * OAuth 2.0 Supported Client Authentication Methods + * + * JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are + * client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 + * @type {Array} + * @memberof OidcConfiguration + */ + token_endpoint_auth_methods_supported?: Array; + /** + * OpenID Connect Userinfo URL + * + * URL of the OP's UserInfo Endpoint. + * @type {string} + * @memberof OidcConfiguration + */ + userinfo_endpoint?: string; + /** + * OpenID Connect User Userinfo Signing Algorithm + * + * Algorithm used to sign OpenID Connect Userinfo Responses. + * @type {Array} + * @memberof OidcConfiguration + */ + userinfo_signed_response_alg: Array; + /** + * OpenID Connect Supported Userinfo Signing Algorithm + * + * JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + * @type {Array} + * @memberof OidcConfiguration + */ + userinfo_signing_alg_values_supported?: Array; +} + +/** + * Check if a given object implements the OidcConfiguration interface. + */ +export function instanceOfOidcConfiguration(value: object): value is OidcConfiguration { + if (!('authorization_endpoint' in value) || value['authorization_endpoint'] === undefined) return false; + if (!('id_token_signed_response_alg' in value) || value['id_token_signed_response_alg'] === undefined) return false; + if (!('id_token_signing_alg_values_supported' in value) || value['id_token_signing_alg_values_supported'] === undefined) return false; + if (!('issuer' in value) || value['issuer'] === undefined) return false; + if (!('jwks_uri' in value) || value['jwks_uri'] === undefined) return false; + if (!('response_types_supported' in value) || value['response_types_supported'] === undefined) return false; + if (!('subject_types_supported' in value) || value['subject_types_supported'] === undefined) return false; + if (!('token_endpoint' in value) || value['token_endpoint'] === undefined) return false; + if (!('userinfo_signed_response_alg' in value) || value['userinfo_signed_response_alg'] === undefined) return false; + return true; +} + +export function OidcConfigurationFromJSON(json: any): OidcConfiguration { + return OidcConfigurationFromJSONTyped(json, false); +} + +export function OidcConfigurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): OidcConfiguration { + if (json == null) { + return json; + } + return { + + 'authorization_endpoint': json['authorization_endpoint'], + 'backchannel_logout_session_supported': json['backchannel_logout_session_supported'] == null ? undefined : json['backchannel_logout_session_supported'], + 'backchannel_logout_supported': json['backchannel_logout_supported'] == null ? undefined : json['backchannel_logout_supported'], + 'claims_parameter_supported': json['claims_parameter_supported'] == null ? undefined : json['claims_parameter_supported'], + 'claims_supported': json['claims_supported'] == null ? undefined : json['claims_supported'], + 'code_challenge_methods_supported': json['code_challenge_methods_supported'] == null ? undefined : json['code_challenge_methods_supported'], + 'credentials_endpoint_draft_00': json['credentials_endpoint_draft_00'] == null ? undefined : json['credentials_endpoint_draft_00'], + 'credentials_supported_draft_00': json['credentials_supported_draft_00'] == null ? undefined : ((json['credentials_supported_draft_00'] as Array).map(CredentialSupportedDraft00FromJSON)), + 'end_session_endpoint': json['end_session_endpoint'] == null ? undefined : json['end_session_endpoint'], + 'frontchannel_logout_session_supported': json['frontchannel_logout_session_supported'] == null ? undefined : json['frontchannel_logout_session_supported'], + 'frontchannel_logout_supported': json['frontchannel_logout_supported'] == null ? undefined : json['frontchannel_logout_supported'], + 'grant_types_supported': json['grant_types_supported'] == null ? undefined : json['grant_types_supported'], + 'id_token_signed_response_alg': json['id_token_signed_response_alg'], + 'id_token_signing_alg_values_supported': json['id_token_signing_alg_values_supported'], + 'issuer': json['issuer'], + 'jwks_uri': json['jwks_uri'], + 'registration_endpoint': json['registration_endpoint'] == null ? undefined : json['registration_endpoint'], + 'request_object_signing_alg_values_supported': json['request_object_signing_alg_values_supported'] == null ? undefined : json['request_object_signing_alg_values_supported'], + 'request_parameter_supported': json['request_parameter_supported'] == null ? undefined : json['request_parameter_supported'], + 'request_uri_parameter_supported': json['request_uri_parameter_supported'] == null ? undefined : json['request_uri_parameter_supported'], + 'require_request_uri_registration': json['require_request_uri_registration'] == null ? undefined : json['require_request_uri_registration'], + 'response_modes_supported': json['response_modes_supported'] == null ? undefined : json['response_modes_supported'], + 'response_types_supported': json['response_types_supported'], + 'revocation_endpoint': json['revocation_endpoint'] == null ? undefined : json['revocation_endpoint'], + 'scopes_supported': json['scopes_supported'] == null ? undefined : json['scopes_supported'], + 'subject_types_supported': json['subject_types_supported'], + 'token_endpoint': json['token_endpoint'], + 'token_endpoint_auth_methods_supported': json['token_endpoint_auth_methods_supported'] == null ? undefined : json['token_endpoint_auth_methods_supported'], + 'userinfo_endpoint': json['userinfo_endpoint'] == null ? undefined : json['userinfo_endpoint'], + 'userinfo_signed_response_alg': json['userinfo_signed_response_alg'], + 'userinfo_signing_alg_values_supported': json['userinfo_signing_alg_values_supported'] == null ? undefined : json['userinfo_signing_alg_values_supported'], + }; +} + +export function OidcConfigurationToJSON(value?: OidcConfiguration | null): any { + if (value == null) { + return value; + } + return { + + 'authorization_endpoint': value['authorization_endpoint'], + 'backchannel_logout_session_supported': value['backchannel_logout_session_supported'], + 'backchannel_logout_supported': value['backchannel_logout_supported'], + 'claims_parameter_supported': value['claims_parameter_supported'], + 'claims_supported': value['claims_supported'], + 'code_challenge_methods_supported': value['code_challenge_methods_supported'], + 'credentials_endpoint_draft_00': value['credentials_endpoint_draft_00'], + 'credentials_supported_draft_00': value['credentials_supported_draft_00'] == null ? undefined : ((value['credentials_supported_draft_00'] as Array).map(CredentialSupportedDraft00ToJSON)), + 'end_session_endpoint': value['end_session_endpoint'], + 'frontchannel_logout_session_supported': value['frontchannel_logout_session_supported'], + 'frontchannel_logout_supported': value['frontchannel_logout_supported'], + 'grant_types_supported': value['grant_types_supported'], + 'id_token_signed_response_alg': value['id_token_signed_response_alg'], + 'id_token_signing_alg_values_supported': value['id_token_signing_alg_values_supported'], + 'issuer': value['issuer'], + 'jwks_uri': value['jwks_uri'], + 'registration_endpoint': value['registration_endpoint'], + 'request_object_signing_alg_values_supported': value['request_object_signing_alg_values_supported'], + 'request_parameter_supported': value['request_parameter_supported'], + 'request_uri_parameter_supported': value['request_uri_parameter_supported'], + 'require_request_uri_registration': value['require_request_uri_registration'], + 'response_modes_supported': value['response_modes_supported'], + 'response_types_supported': value['response_types_supported'], + 'revocation_endpoint': value['revocation_endpoint'], + 'scopes_supported': value['scopes_supported'], + 'subject_types_supported': value['subject_types_supported'], + 'token_endpoint': value['token_endpoint'], + 'token_endpoint_auth_methods_supported': value['token_endpoint_auth_methods_supported'], + 'userinfo_endpoint': value['userinfo_endpoint'], + 'userinfo_signed_response_alg': value['userinfo_signed_response_alg'], + 'userinfo_signing_alg_values_supported': value['userinfo_signing_alg_values_supported'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/OidcUserInfo.ts b/clients/hydra/typescript-fetch/src/models/OidcUserInfo.ts new file mode 100644 index 00000000000..1f0673519cb --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/OidcUserInfo.ts @@ -0,0 +1,204 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OpenID Connect Userinfo + * @export + * @interface OidcUserInfo + */ +export interface OidcUserInfo { + /** + * End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. + * @type {string} + * @memberof OidcUserInfo + */ + birthdate?: string; + /** + * End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. + * @type {string} + * @memberof OidcUserInfo + */ + email?: string; + /** + * True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. + * @type {boolean} + * @memberof OidcUserInfo + */ + email_verified?: boolean; + /** + * Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. + * @type {string} + * @memberof OidcUserInfo + */ + family_name?: string; + /** + * End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. + * @type {string} + * @memberof OidcUserInfo + */ + gender?: string; + /** + * Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. + * @type {string} + * @memberof OidcUserInfo + */ + given_name?: string; + /** + * End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. + * @type {string} + * @memberof OidcUserInfo + */ + locale?: string; + /** + * Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. + * @type {string} + * @memberof OidcUserInfo + */ + middle_name?: string; + /** + * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. + * @type {string} + * @memberof OidcUserInfo + */ + name?: string; + /** + * Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. + * @type {string} + * @memberof OidcUserInfo + */ + nickname?: string; + /** + * End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. + * @type {string} + * @memberof OidcUserInfo + */ + phone_number?: string; + /** + * True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. + * @type {boolean} + * @memberof OidcUserInfo + */ + phone_number_verified?: boolean; + /** + * URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. + * @type {string} + * @memberof OidcUserInfo + */ + picture?: string; + /** + * Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. + * @type {string} + * @memberof OidcUserInfo + */ + preferred_username?: string; + /** + * URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. + * @type {string} + * @memberof OidcUserInfo + */ + profile?: string; + /** + * Subject - Identifier for the End-User at the IssuerURL. + * @type {string} + * @memberof OidcUserInfo + */ + sub?: string; + /** + * Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. + * @type {number} + * @memberof OidcUserInfo + */ + updated_at?: number; + /** + * URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. + * @type {string} + * @memberof OidcUserInfo + */ + website?: string; + /** + * String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. + * @type {string} + * @memberof OidcUserInfo + */ + zoneinfo?: string; +} + +/** + * Check if a given object implements the OidcUserInfo interface. + */ +export function instanceOfOidcUserInfo(value: object): value is OidcUserInfo { + return true; +} + +export function OidcUserInfoFromJSON(json: any): OidcUserInfo { + return OidcUserInfoFromJSONTyped(json, false); +} + +export function OidcUserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OidcUserInfo { + if (json == null) { + return json; + } + return { + + 'birthdate': json['birthdate'] == null ? undefined : json['birthdate'], + 'email': json['email'] == null ? undefined : json['email'], + 'email_verified': json['email_verified'] == null ? undefined : json['email_verified'], + 'family_name': json['family_name'] == null ? undefined : json['family_name'], + 'gender': json['gender'] == null ? undefined : json['gender'], + 'given_name': json['given_name'] == null ? undefined : json['given_name'], + 'locale': json['locale'] == null ? undefined : json['locale'], + 'middle_name': json['middle_name'] == null ? undefined : json['middle_name'], + 'name': json['name'] == null ? undefined : json['name'], + 'nickname': json['nickname'] == null ? undefined : json['nickname'], + 'phone_number': json['phone_number'] == null ? undefined : json['phone_number'], + 'phone_number_verified': json['phone_number_verified'] == null ? undefined : json['phone_number_verified'], + 'picture': json['picture'] == null ? undefined : json['picture'], + 'preferred_username': json['preferred_username'] == null ? undefined : json['preferred_username'], + 'profile': json['profile'] == null ? undefined : json['profile'], + 'sub': json['sub'] == null ? undefined : json['sub'], + 'updated_at': json['updated_at'] == null ? undefined : json['updated_at'], + 'website': json['website'] == null ? undefined : json['website'], + 'zoneinfo': json['zoneinfo'] == null ? undefined : json['zoneinfo'], + }; +} + +export function OidcUserInfoToJSON(value?: OidcUserInfo | null): any { + if (value == null) { + return value; + } + return { + + 'birthdate': value['birthdate'], + 'email': value['email'], + 'email_verified': value['email_verified'], + 'family_name': value['family_name'], + 'gender': value['gender'], + 'given_name': value['given_name'], + 'locale': value['locale'], + 'middle_name': value['middle_name'], + 'name': value['name'], + 'nickname': value['nickname'], + 'phone_number': value['phone_number'], + 'phone_number_verified': value['phone_number_verified'], + 'picture': value['picture'], + 'preferred_username': value['preferred_username'], + 'profile': value['profile'], + 'sub': value['sub'], + 'updated_at': value['updated_at'], + 'website': value['website'], + 'zoneinfo': value['zoneinfo'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/Pagination.ts b/clients/hydra/typescript-fetch/src/models/Pagination.ts new file mode 100644 index 00000000000..d767ba3133c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/Pagination.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Pagination + */ +export interface Pagination { + /** + * Items per page + * + * This is the number of items per page to return. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {number} + * @memberof Pagination + */ + page_size?: number; + /** + * Next Page Token + * + * The next page token. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {string} + * @memberof Pagination + */ + page_token?: string; +} + +/** + * Check if a given object implements the Pagination interface. + */ +export function instanceOfPagination(value: object): value is Pagination { + return true; +} + +export function PaginationFromJSON(json: any): Pagination { + return PaginationFromJSONTyped(json, false); +} + +export function PaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pagination { + if (json == null) { + return json; + } + return { + + 'page_size': json['page_size'] == null ? undefined : json['page_size'], + 'page_token': json['page_token'] == null ? undefined : json['page_token'], + }; +} + +export function PaginationToJSON(value?: Pagination | null): any { + if (value == null) { + return value; + } + return { + + 'page_size': value['page_size'], + 'page_token': value['page_token'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/PaginationHeaders.ts b/clients/hydra/typescript-fetch/src/models/PaginationHeaders.ts new file mode 100644 index 00000000000..2d1acedbf4c --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/PaginationHeaders.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PaginationHeaders + */ +export interface PaginationHeaders { + /** + * The link header contains pagination links. + * + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * + * in: header + * @type {string} + * @memberof PaginationHeaders + */ + link?: string; + /** + * The total number of clients. + * + * in: header + * @type {string} + * @memberof PaginationHeaders + */ + x_total_count?: string; +} + +/** + * Check if a given object implements the PaginationHeaders interface. + */ +export function instanceOfPaginationHeaders(value: object): value is PaginationHeaders { + return true; +} + +export function PaginationHeadersFromJSON(json: any): PaginationHeaders { + return PaginationHeadersFromJSONTyped(json, false); +} + +export function PaginationHeadersFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginationHeaders { + if (json == null) { + return json; + } + return { + + 'link': json['link'] == null ? undefined : json['link'], + 'x_total_count': json['x-total-count'] == null ? undefined : json['x-total-count'], + }; +} + +export function PaginationHeadersToJSON(value?: PaginationHeaders | null): any { + if (value == null) { + return value; + } + return { + + 'link': value['link'], + 'x-total-count': value['x_total_count'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/RFC6749ErrorJson.ts b/clients/hydra/typescript-fetch/src/models/RFC6749ErrorJson.ts new file mode 100644 index 00000000000..6a0137050af --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/RFC6749ErrorJson.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RFC6749ErrorJson + */ +export interface RFC6749ErrorJson { + /** + * + * @type {string} + * @memberof RFC6749ErrorJson + */ + error?: string; + /** + * + * @type {string} + * @memberof RFC6749ErrorJson + */ + error_debug?: string; + /** + * + * @type {string} + * @memberof RFC6749ErrorJson + */ + error_description?: string; + /** + * + * @type {string} + * @memberof RFC6749ErrorJson + */ + error_hint?: string; + /** + * + * @type {number} + * @memberof RFC6749ErrorJson + */ + status_code?: number; +} + +/** + * Check if a given object implements the RFC6749ErrorJson interface. + */ +export function instanceOfRFC6749ErrorJson(value: object): value is RFC6749ErrorJson { + return true; +} + +export function RFC6749ErrorJsonFromJSON(json: any): RFC6749ErrorJson { + return RFC6749ErrorJsonFromJSONTyped(json, false); +} + +export function RFC6749ErrorJsonFromJSONTyped(json: any, ignoreDiscriminator: boolean): RFC6749ErrorJson { + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + 'error_debug': json['error_debug'] == null ? undefined : json['error_debug'], + 'error_description': json['error_description'] == null ? undefined : json['error_description'], + 'error_hint': json['error_hint'] == null ? undefined : json['error_hint'], + 'status_code': json['status_code'] == null ? undefined : json['status_code'], + }; +} + +export function RFC6749ErrorJsonToJSON(value?: RFC6749ErrorJson | null): any { + if (value == null) { + return value; + } + return { + + 'error': value['error'], + 'error_debug': value['error_debug'], + 'error_description': value['error_description'], + 'error_hint': value['error_hint'], + 'status_code': value['status_code'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/RejectOAuth2Request.ts b/clients/hydra/typescript-fetch/src/models/RejectOAuth2Request.ts new file mode 100644 index 00000000000..8dd75b86e82 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/RejectOAuth2Request.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RejectOAuth2Request + */ +export interface RejectOAuth2Request { + /** + * The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). + * + * Defaults to `request_denied`. + * @type {string} + * @memberof RejectOAuth2Request + */ + error?: string; + /** + * Debug contains information to help resolve the problem as a developer. Usually not exposed + * to the public but only in the server logs. + * @type {string} + * @memberof RejectOAuth2Request + */ + error_debug?: string; + /** + * Description of the error in a human readable format. + * @type {string} + * @memberof RejectOAuth2Request + */ + error_description?: string; + /** + * Hint to help resolve the error. + * @type {string} + * @memberof RejectOAuth2Request + */ + error_hint?: string; + /** + * Represents the HTTP status code of the error (e.g. 401 or 403) + * + * Defaults to 400 + * @type {number} + * @memberof RejectOAuth2Request + */ + status_code?: number; +} + +/** + * Check if a given object implements the RejectOAuth2Request interface. + */ +export function instanceOfRejectOAuth2Request(value: object): value is RejectOAuth2Request { + return true; +} + +export function RejectOAuth2RequestFromJSON(json: any): RejectOAuth2Request { + return RejectOAuth2RequestFromJSONTyped(json, false); +} + +export function RejectOAuth2RequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RejectOAuth2Request { + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + 'error_debug': json['error_debug'] == null ? undefined : json['error_debug'], + 'error_description': json['error_description'] == null ? undefined : json['error_description'], + 'error_hint': json['error_hint'] == null ? undefined : json['error_hint'], + 'status_code': json['status_code'] == null ? undefined : json['status_code'], + }; +} + +export function RejectOAuth2RequestToJSON(value?: RejectOAuth2Request | null): any { + if (value == null) { + return value; + } + return { + + 'error': value['error'], + 'error_debug': value['error_debug'], + 'error_description': value['error_description'], + 'error_hint': value['error_hint'], + 'status_code': value['status_code'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TokenPagination.ts b/clients/hydra/typescript-fetch/src/models/TokenPagination.ts new file mode 100644 index 00000000000..de05b177db4 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TokenPagination.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenPagination + */ +export interface TokenPagination { + /** + * Items per page + * + * This is the number of items per page to return. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {number} + * @memberof TokenPagination + */ + page_size?: number; + /** + * Next Page Token + * + * The next page token. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {string} + * @memberof TokenPagination + */ + page_token?: string; +} + +/** + * Check if a given object implements the TokenPagination interface. + */ +export function instanceOfTokenPagination(value: object): value is TokenPagination { + return true; +} + +export function TokenPaginationFromJSON(json: any): TokenPagination { + return TokenPaginationFromJSONTyped(json, false); +} + +export function TokenPaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPagination { + if (json == null) { + return json; + } + return { + + 'page_size': json['page_size'] == null ? undefined : json['page_size'], + 'page_token': json['page_token'] == null ? undefined : json['page_token'], + }; +} + +export function TokenPaginationToJSON(value?: TokenPagination | null): any { + if (value == null) { + return value; + } + return { + + 'page_size': value['page_size'], + 'page_token': value['page_token'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TokenPaginationHeaders.ts b/clients/hydra/typescript-fetch/src/models/TokenPaginationHeaders.ts new file mode 100644 index 00000000000..ffff6ac3753 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TokenPaginationHeaders.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenPaginationHeaders + */ +export interface TokenPaginationHeaders { + /** + * The link header contains pagination links. + * + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * + * in: header + * @type {string} + * @memberof TokenPaginationHeaders + */ + link?: string; + /** + * The total number of clients. + * + * in: header + * @type {string} + * @memberof TokenPaginationHeaders + */ + x_total_count?: string; +} + +/** + * Check if a given object implements the TokenPaginationHeaders interface. + */ +export function instanceOfTokenPaginationHeaders(value: object): value is TokenPaginationHeaders { + return true; +} + +export function TokenPaginationHeadersFromJSON(json: any): TokenPaginationHeaders { + return TokenPaginationHeadersFromJSONTyped(json, false); +} + +export function TokenPaginationHeadersFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPaginationHeaders { + if (json == null) { + return json; + } + return { + + 'link': json['link'] == null ? undefined : json['link'], + 'x_total_count': json['x-total-count'] == null ? undefined : json['x-total-count'], + }; +} + +export function TokenPaginationHeadersToJSON(value?: TokenPaginationHeaders | null): any { + if (value == null) { + return value; + } + return { + + 'link': value['link'], + 'x-total-count': value['x_total_count'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TokenPaginationRequestParameters.ts b/clients/hydra/typescript-fetch/src/models/TokenPaginationRequestParameters.ts new file mode 100644 index 00000000000..39f8b3cbb61 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TokenPaginationRequestParameters.ts @@ -0,0 +1,77 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: + * `; rel="{page}"` + * + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @export + * @interface TokenPaginationRequestParameters + */ +export interface TokenPaginationRequestParameters { + /** + * Items per Page + * + * This is the number of items per page to return. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {number} + * @memberof TokenPaginationRequestParameters + */ + page_size?: number; + /** + * Next Page Token + * + * The next page token. + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @type {string} + * @memberof TokenPaginationRequestParameters + */ + page_token?: string; +} + +/** + * Check if a given object implements the TokenPaginationRequestParameters interface. + */ +export function instanceOfTokenPaginationRequestParameters(value: object): value is TokenPaginationRequestParameters { + return true; +} + +export function TokenPaginationRequestParametersFromJSON(json: any): TokenPaginationRequestParameters { + return TokenPaginationRequestParametersFromJSONTyped(json, false); +} + +export function TokenPaginationRequestParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPaginationRequestParameters { + if (json == null) { + return json; + } + return { + + 'page_size': json['page_size'] == null ? undefined : json['page_size'], + 'page_token': json['page_token'] == null ? undefined : json['page_token'], + }; +} + +export function TokenPaginationRequestParametersToJSON(value?: TokenPaginationRequestParameters | null): any { + if (value == null) { + return value; + } + return { + + 'page_size': value['page_size'], + 'page_token': value['page_token'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TokenPaginationResponseHeaders.ts b/clients/hydra/typescript-fetch/src/models/TokenPaginationResponseHeaders.ts new file mode 100644 index 00000000000..42eda889161 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TokenPaginationResponseHeaders.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: + * `; rel="{page}"` + * + * For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + * @export + * @interface TokenPaginationResponseHeaders + */ +export interface TokenPaginationResponseHeaders { + /** + * The Link HTTP Header + * + * The `Link` header contains a comma-delimited list of links to the following pages: + * + * first: The first page of results. + * next: The next page of results. + * prev: The previous page of results. + * last: The last page of results. + * + * Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: + * + * ; rel="first",; rel="next",; rel="prev",; rel="last" + * @type {string} + * @memberof TokenPaginationResponseHeaders + */ + link?: string; + /** + * The X-Total-Count HTTP Header + * + * The `X-Total-Count` header contains the total number of items in the collection. + * @type {number} + * @memberof TokenPaginationResponseHeaders + */ + x_total_count?: number; +} + +/** + * Check if a given object implements the TokenPaginationResponseHeaders interface. + */ +export function instanceOfTokenPaginationResponseHeaders(value: object): value is TokenPaginationResponseHeaders { + return true; +} + +export function TokenPaginationResponseHeadersFromJSON(json: any): TokenPaginationResponseHeaders { + return TokenPaginationResponseHeadersFromJSONTyped(json, false); +} + +export function TokenPaginationResponseHeadersFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPaginationResponseHeaders { + if (json == null) { + return json; + } + return { + + 'link': json['link'] == null ? undefined : json['link'], + 'x_total_count': json['x-total-count'] == null ? undefined : json['x-total-count'], + }; +} + +export function TokenPaginationResponseHeadersToJSON(value?: TokenPaginationResponseHeaders | null): any { + if (value == null) { + return value; + } + return { + + 'link': value['link'], + 'x-total-count': value['x_total_count'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TrustOAuth2JwtGrantIssuer.ts b/clients/hydra/typescript-fetch/src/models/TrustOAuth2JwtGrantIssuer.ts new file mode 100644 index 00000000000..44df88c2e20 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TrustOAuth2JwtGrantIssuer.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { JsonWebKey } from './JsonWebKey'; +import { + JsonWebKeyFromJSON, + JsonWebKeyFromJSONTyped, + JsonWebKeyToJSON, +} from './JsonWebKey'; + +/** + * Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + * @export + * @interface TrustOAuth2JwtGrantIssuer + */ +export interface TrustOAuth2JwtGrantIssuer { + /** + * The "allow_any_subject" indicates that the issuer is allowed to have any principal as the subject of the JWT. + * @type {boolean} + * @memberof TrustOAuth2JwtGrantIssuer + */ + allow_any_subject?: boolean; + /** + * The "expires_at" indicates, when grant will expire, so we will reject assertion from "issuer" targeting "subject". + * @type {Date} + * @memberof TrustOAuth2JwtGrantIssuer + */ + expires_at: Date; + /** + * The "issuer" identifies the principal that issued the JWT assertion (same as "iss" claim in JWT). + * @type {string} + * @memberof TrustOAuth2JwtGrantIssuer + */ + issuer: string; + /** + * + * @type {JsonWebKey} + * @memberof TrustOAuth2JwtGrantIssuer + */ + jwk: JsonWebKey; + /** + * The "scope" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + * @type {Array} + * @memberof TrustOAuth2JwtGrantIssuer + */ + scope: Array; + /** + * The "subject" identifies the principal that is the subject of the JWT. + * @type {string} + * @memberof TrustOAuth2JwtGrantIssuer + */ + subject?: string; +} + +/** + * Check if a given object implements the TrustOAuth2JwtGrantIssuer interface. + */ +export function instanceOfTrustOAuth2JwtGrantIssuer(value: object): value is TrustOAuth2JwtGrantIssuer { + if (!('expires_at' in value) || value['expires_at'] === undefined) return false; + if (!('issuer' in value) || value['issuer'] === undefined) return false; + if (!('jwk' in value) || value['jwk'] === undefined) return false; + if (!('scope' in value) || value['scope'] === undefined) return false; + return true; +} + +export function TrustOAuth2JwtGrantIssuerFromJSON(json: any): TrustOAuth2JwtGrantIssuer { + return TrustOAuth2JwtGrantIssuerFromJSONTyped(json, false); +} + +export function TrustOAuth2JwtGrantIssuerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustOAuth2JwtGrantIssuer { + if (json == null) { + return json; + } + return { + + 'allow_any_subject': json['allow_any_subject'] == null ? undefined : json['allow_any_subject'], + 'expires_at': (new Date(json['expires_at'])), + 'issuer': json['issuer'], + 'jwk': JsonWebKeyFromJSON(json['jwk']), + 'scope': json['scope'], + 'subject': json['subject'] == null ? undefined : json['subject'], + }; +} + +export function TrustOAuth2JwtGrantIssuerToJSON(value?: TrustOAuth2JwtGrantIssuer | null): any { + if (value == null) { + return value; + } + return { + + 'allow_any_subject': value['allow_any_subject'], + 'expires_at': ((value['expires_at']).toISOString()), + 'issuer': value['issuer'], + 'jwk': JsonWebKeyToJSON(value['jwk']), + 'scope': value['scope'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantIssuer.ts b/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantIssuer.ts new file mode 100644 index 00000000000..baa408a0904 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantIssuer.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { TrustedOAuth2JwtGrantJsonWebKey } from './TrustedOAuth2JwtGrantJsonWebKey'; +import { + TrustedOAuth2JwtGrantJsonWebKeyFromJSON, + TrustedOAuth2JwtGrantJsonWebKeyFromJSONTyped, + TrustedOAuth2JwtGrantJsonWebKeyToJSON, +} from './TrustedOAuth2JwtGrantJsonWebKey'; + +/** + * OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + * @export + * @interface TrustedOAuth2JwtGrantIssuer + */ +export interface TrustedOAuth2JwtGrantIssuer { + /** + * The "allow_any_subject" indicates that the issuer is allowed to have any principal as the subject of the JWT. + * @type {boolean} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + allow_any_subject?: boolean; + /** + * The "created_at" indicates, when grant was created. + * @type {Date} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + created_at?: Date; + /** + * The "expires_at" indicates, when grant will expire, so we will reject assertion from "issuer" targeting "subject". + * @type {Date} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + expires_at?: Date; + /** + * + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + id?: string; + /** + * The "issuer" identifies the principal that issued the JWT assertion (same as "iss" claim in JWT). + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + issuer?: string; + /** + * + * @type {TrustedOAuth2JwtGrantJsonWebKey} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + public_key?: TrustedOAuth2JwtGrantJsonWebKey; + /** + * The "scope" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + * @type {Array} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + scope?: Array; + /** + * The "subject" identifies the principal that is the subject of the JWT. + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer + */ + subject?: string; +} + +/** + * Check if a given object implements the TrustedOAuth2JwtGrantIssuer interface. + */ +export function instanceOfTrustedOAuth2JwtGrantIssuer(value: object): value is TrustedOAuth2JwtGrantIssuer { + return true; +} + +export function TrustedOAuth2JwtGrantIssuerFromJSON(json: any): TrustedOAuth2JwtGrantIssuer { + return TrustedOAuth2JwtGrantIssuerFromJSONTyped(json, false); +} + +export function TrustedOAuth2JwtGrantIssuerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustedOAuth2JwtGrantIssuer { + if (json == null) { + return json; + } + return { + + 'allow_any_subject': json['allow_any_subject'] == null ? undefined : json['allow_any_subject'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])), + 'id': json['id'] == null ? undefined : json['id'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'public_key': json['public_key'] == null ? undefined : TrustedOAuth2JwtGrantJsonWebKeyFromJSON(json['public_key']), + 'scope': json['scope'] == null ? undefined : json['scope'], + 'subject': json['subject'] == null ? undefined : json['subject'], + }; +} + +export function TrustedOAuth2JwtGrantIssuerToJSON(value?: TrustedOAuth2JwtGrantIssuer | null): any { + if (value == null) { + return value; + } + return { + + 'allow_any_subject': value['allow_any_subject'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'expires_at': value['expires_at'] == null ? undefined : ((value['expires_at']).toISOString()), + 'id': value['id'], + 'issuer': value['issuer'], + 'public_key': TrustedOAuth2JwtGrantJsonWebKeyToJSON(value['public_key']), + 'scope': value['scope'], + 'subject': value['subject'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantJsonWebKey.ts b/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantJsonWebKey.ts new file mode 100644 index 00000000000..45a51297ebc --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/TrustedOAuth2JwtGrantJsonWebKey.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + * @export + * @interface TrustedOAuth2JwtGrantJsonWebKey + */ +export interface TrustedOAuth2JwtGrantJsonWebKey { + /** + * The "key_id" is key unique identifier (same as kid header in jws/jwt). + * @type {string} + * @memberof TrustedOAuth2JwtGrantJsonWebKey + */ + kid?: string; + /** + * The "set" is basically a name for a group(set) of keys. Will be the same as "issuer" in grant. + * @type {string} + * @memberof TrustedOAuth2JwtGrantJsonWebKey + */ + set?: string; +} + +/** + * Check if a given object implements the TrustedOAuth2JwtGrantJsonWebKey interface. + */ +export function instanceOfTrustedOAuth2JwtGrantJsonWebKey(value: object): value is TrustedOAuth2JwtGrantJsonWebKey { + return true; +} + +export function TrustedOAuth2JwtGrantJsonWebKeyFromJSON(json: any): TrustedOAuth2JwtGrantJsonWebKey { + return TrustedOAuth2JwtGrantJsonWebKeyFromJSONTyped(json, false); +} + +export function TrustedOAuth2JwtGrantJsonWebKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustedOAuth2JwtGrantJsonWebKey { + if (json == null) { + return json; + } + return { + + 'kid': json['kid'] == null ? undefined : json['kid'], + 'set': json['set'] == null ? undefined : json['set'], + }; +} + +export function TrustedOAuth2JwtGrantJsonWebKeyToJSON(value?: TrustedOAuth2JwtGrantJsonWebKey | null): any { + if (value == null) { + return value; + } + return { + + 'kid': value['kid'], + 'set': value['set'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/VerifiableCredentialPrimingResponse.ts b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialPrimingResponse.ts new file mode 100644 index 00000000000..481764ad6c0 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialPrimingResponse.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface VerifiableCredentialPrimingResponse + */ +export interface VerifiableCredentialPrimingResponse { + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + c_nonce?: string; + /** + * + * @type {number} + * @memberof VerifiableCredentialPrimingResponse + */ + c_nonce_expires_in?: number; + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + error?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + error_debug?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + error_description?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + error_hint?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialPrimingResponse + */ + format?: string; + /** + * + * @type {number} + * @memberof VerifiableCredentialPrimingResponse + */ + status_code?: number; +} + +/** + * Check if a given object implements the VerifiableCredentialPrimingResponse interface. + */ +export function instanceOfVerifiableCredentialPrimingResponse(value: object): value is VerifiableCredentialPrimingResponse { + return true; +} + +export function VerifiableCredentialPrimingResponseFromJSON(json: any): VerifiableCredentialPrimingResponse { + return VerifiableCredentialPrimingResponseFromJSONTyped(json, false); +} + +export function VerifiableCredentialPrimingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifiableCredentialPrimingResponse { + if (json == null) { + return json; + } + return { + + 'c_nonce': json['c_nonce'] == null ? undefined : json['c_nonce'], + 'c_nonce_expires_in': json['c_nonce_expires_in'] == null ? undefined : json['c_nonce_expires_in'], + 'error': json['error'] == null ? undefined : json['error'], + 'error_debug': json['error_debug'] == null ? undefined : json['error_debug'], + 'error_description': json['error_description'] == null ? undefined : json['error_description'], + 'error_hint': json['error_hint'] == null ? undefined : json['error_hint'], + 'format': json['format'] == null ? undefined : json['format'], + 'status_code': json['status_code'] == null ? undefined : json['status_code'], + }; +} + +export function VerifiableCredentialPrimingResponseToJSON(value?: VerifiableCredentialPrimingResponse | null): any { + if (value == null) { + return value; + } + return { + + 'c_nonce': value['c_nonce'], + 'c_nonce_expires_in': value['c_nonce_expires_in'], + 'error': value['error'], + 'error_debug': value['error_debug'], + 'error_description': value['error_description'], + 'error_hint': value['error_hint'], + 'format': value['format'], + 'status_code': value['status_code'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/VerifiableCredentialProof.ts b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialProof.ts new file mode 100644 index 00000000000..5c226fb308a --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialProof.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface VerifiableCredentialProof + */ +export interface VerifiableCredentialProof { + /** + * + * @type {string} + * @memberof VerifiableCredentialProof + */ + jwt?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialProof + */ + proof_type?: string; +} + +/** + * Check if a given object implements the VerifiableCredentialProof interface. + */ +export function instanceOfVerifiableCredentialProof(value: object): value is VerifiableCredentialProof { + return true; +} + +export function VerifiableCredentialProofFromJSON(json: any): VerifiableCredentialProof { + return VerifiableCredentialProofFromJSONTyped(json, false); +} + +export function VerifiableCredentialProofFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifiableCredentialProof { + if (json == null) { + return json; + } + return { + + 'jwt': json['jwt'] == null ? undefined : json['jwt'], + 'proof_type': json['proof_type'] == null ? undefined : json['proof_type'], + }; +} + +export function VerifiableCredentialProofToJSON(value?: VerifiableCredentialProof | null): any { + if (value == null) { + return value; + } + return { + + 'jwt': value['jwt'], + 'proof_type': value['proof_type'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/VerifiableCredentialResponse.ts b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialResponse.ts new file mode 100644 index 00000000000..49c29ed7d80 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/VerifiableCredentialResponse.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface VerifiableCredentialResponse + */ +export interface VerifiableCredentialResponse { + /** + * + * @type {string} + * @memberof VerifiableCredentialResponse + */ + credential_draft_00?: string; + /** + * + * @type {string} + * @memberof VerifiableCredentialResponse + */ + format?: string; +} + +/** + * Check if a given object implements the VerifiableCredentialResponse interface. + */ +export function instanceOfVerifiableCredentialResponse(value: object): value is VerifiableCredentialResponse { + return true; +} + +export function VerifiableCredentialResponseFromJSON(json: any): VerifiableCredentialResponse { + return VerifiableCredentialResponseFromJSONTyped(json, false); +} + +export function VerifiableCredentialResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifiableCredentialResponse { + if (json == null) { + return json; + } + return { + + 'credential_draft_00': json['credential_draft_00'] == null ? undefined : json['credential_draft_00'], + 'format': json['format'] == null ? undefined : json['format'], + }; +} + +export function VerifiableCredentialResponseToJSON(value?: VerifiableCredentialResponse | null): any { + if (value == null) { + return value; + } + return { + + 'credential_draft_00': value['credential_draft_00'], + 'format': value['format'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/Version.ts b/clients/hydra/typescript-fetch/src/models/Version.ts new file mode 100644 index 00000000000..a40d6259f61 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/Version.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Version + */ +export interface Version { + /** + * Version is the service's version. + * @type {string} + * @memberof Version + */ + version?: string; +} + +/** + * Check if a given object implements the Version interface. + */ +export function instanceOfVersion(value: object): value is Version { + return true; +} + +export function VersionFromJSON(json: any): Version { + return VersionFromJSONTyped(json, false); +} + +export function VersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Version { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function VersionToJSON(value?: Version | null): any { + if (value == null) { + return value; + } + return { + + 'version': value['version'], + }; +} + diff --git a/clients/hydra/typescript-fetch/src/models/index.ts b/clients/hydra/typescript-fetch/src/models/index.ts new file mode 100644 index 00000000000..e4a80bdae98 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/models/index.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AcceptOAuth2ConsentRequest'; +export * from './AcceptOAuth2ConsentRequestSession'; +export * from './AcceptOAuth2LoginRequest'; +export * from './CreateJsonWebKeySet'; +export * from './CreateVerifiableCredentialRequestBody'; +export * from './CredentialSupportedDraft00'; +export * from './ErrorOAuth2'; +export * from './GenericError'; +export * from './GetVersion200Response'; +export * from './HealthNotReadyStatus'; +export * from './HealthStatus'; +export * from './IntrospectedOAuth2Token'; +export * from './IsReady200Response'; +export * from './IsReady503Response'; +export * from './JsonPatch'; +export * from './JsonWebKey'; +export * from './JsonWebKeySet'; +export * from './OAuth2Client'; +export * from './OAuth2ClientTokenLifespans'; +export * from './OAuth2ConsentRequest'; +export * from './OAuth2ConsentRequestOpenIDConnectContext'; +export * from './OAuth2ConsentSession'; +export * from './OAuth2ConsentSessionExpiresAt'; +export * from './OAuth2LoginRequest'; +export * from './OAuth2LogoutRequest'; +export * from './OAuth2RedirectTo'; +export * from './OAuth2TokenExchange'; +export * from './OidcConfiguration'; +export * from './OidcUserInfo'; +export * from './Pagination'; +export * from './PaginationHeaders'; +export * from './RFC6749ErrorJson'; +export * from './RejectOAuth2Request'; +export * from './TokenPagination'; +export * from './TokenPaginationHeaders'; +export * from './TokenPaginationRequestParameters'; +export * from './TokenPaginationResponseHeaders'; +export * from './TrustOAuth2JwtGrantIssuer'; +export * from './TrustedOAuth2JwtGrantIssuer'; +export * from './TrustedOAuth2JwtGrantJsonWebKey'; +export * from './VerifiableCredentialPrimingResponse'; +export * from './VerifiableCredentialProof'; +export * from './VerifiableCredentialResponse'; +export * from './Version'; diff --git a/clients/hydra/typescript-fetch/src/runtime.ts b/clients/hydra/typescript-fetch/src/runtime.ts new file mode 100644 index 00000000000..115e4f7ce11 --- /dev/null +++ b/clients/hydra/typescript-fetch/src/runtime.ts @@ -0,0 +1,426 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. + * + * The version of the OpenAPI document: v2.2.1 + * Contact: hi@ory.sh + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/clients/hydra/typescript-fetch/tsconfig.esm.json b/clients/hydra/typescript-fetch/tsconfig.esm.json new file mode 100644 index 00000000000..2c0331cce04 --- /dev/null +++ b/clients/hydra/typescript-fetch/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/clients/hydra/typescript-fetch/tsconfig.json b/clients/hydra/typescript-fetch/tsconfig.json new file mode 100644 index 00000000000..250280d9ab0 --- /dev/null +++ b/clients/hydra/typescript-fetch/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/clients/hydra/typescript/.openapi-generator/VERSION b/clients/hydra/typescript/.openapi-generator/VERSION index 4b49d9bb63e..1985849fb58 100644 --- a/clients/hydra/typescript/.openapi-generator/VERSION +++ b/clients/hydra/typescript/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.7.0 diff --git a/clients/hydra/typescript/README.md b/clients/hydra/typescript/README.md index 2a5bad775a4..dccb55e5237 100644 --- a/clients/hydra/typescript/README.md +++ b/clients/hydra/typescript/README.md @@ -1,4 +1,4 @@ -## @ory/hydra-client@v2.2.0 +## @ory/hydra-client@v2.2.1 This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: @@ -15,7 +15,7 @@ Module system * CommonJS * ES6 module system -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) +It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) ### Building @@ -27,7 +27,7 @@ npm run build ### Publishing -First build the package then run ```npm publish``` +First build the package then run `npm publish` ### Consuming @@ -36,10 +36,11 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @ory/hydra-client@v2.2.0 --save +npm install @ory/hydra-client@v2.2.1 --save ``` _unPublished (not recommended):_ ``` npm install PATH_TO_GENERATED_PACKAGE --save +``` diff --git a/clients/hydra/typescript/api.ts b/clients/hydra/typescript/api.ts index 81d2e2f2830..149969251bd 100644 --- a/clients/hydra/typescript/api.ts +++ b/clients/hydra/typescript/api.ts @@ -4,7 +4,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -2392,9 +2392,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createJsonWebKeySet(set, createJsonWebKeySet, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.createJsonWebKeySet']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.createJsonWebKeySet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -2406,9 +2406,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async deleteJsonWebKey(set: string, kid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKey(set, kid, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.deleteJsonWebKey']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.deleteJsonWebKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -2419,9 +2419,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async deleteJsonWebKeySet(set: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKeySet(set, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.deleteJsonWebKeySet']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.deleteJsonWebKeySet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). @@ -2433,9 +2433,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async getJsonWebKey(set: string, kid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKey(set, kid, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.getJsonWebKey']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.getJsonWebKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -2446,9 +2446,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async getJsonWebKeySet(set: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKeySet(set, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.getJsonWebKeySet']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.getJsonWebKeySet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -2461,9 +2461,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKey(set, kid, jsonWebKey, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.setJsonWebKey']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.setJsonWebKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. @@ -2475,9 +2475,9 @@ export const JwkApiFp = function(configuration?: Configuration) { */ async setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKeySet(set, jsonWebKeySet, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['JwkApi.setJsonWebKeySet']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['JwkApi.setJsonWebKeySet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -2910,9 +2910,9 @@ export const MetadataApiFp = function(configuration?: Configuration) { */ async getVersion(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getVersion(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['MetadataApi.getVersion']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.getVersion']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. @@ -2922,9 +2922,9 @@ export const MetadataApiFp = function(configuration?: Configuration) { */ async isAlive(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.isAlive(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['MetadataApi.isAlive']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.isAlive']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. @@ -2934,9 +2934,9 @@ export const MetadataApiFp = function(configuration?: Configuration) { */ async isReady(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.isReady(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['MetadataApi.isReady']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MetadataApi.isReady']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -4195,9 +4195,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.acceptOAuth2ConsentRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if Ory should remember the subject\'s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. @@ -4209,9 +4209,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.acceptOAuth2LoginRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. @@ -4222,9 +4222,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async acceptOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LogoutRequest(logoutChallenge, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.acceptOAuth2LogoutRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.acceptOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. @@ -4235,9 +4235,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async createOAuth2Client(oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createOAuth2Client(oAuth2Client, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.createOAuth2Client']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.createOAuth2Client']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. @@ -4248,9 +4248,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async deleteOAuth2Client(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOAuth2Client(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.deleteOAuth2Client']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteOAuth2Client']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. @@ -4261,9 +4261,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async deleteOAuth2Token(clientId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOAuth2Token(clientId, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.deleteOAuth2Token']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteOAuth2Token']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. @@ -4274,9 +4274,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTrustedOAuth2JwtGrantIssuer(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.deleteTrustedOAuth2JwtGrantIssuer']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.deleteTrustedOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -4287,9 +4287,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async getOAuth2Client(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2Client(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.getOAuth2Client']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2Client']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. @@ -4300,9 +4300,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async getOAuth2ConsentRequest(consentChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2ConsentRequest(consentChallenge, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.getOAuth2ConsentRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. @@ -4313,9 +4313,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async getOAuth2LoginRequest(loginChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LoginRequest(loginChallenge, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.getOAuth2LoginRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to fetch an Ory OAuth 2.0 logout request. @@ -4326,9 +4326,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async getOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LogoutRequest(logoutChallenge, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.getOAuth2LogoutRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. @@ -4339,9 +4339,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async getTrustedOAuth2JwtGrantIssuer(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTrustedOAuth2JwtGrantIssuer(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.getTrustedOAuth2JwtGrantIssuer']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.getTrustedOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. @@ -4353,9 +4353,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async introspectOAuth2Token(token: string, scope?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.introspectOAuth2Token(token, scope, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.introspectOAuth2Token']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.introspectOAuth2Token']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. @@ -4369,9 +4369,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2Clients(pageSize, pageToken, clientName, owner, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.listOAuth2Clients']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listOAuth2Clients']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint lists all subject\'s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. @@ -4385,9 +4385,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, loginSessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2ConsentSessions(subject, pageSize, pageToken, loginSessionId, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.listOAuth2ConsentSessions']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listOAuth2ConsentSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. @@ -4400,9 +4400,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async listTrustedOAuth2JwtGrantIssuers(maxItems?: number, defaultItems?: number, issuer?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.listTrustedOAuth2JwtGrantIssuers']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.listTrustedOAuth2JwtGrantIssuers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. @@ -4412,9 +4412,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async oAuth2Authorize(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.oAuth2Authorize(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.oAuth2Authorize']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.oAuth2Authorize']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. @@ -4429,9 +4429,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.oauth2TokenExchange']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.oauth2TokenExchange']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -4443,9 +4443,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async patchOAuth2Client(id: string, jsonPatch: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchOAuth2Client(id, jsonPatch, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.patchOAuth2Client']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.patchOAuth2Client']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject\'s behalf. The consent challenge is appended to the consent provider\'s URL to which the subject\'s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. @@ -4457,9 +4457,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.rejectOAuth2ConsentRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2ConsentRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject\'s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. @@ -4471,9 +4471,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.rejectOAuth2LoginRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2LoginRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. @@ -4484,9 +4484,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async rejectOAuth2LogoutRequest(logoutChallenge: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LogoutRequest(logoutChallenge, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.rejectOAuth2LogoutRequest']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.rejectOAuth2LogoutRequest']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint revokes a subject\'s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. @@ -4499,9 +4499,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async revokeOAuth2ConsentSessions(subject: string, client?: string, all?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2ConsentSessions(subject, client, all, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.revokeOAuth2ConsentSessions']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2ConsentSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. @@ -4513,9 +4513,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async revokeOAuth2LoginSessions(subject?: string, sid?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2LoginSessions(subject, sid, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.revokeOAuth2LoginSessions']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2LoginSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. @@ -4528,9 +4528,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async revokeOAuth2Token(token: string, clientId?: string, clientSecret?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2Token(token, clientId, clientSecret, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.revokeOAuth2Token']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.revokeOAuth2Token']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -4542,9 +4542,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2Client(id, oAuth2Client, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.setOAuth2Client']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.setOAuth2Client']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. @@ -4556,9 +4556,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.setOAuth2ClientLifespans']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.setOAuth2ClientLifespans']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). @@ -4569,9 +4569,9 @@ export const OAuth2ApiFp = function(configuration?: Configuration) { */ async trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OAuth2Api.trustOAuth2JwtGrantIssuer']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OAuth2Api.trustOAuth2JwtGrantIssuer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -6072,9 +6072,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createOidcDynamicClient(oAuth2Client, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.createOidcDynamicClient']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.createOidcDynamicClient']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. @@ -6085,9 +6085,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async createVerifiableCredential(createVerifiableCredentialRequestBody?: CreateVerifiableCredentialRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createVerifiableCredential(createVerifiableCredentialRequestBody, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.createVerifiableCredential']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.createVerifiableCredential']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -6098,9 +6098,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async deleteOidcDynamicClient(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOidcDynamicClient(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.deleteOidcDynamicClient']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.deleteOidcDynamicClient']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * A mechanism for an OpenID Connect Relying Party to discover the End-User\'s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ @@ -6110,9 +6110,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async discoverOidcConfiguration(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.discoverOidcConfiguration(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.discoverOidcConfiguration']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.discoverOidcConfiguration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. @@ -6123,9 +6123,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async getOidcDynamicClient(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcDynamicClient(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.getOidcDynamicClient']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.getOidcDynamicClient']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token\'s consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. @@ -6135,9 +6135,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async getOidcUserInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcUserInfo(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.getOidcUserInfo']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.getOidcUserInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. @@ -6147,9 +6147,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async revokeOidcSession(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOidcSession(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.revokeOidcSession']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.revokeOidcSession']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client\'s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. @@ -6161,9 +6161,9 @@ export const OidcApiFp = function(configuration?: Configuration) { */ async setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.setOidcDynamicClient(id, oAuth2Client, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OidcApi.setOidcDynamicClient']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OidcApi.setOidcDynamicClient']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; @@ -6489,9 +6489,9 @@ export const WellknownApiFp = function(configuration?: Configuration) { */ async discoverJsonWebKeys(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.discoverJsonWebKeys(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WellknownApi.discoverJsonWebKeys']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WellknownApi.discoverJsonWebKeys']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; diff --git a/clients/hydra/typescript/base.ts b/clients/hydra/typescript/base.ts index a67260616b9..fb4fa20016e 100644 --- a/clients/hydra/typescript/base.ts +++ b/clients/hydra/typescript/base.ts @@ -4,7 +4,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/typescript/common.ts b/clients/hydra/typescript/common.ts index 80d63e4e59d..29b0f3cd0bd 100644 --- a/clients/hydra/typescript/common.ts +++ b/clients/hydra/typescript/common.ts @@ -4,7 +4,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/typescript/configuration.ts b/clients/hydra/typescript/configuration.ts index 939d51a9374..1df08402997 100644 --- a/clients/hydra/typescript/configuration.ts +++ b/clients/hydra/typescript/configuration.ts @@ -4,7 +4,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/typescript/index.ts b/clients/hydra/typescript/index.ts index 636e50747de..6e3b573cd05 100644 --- a/clients/hydra/typescript/index.ts +++ b/clients/hydra/typescript/index.ts @@ -4,7 +4,7 @@ * Ory Hydra API * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v2.2.0 + * The version of the OpenAPI document: v2.2.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/hydra/typescript/package-lock.json b/clients/hydra/typescript/package-lock.json index cbe4ed185c2..69d05318a32 100644 --- a/clients/hydra/typescript/package-lock.json +++ b/clients/hydra/typescript/package-lock.json @@ -1,38 +1,41 @@ { "name": "@ory/hydra-client", - "version": "v2.2.0", - "lockfileVersion": 2, + "version": "v2.2.1", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ory/hydra-client", - "version": "v2.2.0", + "version": "v2.2.1", "license": "Apache-2.0", "dependencies": { "axios": "^1.6.1" }, "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^4.0" + "@types/node": "12.11.5 - 12.20.42", + "typescript": "^4.0 || ^5.0" } }, "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true + "version": "12.20.42", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz", + "integrity": "sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==", + "dev": true, + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -41,6 +44,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -52,20 +56,22 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -79,6 +85,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -92,6 +99,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -100,6 +108,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -110,95 +119,22 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } } - }, - "dependencies": { - "@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", - "requires": { - "follow-redirects": "^1.15.4", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - } } } diff --git a/clients/hydra/typescript/package.json b/clients/hydra/typescript/package.json index 829af4ba9ce..eba1ddbc9a8 100644 --- a/clients/hydra/typescript/package.json +++ b/clients/hydra/typescript/package.json @@ -1,8 +1,8 @@ { "name": "@ory/hydra-client", - "version": "v2.2.0", + "version": "v2.2.1", "description": "OpenAPI client for @ory/hydra-client", - "author": "ORY GmbH", + "author": "Ory Corp", "repository": { "type": "git", "url": "https://github.com/ory/sdk.git" @@ -27,7 +27,7 @@ "axios": "^1.6.1" }, "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^4.0" + "@types/node": "12.11.5 - 12.20.42", + "typescript": "^4.0 || ^5.0" } } diff --git a/spec/hydra/v2.2.1.json b/spec/hydra/v2.2.1.json index 5098d069d4d..37743229aaf 100644 --- a/spec/hydra/v2.2.1.json +++ b/spec/hydra/v2.2.1.json @@ -1 +1 @@ -{"components":{"responses":{"emptyResponse":{"description":"Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201."},"errorOAuth2BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Bad Request Error Response"},"errorOAuth2Default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Default Error Response"},"errorOAuth2NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Not Found Error Response"},"listOAuth2Clients":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oAuth2Client"},"type":"array"}}},"description":"Paginated OAuth2 Client List Response"}},"schemas":{"CreateVerifiableCredentialRequestBody":{"properties":{"format":{"type":"string"},"proof":{"$ref":"#/components/schemas/VerifiableCredentialProof"},"types":{"items":{"type":"string"},"type":"array"}},"title":"CreateVerifiableCredentialRequestBody contains the request body to request a verifiable credential.","type":"object"},"DefaultError":{},"JSONRawMessage":{"title":"JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger."},"NullBool":{"nullable":true,"type":"boolean"},"NullDuration":{"description":"Specify a time duration in milliseconds, seconds, minutes, hours.","pattern":"^([0-9]+(ns|us|ms|s|m|h))*$","title":"Time duration","type":"string"},"NullInt":{"nullable":true,"type":"integer"},"NullString":{"nullable":true,"type":"string"},"NullTime":{"format":"date-time","nullable":true,"type":"string"},"NullUUID":{"format":"uuid4","nullable":true,"type":"string"},"RFC6749ErrorJson":{"properties":{"error":{"type":"string"},"error_debug":{"type":"string"},"error_description":{"type":"string"},"error_hint":{"type":"string"},"status_code":{"format":"int64","type":"integer"}},"title":"RFC6749ErrorJson is a helper struct for JSON encoding/decoding of RFC6749Error.","type":"object"},"StringSliceJSONFormat":{"items":{"type":"string"},"title":"StringSliceJSONFormat represents []string{} which is encoded to/from JSON for SQL storage.","type":"array"},"Time":{"format":"date-time","type":"string"},"UUID":{"format":"uuid4","type":"string"},"VerifiableCredentialProof":{"properties":{"jwt":{"type":"string"},"proof_type":{"type":"string"}},"title":"VerifiableCredentialProof contains the proof of a verifiable credential.","type":"object"},"acceptOAuth2ConsentRequest":{"properties":{"context":{"$ref":"#/components/schemas/JSONRawMessage"},"grant_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"grant_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"handled_at":{"$ref":"#/components/schemas/nullTime"},"remember":{"description":"Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.","type":"boolean"},"remember_for":{"description":"RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.","format":"int64","type":"integer"},"session":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequestSession"}},"title":"The request payload used to accept a consent request.","type":"object"},"acceptOAuth2ConsentRequestSession":{"properties":{"access_token":{"description":"AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the\nrefresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.\nIf only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties\ncan access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!"},"id_token":{"description":"IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable\nby anyone that has access to the ID Challenge. Use with care!"}},"title":"Pass session data to a consent request.","type":"object"},"acceptOAuth2LoginRequest":{"properties":{"acr":{"description":"ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.","type":"string"},"amr":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"extend_session_lifespan":{"description":"Extend OAuth2 authentication session lifespan\n\nIf set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously.\n\nThis value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.","type":"boolean"},"force_subject_identifier":{"description":"ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the\n(Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID\nConnect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client.\n\nPlease note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the\nsub claim in the OAuth 2.0 Introspection.\n\nPer default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself\nyou can use this field. Please note that setting this field has no effect if `pairwise` is not configured in\nORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's\nconfiguration).\n\nPlease also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies\nthat you have to compute this value on every authentication process (probably depending on the client ID or some\nother unique value).\n\nIf you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.","type":"string"},"identity_provider_session_id":{"description":"IdentityProviderSessionID is the session ID of the end-user that authenticated.\nIf specified, we will use this value to propagate the logout.","type":"string"},"remember":{"description":"Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store\na cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she\nwill not be asked to log in again.","type":"boolean"},"remember_for":{"description":"RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered for the duration of the browser session (using a session cookie).","format":"int64","type":"integer"},"subject":{"description":"Subject is the user ID of the end-user that authenticated.","type":"string"}},"required":["subject"],"title":"HandledLoginRequest is the request payload used to accept a login request.","type":"object"},"createJsonWebKeySet":{"description":"Create JSON Web Key Set Request Body","properties":{"alg":{"description":"JSON Web Key Algorithm\n\nThe algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.","type":"string"},"kid":{"description":"JSON Web Key ID\n\nThe Key ID of the key to be created.","type":"string"},"use":{"description":"JSON Web Key Use\n\nThe \"use\" (public key use) parameter identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Valid values are \"enc\" and \"sig\".","type":"string"}},"required":["alg","use","kid"],"type":"object"},"credentialSupportedDraft00":{"description":"Includes information about the supported verifiable credentials.","properties":{"cryptographic_binding_methods_supported":{"description":"OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported\n\nContains a list of cryptographic binding methods supported for signing the proof.","items":{"type":"string"},"type":"array"},"cryptographic_suites_supported":{"description":"OpenID Connect Verifiable Credentials Cryptographic Suites Supported\n\nContains a list of cryptographic suites methods supported for signing the proof.","items":{"type":"string"},"type":"array"},"format":{"description":"OpenID Connect Verifiable Credentials Format\n\nContains the format that is supported by this authorization server.","type":"string"},"types":{"description":"OpenID Connect Verifiable Credentials Types\n\nContains the types of verifiable credentials supported.","items":{"type":"string"},"type":"array"}},"title":"Verifiable Credentials Metadata (Draft 00)","type":"object"},"errorOAuth2":{"description":"Error","properties":{"error":{"description":"Error","type":"string"},"error_debug":{"description":"Error Debug Information\n\nOnly available in dev mode.","type":"string"},"error_description":{"description":"Error Description","type":"string"},"error_hint":{"description":"Error Hint\n\nHelps the user identify the error cause.","example":"The redirect URL is not allowed.","type":"string"},"status_code":{"description":"HTTP Status Code","example":401,"format":"int64","type":"integer"}},"type":"object"},"genericError":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.","example":"SQL field \"foo\" is not a bool.","type":"string"},"details":{"description":"Further error details"},"id":{"description":"The error ID\n\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\n\nThe error's message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"request":{"description":"The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message"],"type":"object"},"healthNotReadyStatus":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"type":"object"},"healthStatus":{"properties":{"status":{"description":"Status always contains \"ok\".","type":"string"}},"type":"object"},"introspectedOAuth2Token":{"description":"Introspection contains an access token's session data as specified by\n[IETF RFC 7662](https://tools.ietf.org/html/rfc7662)","properties":{"active":{"description":"Active is a boolean indicator of whether or not the presented token\nis currently active. The specifics of a token's \"active\" state\nwill vary depending on the implementation of the authorization\nserver and the information it keeps about its tokens, but a \"true\"\nvalue return for the \"active\" property will generally indicate\nthat a given token has been issued by this authorization server,\nhas not been revoked by the resource owner, and is within its\ngiven time window of validity (e.g., after its issuance time and\nbefore its expiration time).","type":"boolean"},"aud":{"description":"Audience contains a list of the token's intended audiences.","items":{"type":"string"},"type":"array"},"client_id":{"description":"ID is aclient identifier for the OAuth 2.0 client that\nrequested this token.","type":"string"},"exp":{"description":"Expires at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token will expire.","format":"int64","type":"integer"},"ext":{"additionalProperties":{},"description":"Extra is arbitrary data set by the session.","type":"object"},"iat":{"description":"Issued at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token was\noriginally issued.","format":"int64","type":"integer"},"iss":{"description":"IssuerURL is a string representing the issuer of this token","type":"string"},"nbf":{"description":"NotBefore is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token is not to be\nused before.","format":"int64","type":"integer"},"obfuscated_subject":{"description":"ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization.\nIt is the `sub` value of the ID Token that was issued.","type":"string"},"scope":{"description":"Scope is a JSON string containing a space-separated list of\nscopes associated with this token.","type":"string"},"sub":{"description":"Subject of the token, as defined in JWT [RFC7519].\nUsually a machine-readable identifier of the resource owner who\nauthorized this token.","type":"string"},"token_type":{"description":"TokenType is the introspected token's type, typically `Bearer`.","type":"string"},"token_use":{"description":"TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.","type":"string"},"username":{"description":"Username is a human-readable identifier for the resource owner who\nauthorized this token.","type":"string"}},"required":["active"],"type":"object"},"jsonPatch":{"description":"A JSONPatch document as defined by RFC 6902","properties":{"from":{"description":"This field is used together with operation \"move\" and uses JSON Pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"/name","type":"string"},"op":{"description":"The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".","example":"replace","type":"string"},"path":{"description":"The path to the target path. Uses JSON pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"/name","type":"string"},"value":{"description":"The value to be used within the operations.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"foobar"}},"required":["op","path"],"type":"object"},"jsonPatchDocument":{"description":"A JSONPatchDocument request","items":{"$ref":"#/components/schemas/jsonPatch"},"type":"array"},"jsonWebKey":{"properties":{"alg":{"description":"The \"alg\" (algorithm) parameter identifies the algorithm intended for\nuse with the key. The values used should either be registered in the\nIANA \"JSON Web Signature and Encryption Algorithms\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name.","example":"RS256","type":"string"},"crv":{"example":"P-256","type":"string"},"d":{"example":"T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE","type":"string"},"dp":{"example":"G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0","type":"string"},"dq":{"example":"s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk","type":"string"},"e":{"example":"AQAB","type":"string"},"k":{"example":"GawgguFyGrWKav7AX4VKUg","type":"string"},"kid":{"description":"The \"kid\" (key ID) parameter is used to match a specific key. This\nis used, for instance, to choose among a set of keys within a JWK Set\nduring key rollover. The structure of the \"kid\" value is\nunspecified. When \"kid\" values are used within a JWK Set, different\nkeys within the JWK Set SHOULD use distinct \"kid\" values. (One\nexample in which different keys might use the same \"kid\" value is if\nthey have different \"kty\" (key type) values but are considered to be\nequivalent alternatives by the application using them.) The \"kid\"\nvalue is a case-sensitive string.","example":"1603dfe0af8f4596","type":"string"},"kty":{"description":"The \"kty\" (key type) parameter identifies the cryptographic algorithm\nfamily used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\neither be registered in the IANA \"JSON Web Key Types\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name. The \"kty\" value is a case-sensitive string.","example":"RSA","type":"string"},"n":{"example":"vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0","type":"string"},"p":{"example":"6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ","type":"string"},"q":{"example":"0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ","type":"string"},"qi":{"example":"GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU","type":"string"},"use":{"description":"Use (\"public key use\") identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).","example":"sig","type":"string"},"x":{"example":"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU","type":"string"},"x5c":{"description":"The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\nor more PKIX certificates [RFC5280]. The certificate chain is\nrepresented as a JSON array of certificate value strings. Each\nstring in the array is a base64-encoded (Section 4 of [RFC4648] --\nnot base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\nThe PKIX certificate containing the key value MUST be the first\ncertificate.","items":{"type":"string"},"type":"array"},"y":{"example":"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0","type":"string"}},"required":["use","kty","kid","alg"],"type":"object"},"jsonWebKeySet":{"description":"JSON Web Key Set","properties":{"keys":{"description":"List of JSON Web Keys\n\nThe value of the \"keys\" parameter is an array of JSON Web Key (JWK)\nvalues. By default, the order of the JWK values within the array does\nnot imply an order of preference among them, although applications\nof JWK Sets can choose to assign a meaning to the order for their\npurposes, if desired.","items":{"$ref":"#/components/schemas/jsonWebKey"},"type":"array"}},"type":"object"},"nullDuration":{"nullable":true,"pattern":"^[0-9]+(ns|us|ms|s|m|h)$","type":"string"},"nullInt64":{"nullable":true,"type":"integer"},"nullTime":{"format":"date-time","title":"NullTime implements sql.NullTime functionality.","type":"string"},"oAuth2Client":{"description":"OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","properties":{"access_token_strategy":{"description":"OAuth 2.0 Access Token Strategy\n\nAccessTokenStrategy is the strategy used to generate access tokens.\nValid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens\nSetting the stragegy here overrides the global setting in `strategies.access_token`.","type":"string"},"allowed_cors_origins":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"authorization_code_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"backchannel_logout_session_required":{"description":"OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout\nToken to identify the RP session with the OP when the backchannel_logout_uri is used.\nIf omitted, the default value is false.","type":"boolean"},"backchannel_logout_uri":{"description":"OpenID Connect Back-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when sent a Logout Token by the OP.","type":"string"},"client_credentials_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"client_id":{"description":"OAuth 2.0 Client ID\n\nThe ID is immutable. If no ID is provided, a UUID4 will be generated.","type":"string"},"client_name":{"description":"OAuth 2.0 Client Name\n\nThe human-readable name of the client to be presented to the\nend-user during authorization.","type":"string"},"client_secret":{"description":"OAuth 2.0 Client Secret\n\nThe secret will be included in the create request as cleartext, and then\nnever again. The secret is kept in hashed format and is not recoverable once lost.","type":"string"},"client_secret_expires_at":{"description":"OAuth 2.0 Client Secret Expires At\n\nThe field is currently not supported and its value is always 0.","format":"int64","type":"integer"},"client_uri":{"description":"OAuth 2.0 Client URI\n\nClientURI is a URL string of a web page providing information about the client.\nIf present, the server SHOULD display this URL to the end-user in\na clickable fashion.","type":"string"},"contacts":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"created_at":{"description":"OAuth 2.0 Client Creation Date\n\nCreatedAt returns the timestamp of the client's creation.","format":"date-time","type":"string"},"frontchannel_logout_session_required":{"description":"OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be\nincluded to identify the RP session with the OP when the frontchannel_logout_uri is used.\nIf omitted, the default value is false.","type":"boolean"},"frontchannel_logout_uri":{"description":"OpenID Connect Front-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query\nparameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the\nrequest and to determine which of the potentially multiple sessions is to be logged out; if either is\nincluded, both MUST be.","type":"string"},"grant_types":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"implicit_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"jwks":{"description":"OAuth 2.0 Client JSON Web Key Set\n\nClient's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as\nthe jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter\nis intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for\ninstance, by native applications that might not have a location to host the contents of the JWK Set. If a Client\ncan use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation\n(which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks\nparameters MUST NOT be used together."},"jwks_uri":{"description":"OAuth 2.0 Client JSON Web Key Set URL\n\nURL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains\nthe signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the\nClient's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing\nand encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced\nJWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both\nsignatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used\nto provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST\nmatch those in the certificate.","type":"string"},"jwt_bearer_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"logo_uri":{"description":"OAuth 2.0 Client Logo URI\n\nA URL string referencing the client's logo.","type":"string"},"metadata":{"$ref":"#/components/schemas/JSONRawMessage"},"owner":{"description":"OAuth 2.0 Client Owner\n\nOwner is a string identifying the owner of the OAuth 2.0 Client.","type":"string"},"policy_uri":{"description":"OAuth 2.0 Client Policy URI\n\nPolicyURI is a URL string that points to a human-readable privacy policy document\nthat describes how the deployment organization collects, uses,\nretains, and discloses personal data.","type":"string"},"post_logout_redirect_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"redirect_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"refresh_token_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"registration_access_token":{"description":"OpenID Connect Dynamic Client Registration Access Token\n\nRegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client\nusing Dynamic Client Registration.","type":"string"},"registration_client_uri":{"description":"OpenID Connect Dynamic Client Registration URL\n\nRegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.","type":"string"},"request_object_signing_alg":{"description":"OpenID Connect Request Object Signing Algorithm\n\nJWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects\nfrom this Client MUST be rejected, if not signed with this algorithm.","type":"string"},"request_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"response_types":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"scope":{"description":"OAuth 2.0 Client Scope\n\nScope is a string containing a space-separated list of scope values (as\ndescribed in Section 3.3 of OAuth 2.0 [RFC6749]) that the client\ncan use when requesting access tokens.","example":"scope1 scope-2 scope.3 scope:4","type":"string"},"sector_identifier_uri":{"description":"OpenID Connect Sector Identifier URI\n\nURL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a\nfile with a single JSON array of redirect_uri values.","type":"string"},"skip_consent":{"description":"SkipConsent skips the consent screen for this client. This field can only\nbe set from the admin API.","type":"boolean"},"skip_logout_consent":{"description":"SkipLogoutConsent skips the logout consent screen for this client. This field can only\nbe set from the admin API.","type":"boolean"},"subject_type":{"description":"OpenID Connect Subject Type\n\nThe `subject_types_supported` Discovery parameter contains a\nlist of the supported subject_type values for this server. Valid types include `pairwise` and `public`.","type":"string"},"token_endpoint_auth_method":{"default":"client_secret_basic","description":"OAuth 2.0 Token Endpoint Authentication Method\n\nRequested Client Authentication method for the Token Endpoint. The options are:\n\n`client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header.\n`client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body.\n`private_key_jwt`: Use JSON Web Tokens to authenticate the client.\n`none`: Used for public clients (native apps, mobile apps) which can not have secrets.","type":"string"},"token_endpoint_auth_signing_alg":{"description":"OAuth 2.0 Token Endpoint Signing Algorithm\n\nRequested Client Authentication signing algorithm for the Token Endpoint.","type":"string"},"tos_uri":{"description":"OAuth 2.0 Client Terms of Service URI\n\nA URL string pointing to a human-readable terms of service\ndocument for the client that describes a contractual relationship\nbetween the end-user and the client that the end-user accepts when\nauthorizing the client.","type":"string"},"updated_at":{"description":"OAuth 2.0 Client Last Update Date\n\nUpdatedAt returns the timestamp of the last update.","format":"date-time","type":"string"},"userinfo_signed_response_alg":{"description":"OpenID Connect Request Userinfo Signed Response Algorithm\n\nJWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT\n[JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims\nas a UTF-8 encoded JSON object using the application/json content-type.","type":"string"}},"title":"OAuth 2.0 Client","type":"object"},"oAuth2ClientTokenLifespans":{"description":"Lifespans of different token types issued for this OAuth 2.0 Client.","properties":{"authorization_code_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"client_credentials_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"jwt_bearer_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"}},"title":"OAuth 2.0 Client Token Lifespans","type":"object"},"oAuth2ConsentRequest":{"properties":{"acr":{"description":"ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.","type":"string"},"amr":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"challenge":{"description":"ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"login_challenge":{"description":"LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate\na login and consent request in the login & consent app.","type":"string"},"login_session_id":{"description":"LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.","type":"string"},"oidc_context":{"$ref":"#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext"},"request_url":{"description":"RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.","type":"string"},"requested_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"requested_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"skip":{"description":"Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you must not ask the user to grant the requested scopes. You must however either allow or deny the\nconsent request using the usual API call.","type":"boolean"},"subject":{"description":"Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client.","type":"string"}},"required":["challenge"],"title":"Contains information on an ongoing consent request.","type":"object"},"oAuth2ConsentRequestOpenIDConnectContext":{"properties":{"acr_values":{"description":"ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request.\nIt is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.\n\nOpenID Connect defines it as follows:\n> Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values\nthat the Authorization Server is being requested to use for processing this Authentication Request, with the\nvalues appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication\nperformed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a\nVoluntary Claim by this parameter.","items":{"type":"string"},"type":"array"},"display":{"description":"Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.\nThe defined values are:\npage: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode.\npopup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over.\ntouch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface.\nwap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display.\n\nThe Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.","type":"string"},"id_token_hint_claims":{"additionalProperties":{},"description":"IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the\nEnd-User's current or past authenticated session with the Client.","type":"object"},"login_hint":{"description":"LoginHint hints about the login identifier the End-User might use to log in (if necessary).\nThis hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier)\nand then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a\nphone number in the format specified for the phone_number Claim. The use of this parameter is optional.","type":"string"},"ui_locales":{"description":"UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a\nspace-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value\n\"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation),\nfollowed by English (without a region designation). An error SHOULD NOT result if some or all of the requested\nlocales are not supported by the OpenID Provider.","items":{"type":"string"},"type":"array"}},"title":"Contains optional information about the OpenID Connect request.","type":"object"},"oAuth2ConsentSession":{"description":"A completed OAuth 2.0 Consent Session.","properties":{"consent_request":{"$ref":"#/components/schemas/oAuth2ConsentRequest"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"expires_at":{"properties":{"access_token":{"format":"date-time","type":"string"},"authorize_code":{"format":"date-time","type":"string"},"id_token":{"format":"date-time","type":"string"},"par_context":{"format":"date-time","type":"string"},"refresh_token":{"format":"date-time","type":"string"}},"type":"object"},"grant_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"grant_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"handled_at":{"$ref":"#/components/schemas/nullTime"},"remember":{"description":"Remember Consent\n\nRemember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.","type":"boolean"},"remember_for":{"description":"Remember Consent For\n\nRememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.","format":"int64","type":"integer"},"session":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequestSession"}},"title":"OAuth 2.0 Consent Session","type":"object"},"oAuth2ConsentSessions":{"description":"List of OAuth 2.0 Consent Sessions","items":{"$ref":"#/components/schemas/oAuth2ConsentSession"},"type":"array"},"oAuth2LoginRequest":{"properties":{"challenge":{"description":"ID is the identifier (\"login challenge\") of the login request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"oidc_context":{"$ref":"#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext"},"request_url":{"description":"RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.","type":"string"},"requested_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"requested_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"session_id":{"description":"SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.","type":"string"},"skip":{"description":"Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL.\n\nThis feature allows you to update / set session information.","type":"boolean"},"subject":{"description":"Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type\nwhen accepting the login request, or the request will fail.","type":"string"}},"required":["challenge","skip","subject","client","request_url"],"title":"Contains information on an ongoing login request.","type":"object"},"oAuth2LogoutRequest":{"properties":{"challenge":{"description":"Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"request_url":{"description":"RequestURL is the original Logout URL requested.","type":"string"},"rp_initiated":{"description":"RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.","type":"boolean"},"sid":{"description":"SessionID is the login session ID that was requested to log out.","type":"string"},"subject":{"description":"Subject is the user for whom the logout was request.","type":"string"}},"title":"Contains information about an ongoing logout request.","type":"object"},"oAuth2RedirectTo":{"description":"Contains a redirect URL used to complete a login, consent, or logout request.","properties":{"redirect_to":{"description":"RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.","type":"string"}},"required":["redirect_to"],"title":"OAuth 2.0 Redirect Browser To","type":"object"},"oAuth2TokenExchange":{"description":"OAuth2 Token Exchange Result","properties":{"access_token":{"description":"The access token issued by the authorization server.","type":"string"},"expires_in":{"description":"The lifetime in seconds of the access token. For\nexample, the value \"3600\" denotes that the access token will\nexpire in one hour from the time the response was generated.","format":"int64","type":"integer"},"id_token":{"description":"To retrieve a refresh token request the id_token scope.","type":"string"},"refresh_token":{"description":"The refresh token, which can be used to obtain new\naccess tokens. To retrieve it add the scope \"offline\" to your access token request.","type":"string"},"scope":{"description":"The scope of the access token","type":"string"},"token_type":{"description":"The type of the token issued","type":"string"}},"type":"object"},"oidcConfiguration":{"description":"Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms\namong others.","properties":{"authorization_endpoint":{"description":"OAuth 2.0 Authorization Endpoint URL","example":"https://playground.ory.sh/ory-hydra/public/oauth2/auth","type":"string"},"backchannel_logout_session_supported":{"description":"OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP\nsession with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP","type":"boolean"},"backchannel_logout_supported":{"description":"OpenID Connect Back-Channel Logout Supported\n\nBoolean value specifying whether the OP supports back-channel logout, with true indicating support.","type":"boolean"},"claims_parameter_supported":{"description":"OpenID Connect Claims Parameter Parameter Supported\n\nBoolean value specifying whether the OP supports use of the claims parameter, with true indicating support.","type":"boolean"},"claims_supported":{"description":"OpenID Connect Supported Claims\n\nJSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply\nvalues for. Note that for privacy or other reasons, this might not be an exhaustive list.","items":{"type":"string"},"type":"array"},"code_challenge_methods_supported":{"description":"OAuth 2.0 PKCE Supported Code Challenge Methods\n\nJSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported\nby this authorization server.","items":{"type":"string"},"type":"array"},"credentials_endpoint_draft_00":{"description":"OpenID Connect Verifiable Credentials Endpoint\n\nContains the URL of the Verifiable Credentials Endpoint.","type":"string"},"credentials_supported_draft_00":{"description":"OpenID Connect Verifiable Credentials Supported\n\nJSON array containing a list of the Verifiable Credentials supported by this authorization server.","items":{"$ref":"#/components/schemas/credentialSupportedDraft00"},"type":"array"},"end_session_endpoint":{"description":"OpenID Connect End-Session Endpoint\n\nURL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.","type":"string"},"frontchannel_logout_session_supported":{"description":"OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify\nthe RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also\nincluded in ID Tokens issued by the OP.","type":"boolean"},"frontchannel_logout_supported":{"description":"OpenID Connect Front-Channel Logout Supported\n\nBoolean value specifying whether the OP supports HTTP-based logout, with true indicating support.","type":"boolean"},"grant_types_supported":{"description":"OAuth 2.0 Supported Grant Types\n\nJSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.","items":{"type":"string"},"type":"array"},"id_token_signed_response_alg":{"description":"OpenID Connect Default ID Token Signing Algorithms\n\nAlgorithm used to sign OpenID Connect ID Tokens.","items":{"type":"string"},"type":"array"},"id_token_signing_alg_values_supported":{"description":"OpenID Connect Supported ID Token Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token\nto encode the Claims in a JWT.","items":{"type":"string"},"type":"array"},"issuer":{"description":"OpenID Connect Issuer URL\n\nAn URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier.\nIf IssuerURL discovery is supported , this value MUST be identical to the issuer value returned\nby WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.","example":"https://playground.ory.sh/ory-hydra/public/","type":"string"},"jwks_uri":{"description":"OpenID Connect Well-Known JSON Web Keys URL\n\nURL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate\nsignatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs\nto encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)\nparameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.\nAlthough some algorithms allow the same key to be used for both signatures and encryption, doing so is\nNOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of\nkeys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.","example":"https://{slug}.projects.oryapis.com/.well-known/jwks.json","type":"string"},"registration_endpoint":{"description":"OpenID Connect Dynamic Client Registration Endpoint URL","example":"https://playground.ory.sh/ory-hydra/admin/client","type":"string"},"request_object_signing_alg_values_supported":{"description":"OpenID Connect Supported Request Object Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects,\nwhich are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when\nthe Request Object is passed by value (using the request parameter) and when it is passed by reference\n(using the request_uri parameter).","items":{"type":"string"},"type":"array"},"request_parameter_supported":{"description":"OpenID Connect Request Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request parameter, with true indicating support.","type":"boolean"},"request_uri_parameter_supported":{"description":"OpenID Connect Request URI Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.","type":"boolean"},"require_request_uri_registration":{"description":"OpenID Connect Requires Request URI Registration\n\nBoolean value specifying whether the OP requires any request_uri values used to be pre-registered\nusing the request_uris registration parameter.","type":"boolean"},"response_modes_supported":{"description":"OAuth 2.0 Supported Response Modes\n\nJSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.","items":{"type":"string"},"type":"array"},"response_types_supported":{"description":"OAuth 2.0 Supported Response Types\n\nJSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID\nProviders MUST support the code, id_token, and the token id_token Response Type values.","items":{"type":"string"},"type":"array"},"revocation_endpoint":{"description":"OAuth 2.0 Token Revocation URL\n\nURL of the authorization server's OAuth 2.0 revocation endpoint.","type":"string"},"scopes_supported":{"description":"OAuth 2.0 Supported Scope Values\n\nJSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST\nsupport the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used","items":{"type":"string"},"type":"array"},"subject_types_supported":{"description":"OpenID Connect Supported Subject Types\n\nJSON array containing a list of the Subject Identifier types that this OP supports. Valid types include\npairwise and public.","items":{"type":"string"},"type":"array"},"token_endpoint":{"description":"OAuth 2.0 Token Endpoint URL","example":"https://playground.ory.sh/ory-hydra/public/oauth2/token","type":"string"},"token_endpoint_auth_methods_supported":{"description":"OAuth 2.0 Supported Client Authentication Methods\n\nJSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are\nclient_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0","items":{"type":"string"},"type":"array"},"userinfo_endpoint":{"description":"OpenID Connect Userinfo URL\n\nURL of the OP's UserInfo Endpoint.","type":"string"},"userinfo_signed_response_alg":{"description":"OpenID Connect User Userinfo Signing Algorithm\n\nAlgorithm used to sign OpenID Connect Userinfo Responses.","items":{"type":"string"},"type":"array"},"userinfo_signing_alg_values_supported":{"description":"OpenID Connect Supported Userinfo Signing Algorithm\n\nJSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].","items":{"type":"string"},"type":"array"}},"required":["issuer","authorization_endpoint","token_endpoint","jwks_uri","subject_types_supported","response_types_supported","id_token_signing_alg_values_supported","id_token_signed_response_alg","userinfo_signed_response_alg"],"title":"OpenID Connect Discovery Metadata","type":"object"},"oidcUserInfo":{"description":"OpenID Connect Userinfo","properties":{"birthdate":{"description":"End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.","type":"string"},"email":{"description":"End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.","type":"string"},"email_verified":{"description":"True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.","type":"boolean"},"family_name":{"description":"Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.","type":"string"},"gender":{"description":"End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.","type":"string"},"given_name":{"description":"Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.","type":"string"},"locale":{"description":"End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.","type":"string"},"middle_name":{"description":"Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.","type":"string"},"name":{"description":"End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.","type":"string"},"nickname":{"description":"Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.","type":"string"},"phone_number":{"description":"End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.","type":"string"},"phone_number_verified":{"description":"True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.","type":"boolean"},"picture":{"description":"URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.","type":"string"},"preferred_username":{"description":"Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.","type":"string"},"profile":{"description":"URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.","type":"string"},"sub":{"description":"Subject - Identifier for the End-User at the IssuerURL.","type":"string"},"updated_at":{"description":"Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.","format":"int64","type":"integer"},"website":{"description":"URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.","type":"string"},"zoneinfo":{"description":"String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.","type":"string"}},"type":"object"},"pagination":{"properties":{"page_size":{"default":250,"description":"Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":1000,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"type":"object"},"paginationHeaders":{"properties":{"link":{"description":"The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header","type":"string"},"x-total-count":{"description":"The total number of clients.\n\nin: header","type":"string"}},"type":"object"},"rejectOAuth2Request":{"properties":{"error":{"description":"The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`).\n\nDefaults to `request_denied`.","type":"string"},"error_debug":{"description":"Debug contains information to help resolve the problem as a developer. Usually not exposed\nto the public but only in the server logs.","type":"string"},"error_description":{"description":"Description of the error in a human readable format.","type":"string"},"error_hint":{"description":"Hint to help resolve the error.","type":"string"},"status_code":{"description":"Represents the HTTP status code of the error (e.g. 401 or 403)\n\nDefaults to 400","format":"int64","type":"integer"}},"title":"The request payload used to accept a login or consent request.","type":"object"},"tokenPagination":{"properties":{"page_size":{"default":250,"description":"Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":1000,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"type":"object"},"tokenPaginationHeaders":{"properties":{"link":{"description":"The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header","type":"string"},"x-total-count":{"description":"The total number of clients.\n\nin: header","type":"string"}},"type":"object"},"tokenPaginationRequestParameters":{"description":"The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","properties":{"page_size":{"default":250,"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":500,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"title":"Pagination Request Parameters","type":"object"},"tokenPaginationResponseHeaders":{"description":"The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","properties":{"link":{"description":"The Link HTTP Header\n\nThe `Link` header contains a comma-delimited list of links to the following pages:\n\nfirst: The first page of results.\nnext: The next page of results.\nprev: The previous page of results.\nlast: The last page of results.\n\nPages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples:\n\n; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\"","type":"string"},"x-total-count":{"description":"The X-Total-Count HTTP Header\n\nThe `X-Total-Count` header contains the total number of items in the collection.","format":"int64","type":"integer"}},"title":"Pagination Response Header","type":"object"},"trustOAuth2JwtGrantIssuer":{"description":"Trust OAuth2 JWT Bearer Grant Type Issuer Request Body","properties":{"allow_any_subject":{"description":"The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.","type":"boolean"},"expires_at":{"description":"The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".","format":"date-time","type":"string"},"issuer":{"description":"The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).","example":"https://jwt-idp.example.com","type":"string"},"jwk":{"$ref":"#/components/schemas/jsonWebKey"},"scope":{"description":"The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])","example":["openid","offline"],"items":{"type":"string"},"type":"array"},"subject":{"description":"The \"subject\" identifies the principal that is the subject of the JWT.","example":"mike@example.com","type":"string"}},"required":["issuer","scope","jwk","expires_at"],"type":"object"},"trustedOAuth2JwtGrantIssuer":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trust Relationship","properties":{"allow_any_subject":{"description":"The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.","type":"boolean"},"created_at":{"description":"The \"created_at\" indicates, when grant was created.","format":"date-time","type":"string"},"expires_at":{"description":"The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".","format":"date-time","type":"string"},"id":{"example":"9edc811f-4e28-453c-9b46-4de65f00217f","type":"string"},"issuer":{"description":"The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).","example":"https://jwt-idp.example.com","type":"string"},"public_key":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantJsonWebKey"},"scope":{"description":"The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])","example":["openid","offline"],"items":{"type":"string"},"type":"array"},"subject":{"description":"The \"subject\" identifies the principal that is the subject of the JWT.","example":"mike@example.com","type":"string"}},"type":"object"},"trustedOAuth2JwtGrantIssuers":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trust Relationships","items":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"},"type":"array"},"trustedOAuth2JwtGrantJsonWebKey":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key","properties":{"kid":{"description":"The \"key_id\" is key unique identifier (same as kid header in jws/jwt).","example":"123e4567-e89b-12d3-a456-426655440000","type":"string"},"set":{"description":"The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.","example":"https://jwt-idp.example.com","type":"string"}},"type":"object"},"unexpectedError":{"type":"string"},"verifiableCredentialPrimingResponse":{"properties":{"c_nonce":{"type":"string"},"c_nonce_expires_in":{"format":"int64","type":"integer"},"error":{"type":"string"},"error_debug":{"type":"string"},"error_description":{"type":"string"},"error_hint":{"type":"string"},"format":{"type":"string"},"status_code":{"format":"int64","type":"integer"}},"title":"VerifiableCredentialPrimingResponse contains the nonce to include in the proof-of-possession JWT.","type":"object"},"verifiableCredentialResponse":{"properties":{"credential_draft_00":{"type":"string"},"format":{"type":"string"}},"title":"VerifiableCredentialResponse contains the verifiable credential.","type":"object"},"version":{"properties":{"version":{"description":"Version is the service's version.","type":"string"}},"type":"object"}},"securitySchemes":{"basic":{"scheme":"basic","type":"http"},"bearer":{"scheme":"bearer","type":"http"},"oauth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://hydra.demo.ory.sh/oauth2/auth","scopes":{"offline":"A scope required when requesting refresh tokens (alias for `offline_access`)","offline_access":"A scope required when requesting refresh tokens","openid":"Request an OpenID Connect ID Token"},"tokenUrl":"https://hydra.demo.ory.sh/oauth2/token"}},"type":"oauth2"}}},"info":{"contact":{"email":"hi@ory.sh"},"description":"Documentation for all of Ory Hydra's APIs.\n","license":{"name":"Apache 2.0"},"title":"Ory Hydra API","version":"v2.2.0"},"openapi":"3.0.3","paths":{"/.well-known/jwks.json":{"get":{"description":"This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,\nif enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like\n[node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.","operationId":"discoverJsonWebKeys","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Discover Well-Known JSON Web Keys","tags":["wellknown"]}},"/.well-known/openid-configuration":{"get":{"description":"A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.\n\nPopular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others.\nFor a full list of clients go here: https://openid.net/developers/certified/","operationId":"discoverOidcConfiguration","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oidcConfiguration"}}},"description":"oidcConfiguration"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"OpenID Connect Discovery","tags":["oidc"]}},"/admin/clients":{"get":{"description":"This endpoint lists all clients in the database, and never returns client secrets.\nAs a default it lists the first 100 clients.","operationId":"listOAuth2Clients","parameters":[{"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_size","schema":{"default":250,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_token","schema":{"default":"1","minimum":1,"type":"string"}},{"description":"The name of the clients to filter by.","in":"query","name":"client_name","schema":{"type":"string"}},{"description":"The owner of the clients to filter by.","in":"query","name":"owner","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listOAuth2Clients"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"List OAuth 2.0 Clients","tags":["oAuth2"]},"post":{"description":"Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret\nis generated. The secret is echoed in the response. It is not possible to retrieve it later on.","operationId":"createOAuth2Client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Create OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/clients/{id}":{"delete":{"description":"Delete an existing OAuth 2.0 Client by its ID.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.\n\nMake sure that this endpoint is well protected and only callable by first-party components.","operationId":"deleteOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Delete OAuth 2.0 Client","tags":["oAuth2"]},"get":{"description":"Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"getOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Get an OAuth 2.0 Client","tags":["oAuth2"]},"patch":{"description":"Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`\nthe secret will be updated and returned via the API. This is the\nonly time you will be able to retrieve the client secret, so write it down and keep it safe.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"patchOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonPatchDocument"}}},"description":"OAuth 2.0 Client JSON Patch Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Patch OAuth 2.0 Client","tags":["oAuth2"]},"put":{"description":"Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used,\notherwise the existing secret is used.\n\nIf set, the secret is echoed in the response. It is not possible to retrieve it later on.\n\nOAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"setOAuth2Client","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Set OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/clients/{id}/lifespans":{"put":{"description":"Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.","operationId":"setOAuth2ClientLifespans","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ClientTokenLifespans"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Set OAuth2 Client Token Lifespans","tags":["oAuth2"]}},"/admin/keys/{set}":{"delete":{"description":"Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"deleteJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete JSON Web Key Set","tags":["jwk"]},"get":{"description":"This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"getJsonWebKeySet","parameters":[{"description":"JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Retrieve a JSON Web Key Set","tags":["jwk"]},"post":{"description":"This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"createJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createJsonWebKeySet"}}},"required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Create JSON Web Key","tags":["jwk"]},"put":{"description":"Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"setJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Update a JSON Web Key Set","tags":["jwk"]}},"/admin/keys/{set}/{kid}":{"delete":{"description":"Use this endpoint to delete a single JSON Web Key.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A\nJWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses\nthis functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens),\nand allows storing user-defined keys as well.","operationId":"deleteJsonWebKey","parameters":[{"description":"The JSON Web Key Set","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"The JSON Web Key ID (kid)","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete JSON Web Key","tags":["jwk"]},"get":{"description":"This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).","operationId":"getJsonWebKey","parameters":[{"description":"JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"JSON Web Key ID","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get JSON Web Key","tags":["jwk"]},"put":{"description":"Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"setJsonWebKey","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"JSON Web Key ID","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKey"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKey"}}},"description":"jsonWebKey"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Set JSON Web Key","tags":["jwk"]}},"/admin/oauth2/auth/requests/consent":{"get":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"getOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ConsentRequest"}}},"description":"oAuth2ConsentRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/consent/accept":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider includes additional information, such as session data for access and ID tokens, and if the\nconsent request should be used as basis for future requests.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"acceptOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequest"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/consent/reject":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider must include a reason why the consent was not granted.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"rejectOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectOAuth2Request"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login":{"get":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nPer default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app\nyou write and host, and it must be able to authenticate (\"show the subject a login screen\")\na subject (in OAuth2 the proper name for subject is \"resource owner\").\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.","operationId":"getOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2LoginRequest"}}},"description":"oAuth2LoginRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login/accept":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has successfully authenticated and includes additional information such as\nthe subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting\na cookie.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.","operationId":"acceptOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/acceptOAuth2LoginRequest"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login/reject":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication\nwas denied.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.","operationId":"rejectOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectOAuth2Request"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout":{"get":{"description":"Use this endpoint to fetch an Ory OAuth 2.0 logout request.","operationId":"getOAuth2LogoutRequest","parameters":[{"in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2LogoutRequest"}}},"description":"oAuth2LogoutRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout/accept":{"put":{"description":"When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.","operationId":"acceptOAuth2LogoutRequest","parameters":[{"description":"OAuth 2.0 Logout Request Challenge","in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout/reject":{"put":{"description":"When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request.\nNo HTTP request body is required.\n\nThe response is empty as the logout provider has to chose what action to perform next.","operationId":"rejectOAuth2LogoutRequest","parameters":[{"in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/sessions/consent":{"delete":{"description":"This endpoint revokes a subject's granted consent sessions and invalidates all\nassociated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.","operationId":"revokeOAuth2ConsentSessions","parameters":[{"description":"OAuth 2.0 Consent Subject\n\nThe subject whose consent sessions should be deleted.","in":"query","name":"subject","required":true,"schema":{"type":"string"}},{"description":"OAuth 2.0 Client ID\n\nIf set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.","in":"query","name":"client","schema":{"type":"string"}},{"description":"Revoke All Consent Sessions\n\nIf set to `true` deletes all consent sessions by the Subject that have been granted.","in":"query","name":"all","schema":{"type":"boolean"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Revoke OAuth 2.0 Consent Sessions of a Subject","tags":["oAuth2"]},"get":{"description":"This endpoint lists all subject's granted consent sessions, including client and granted scope.\nIf the subject is unknown or has not granted any consent sessions yet, the endpoint returns an\nempty JSON array with status code 200 OK.","operationId":"listOAuth2ConsentSessions","parameters":[{"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_size","schema":{"default":250,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_token","schema":{"default":"1","minimum":1,"type":"string"}},{"description":"The subject to list the consent sessions for.","in":"query","name":"subject","required":true,"schema":{"type":"string"}},{"description":"The login session id to list the consent sessions for.","in":"query","name":"login_session_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ConsentSessions"}}},"description":"oAuth2ConsentSessions"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"List OAuth 2.0 Consent Sessions of a Subject","tags":["oAuth2"]}},"/admin/oauth2/auth/sessions/login":{"delete":{"description":"This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf you send the subject in a query param, all authentication sessions that belong to that subject are revoked.\nNo OpenID Connect Front- or Back-channel logout is performed in this case.\n\nAlternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected\nto that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.","operationId":"revokeOAuth2LoginSessions","parameters":[{"description":"OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.","in":"query","name":"subject","schema":{"type":"string"}},{"description":"OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.","in":"query","name":"sid","schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID","tags":["oAuth2"]}},"/admin/oauth2/introspect":{"post":{"description":"The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token\nis neither expired nor revoked. If a token is active, additional information on the token will be included. You can\nset additional data for a token by setting `session.access_token` during the consent flow.","operationId":"introspectOAuth2Token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"scope":{"description":"An optional, space separated list of required scopes. If the access token was not granted one of the\nscopes, the result of active will be false.","type":"string","x-formData-name":"scope"},"token":{"description":"The string value of the token. For access tokens, this\nis the \"access_token\" value returned from the token endpoint\ndefined in OAuth 2.0. For refresh tokens, this is the \"refresh_token\"\nvalue returned.","required":["token"],"type":"string","x-formData-name":"token"}},"required":["token"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/introspectedOAuth2Token"}}},"description":"introspectedOAuth2Token"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Introspect OAuth2 Access and Refresh Tokens","tags":["oAuth2"]}},"/admin/oauth2/tokens":{"delete":{"description":"This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.","operationId":"deleteOAuth2Token","parameters":[{"description":"OAuth 2.0 Client ID","in":"query","name":"client_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/trust/grants/jwt-bearer/issuers":{"get":{"description":"Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.","operationId":"listTrustedOAuth2JwtGrantIssuers","parameters":[{"in":"query","name":"MaxItems","schema":{"format":"int64","type":"integer"}},{"in":"query","name":"DefaultItems","schema":{"format":"int64","type":"integer"}},{"description":"If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.","in":"query","name":"issuer","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuers"}}},"description":"trustedOAuth2JwtGrantIssuers"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"List Trusted OAuth2 JWT Bearer Grant Type Issuers","tags":["oAuth2"]},"post":{"description":"Use this endpoint to establish a trust relationship for a JWT issuer\nto perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication\nand Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).","operationId":"trustOAuth2JwtGrantIssuer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustOAuth2JwtGrantIssuer"}}},"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"}}},"description":"trustedOAuth2JwtGrantIssuer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Trust OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]}},"/admin/trust/grants/jwt-bearer/issuers/{id}":{"delete":{"description":"Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.\n\nOnce deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile\nfor OAuth 2.0 Client Authentication and Authorization Grant.","operationId":"deleteTrustedOAuth2JwtGrantIssuer","parameters":[{"description":"The id of the desired grant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Delete Trusted OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]},"get":{"description":"Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.","operationId":"getTrustedOAuth2JwtGrantIssuer","parameters":[{"description":"The id of the desired grant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"}}},"description":"trustedOAuth2JwtGrantIssuer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Get Trusted OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]}},"/credentials":{"post":{"description":"This endpoint creates a verifiable credential that attests that the user\nauthenticated with the provided access token owns a certain public/private key\npair.\n\nMore information can be found at\nhttps://openid.net/specs/openid-connect-userinfo-vc-1_0.html.","operationId":"createVerifiableCredential","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVerifiableCredentialRequestBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/verifiableCredentialResponse"}}},"description":"verifiableCredentialResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/verifiableCredentialPrimingResponse"}}},"description":"verifiableCredentialPrimingResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Issues a Verifiable Credential","tags":["oidc"]}},"/health/alive":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.","operationId":"isAlive","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/healthStatus"}}},"description":"Ory Hydra is ready to accept connections."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Check HTTP Server Status","tags":["metadata"]}},"/health/ready":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Hydra, the health status will never\nrefer to the cluster state, only to a single instance.","operationId":"isReady","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"Always \"ok\".","type":"string"}},"type":"object"}}},"description":"Ory Hydra is ready to accept requests."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"type":"object"}}},"description":"Ory Kratos is not yet ready to accept requests."}},"summary":"Check HTTP Server and Database Status","tags":["metadata"]}},"/oauth2/auth":{"get":{"description":"Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries at https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.","operationId":"oAuth2Authorize","responses":{"302":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"OAuth 2.0 Authorize Endpoint","tags":["oAuth2"]}},"/oauth2/register":{"post":{"description":"This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nPlease note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those\nvalues will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or\n`client_secret_post`.\n\nThe `client_secret` will be returned in the response and you will not be able to retrieve it later on.\nWrite the secret down and keep it somewhere safe.","operationId":"createOidcDynamicClient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"Dynamic Client Registration Request Body","required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Register OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]}},"/oauth2/register/{id}":{"delete":{"description":"This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"deleteOidcDynamicClient","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"security":[{"bearer":[]}],"summary":"Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol","tags":["oidc"]},"get":{"description":"This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.","operationId":"getOidcDynamicClient","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"security":[{"bearer":[]}],"summary":"Get OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]},"put":{"description":"This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the\npublic internet directly to be used by third parties. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nThis feature is disabled per default. It can be enabled by a system administrator.\n\nIf you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response.\nIt is not possible to retrieve it later on.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"setOidcDynamicClient","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"security":[{"bearer":[]}],"summary":"Set OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]}},"/oauth2/revoke":{"post":{"description":"Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by\nthe client the token was generated for.","operationId":"revokeOAuth2Token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"type":"string","x-formData-name":"client_id"},"client_secret":{"type":"string","x-formData-name":"client_secret"},"token":{"required":["token"],"type":"string","x-formData-name":"token"}},"required":["token"],"type":"object"}}}},"responses":{"200":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"basic":[]},{"oauth2":[]}],"summary":"Revoke OAuth 2.0 Access or Refresh Token","tags":["oAuth2"]}},"/oauth2/sessions/logout":{"get":{"description":"This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:\n\nhttps://openid.net/specs/openid-connect-frontchannel-1_0.html\nhttps://openid.net/specs/openid-connect-backchannel-1_0.html\n\nBack-channel logout is performed asynchronously and does not affect logout flow.","operationId":"revokeOidcSession","responses":{"302":{"$ref":"#/components/responses/emptyResponse"}},"summary":"OpenID Connect Front- and Back-channel Enabled Logout","tags":["oidc"]}},"/oauth2/token":{"post":{"description":"Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries here https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.","operationId":"oauth2TokenExchange","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"type":"string","x-formData-name":"client_id"},"code":{"type":"string","x-formData-name":"code"},"grant_type":{"required":["grant_type"],"type":"string","x-formData-name":"grant_type"},"redirect_uri":{"type":"string","x-formData-name":"redirect_uri"},"refresh_token":{"type":"string","x-formData-name":"refresh_token"}},"required":["grant_type"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2TokenExchange"}}},"description":"oAuth2TokenExchange"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"basic":[]},{"oauth2":[]}],"summary":"The OAuth 2.0 Token Endpoint","tags":["oAuth2"]}},"/userinfo":{"get":{"description":"This endpoint returns the payload of the ID Token, including `session.id_token` values, of\nthe provided OAuth 2.0 Access Token's consent request.\n\nIn the case of authentication error, a WWW-Authenticate header might be set in the response\nwith more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)\nfor more details about header format.","operationId":"getOidcUserInfo","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oidcUserInfo"}}},"description":"oidcUserInfo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"oauth2":[]}],"summary":"OpenID Connect Userinfo","tags":["oidc"]}},"/version":{"get":{"description":"This endpoint returns the version of Ory Hydra.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the version will never\nrefer to the cluster state, only to a single instance.","operationId":"getVersion","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"version":{"description":"The version of Ory Hydra.","type":"string"}},"type":"object"}}},"description":"Returns the Ory Hydra version."}},"summary":"Return Running Software Version.","tags":["metadata"]}}},"tags":[{"description":"OAuth 2.0","name":"oAuth2"},{"description":"OpenID Connect","name":"oidc"},{"description":"JSON Web Keys","name":"jwk"},{"description":"Well-Known Endpoints","name":"wellknown"},{"description":"Service Metadata","name":"metadata"}],"x-forwarded-proto":"string","x-request-id":"string"} +{"components":{"responses":{"emptyResponse":{"description":"Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201."},"errorOAuth2BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Bad Request Error Response"},"errorOAuth2Default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Default Error Response"},"errorOAuth2NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"Not Found Error Response"},"listOAuth2Clients":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oAuth2Client"},"type":"array"}}},"description":"Paginated OAuth2 Client List Response"}},"schemas":{"CreateVerifiableCredentialRequestBody":{"properties":{"format":{"type":"string"},"proof":{"$ref":"#/components/schemas/VerifiableCredentialProof"},"types":{"items":{"type":"string"},"type":"array"}},"title":"CreateVerifiableCredentialRequestBody contains the request body to request a verifiable credential.","type":"object"},"DefaultError":{},"JSONRawMessage":{"title":"JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger."},"NullBool":{"nullable":true,"type":"boolean"},"NullDuration":{"description":"Specify a time duration in milliseconds, seconds, minutes, hours.","pattern":"^([0-9]+(ns|us|ms|s|m|h))*$","title":"Time duration","type":"string"},"NullInt":{"nullable":true,"type":"integer"},"NullString":{"nullable":true,"type":"string"},"NullTime":{"format":"date-time","nullable":true,"type":"string"},"NullUUID":{"format":"uuid4","nullable":true,"type":"string"},"RFC6749ErrorJson":{"properties":{"error":{"type":"string"},"error_debug":{"type":"string"},"error_description":{"type":"string"},"error_hint":{"type":"string"},"status_code":{"format":"int64","type":"integer"}},"title":"RFC6749ErrorJson is a helper struct for JSON encoding/decoding of RFC6749Error.","type":"object"},"StringSliceJSONFormat":{"items":{"type":"string"},"title":"StringSliceJSONFormat represents []string{} which is encoded to/from JSON for SQL storage.","type":"array"},"Time":{"format":"date-time","type":"string"},"UUID":{"format":"uuid4","type":"string"},"VerifiableCredentialProof":{"properties":{"jwt":{"type":"string"},"proof_type":{"type":"string"}},"title":"VerifiableCredentialProof contains the proof of a verifiable credential.","type":"object"},"acceptOAuth2ConsentRequest":{"properties":{"context":{"$ref":"#/components/schemas/JSONRawMessage"},"grant_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"grant_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"handled_at":{"$ref":"#/components/schemas/nullTime"},"remember":{"description":"Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.","type":"boolean"},"remember_for":{"description":"RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.","format":"int64","type":"integer"},"session":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequestSession"}},"title":"The request payload used to accept a consent request.","type":"object"},"acceptOAuth2ConsentRequestSession":{"properties":{"access_token":{"description":"AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the\nrefresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.\nIf only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties\ncan access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!"},"id_token":{"description":"IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable\nby anyone that has access to the ID Challenge. Use with care!"}},"title":"Pass session data to a consent request.","type":"object"},"acceptOAuth2LoginRequest":{"properties":{"acr":{"description":"ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.","type":"string"},"amr":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"extend_session_lifespan":{"description":"Extend OAuth2 authentication session lifespan\n\nIf set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously.\n\nThis value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.","type":"boolean"},"force_subject_identifier":{"description":"ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the\n(Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID\nConnect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client.\n\nPlease note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the\nsub claim in the OAuth 2.0 Introspection.\n\nPer default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself\nyou can use this field. Please note that setting this field has no effect if `pairwise` is not configured in\nORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's\nconfiguration).\n\nPlease also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies\nthat you have to compute this value on every authentication process (probably depending on the client ID or some\nother unique value).\n\nIf you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.","type":"string"},"identity_provider_session_id":{"description":"IdentityProviderSessionID is the session ID of the end-user that authenticated.\nIf specified, we will use this value to propagate the logout.","type":"string"},"remember":{"description":"Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store\na cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she\nwill not be asked to log in again.","type":"boolean"},"remember_for":{"description":"RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered for the duration of the browser session (using a session cookie).","format":"int64","type":"integer"},"subject":{"description":"Subject is the user ID of the end-user that authenticated.","type":"string"}},"required":["subject"],"title":"HandledLoginRequest is the request payload used to accept a login request.","type":"object"},"createJsonWebKeySet":{"description":"Create JSON Web Key Set Request Body","properties":{"alg":{"description":"JSON Web Key Algorithm\n\nThe algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.","type":"string"},"kid":{"description":"JSON Web Key ID\n\nThe Key ID of the key to be created.","type":"string"},"use":{"description":"JSON Web Key Use\n\nThe \"use\" (public key use) parameter identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Valid values are \"enc\" and \"sig\".","type":"string"}},"required":["alg","use","kid"],"type":"object"},"credentialSupportedDraft00":{"description":"Includes information about the supported verifiable credentials.","properties":{"cryptographic_binding_methods_supported":{"description":"OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported\n\nContains a list of cryptographic binding methods supported for signing the proof.","items":{"type":"string"},"type":"array"},"cryptographic_suites_supported":{"description":"OpenID Connect Verifiable Credentials Cryptographic Suites Supported\n\nContains a list of cryptographic suites methods supported for signing the proof.","items":{"type":"string"},"type":"array"},"format":{"description":"OpenID Connect Verifiable Credentials Format\n\nContains the format that is supported by this authorization server.","type":"string"},"types":{"description":"OpenID Connect Verifiable Credentials Types\n\nContains the types of verifiable credentials supported.","items":{"type":"string"},"type":"array"}},"title":"Verifiable Credentials Metadata (Draft 00)","type":"object"},"errorOAuth2":{"description":"Error","properties":{"error":{"description":"Error","type":"string"},"error_debug":{"description":"Error Debug Information\n\nOnly available in dev mode.","type":"string"},"error_description":{"description":"Error Description","type":"string"},"error_hint":{"description":"Error Hint\n\nHelps the user identify the error cause.","example":"The redirect URL is not allowed.","type":"string"},"status_code":{"description":"HTTP Status Code","example":401,"format":"int64","type":"integer"}},"type":"object"},"genericError":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.","example":"SQL field \"foo\" is not a bool.","type":"string"},"details":{"description":"Further error details"},"id":{"description":"The error ID\n\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\n\nThe error's message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"request":{"description":"The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message"],"type":"object"},"healthNotReadyStatus":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"type":"object"},"healthStatus":{"properties":{"status":{"description":"Status always contains \"ok\".","type":"string"}},"type":"object"},"introspectedOAuth2Token":{"description":"Introspection contains an access token's session data as specified by\n[IETF RFC 7662](https://tools.ietf.org/html/rfc7662)","properties":{"active":{"description":"Active is a boolean indicator of whether or not the presented token\nis currently active. The specifics of a token's \"active\" state\nwill vary depending on the implementation of the authorization\nserver and the information it keeps about its tokens, but a \"true\"\nvalue return for the \"active\" property will generally indicate\nthat a given token has been issued by this authorization server,\nhas not been revoked by the resource owner, and is within its\ngiven time window of validity (e.g., after its issuance time and\nbefore its expiration time).","type":"boolean"},"aud":{"description":"Audience contains a list of the token's intended audiences.","items":{"type":"string"},"type":"array"},"client_id":{"description":"ID is aclient identifier for the OAuth 2.0 client that\nrequested this token.","type":"string"},"exp":{"description":"Expires at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token will expire.","format":"int64","type":"integer"},"ext":{"additionalProperties":{},"description":"Extra is arbitrary data set by the session.","type":"object"},"iat":{"description":"Issued at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token was\noriginally issued.","format":"int64","type":"integer"},"iss":{"description":"IssuerURL is a string representing the issuer of this token","type":"string"},"nbf":{"description":"NotBefore is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token is not to be\nused before.","format":"int64","type":"integer"},"obfuscated_subject":{"description":"ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization.\nIt is the `sub` value of the ID Token that was issued.","type":"string"},"scope":{"description":"Scope is a JSON string containing a space-separated list of\nscopes associated with this token.","type":"string"},"sub":{"description":"Subject of the token, as defined in JWT [RFC7519].\nUsually a machine-readable identifier of the resource owner who\nauthorized this token.","type":"string"},"token_type":{"description":"TokenType is the introspected token's type, typically `Bearer`.","type":"string"},"token_use":{"description":"TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.","type":"string"},"username":{"description":"Username is a human-readable identifier for the resource owner who\nauthorized this token.","type":"string"}},"required":["active"],"type":"object"},"jsonPatch":{"description":"A JSONPatch document as defined by RFC 6902","properties":{"from":{"description":"This field is used together with operation \"move\" and uses JSON Pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"/name","type":"string"},"op":{"description":"The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".","example":"replace","type":"string"},"path":{"description":"The path to the target path. Uses JSON pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"/name","type":"string"},"value":{"description":"The value to be used within the operations.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).","example":"foobar"}},"required":["op","path"],"type":"object"},"jsonPatchDocument":{"description":"A JSONPatchDocument request","items":{"$ref":"#/components/schemas/jsonPatch"},"type":"array"},"jsonWebKey":{"properties":{"alg":{"description":"The \"alg\" (algorithm) parameter identifies the algorithm intended for\nuse with the key. The values used should either be registered in the\nIANA \"JSON Web Signature and Encryption Algorithms\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name.","example":"RS256","type":"string"},"crv":{"example":"P-256","type":"string"},"d":{"example":"T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE","type":"string"},"dp":{"example":"G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0","type":"string"},"dq":{"example":"s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk","type":"string"},"e":{"example":"AQAB","type":"string"},"k":{"example":"GawgguFyGrWKav7AX4VKUg","type":"string"},"kid":{"description":"The \"kid\" (key ID) parameter is used to match a specific key. This\nis used, for instance, to choose among a set of keys within a JWK Set\nduring key rollover. The structure of the \"kid\" value is\nunspecified. When \"kid\" values are used within a JWK Set, different\nkeys within the JWK Set SHOULD use distinct \"kid\" values. (One\nexample in which different keys might use the same \"kid\" value is if\nthey have different \"kty\" (key type) values but are considered to be\nequivalent alternatives by the application using them.) The \"kid\"\nvalue is a case-sensitive string.","example":"1603dfe0af8f4596","type":"string"},"kty":{"description":"The \"kty\" (key type) parameter identifies the cryptographic algorithm\nfamily used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\neither be registered in the IANA \"JSON Web Key Types\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name. The \"kty\" value is a case-sensitive string.","example":"RSA","type":"string"},"n":{"example":"vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0","type":"string"},"p":{"example":"6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ","type":"string"},"q":{"example":"0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ","type":"string"},"qi":{"example":"GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU","type":"string"},"use":{"description":"Use (\"public key use\") identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).","example":"sig","type":"string"},"x":{"example":"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU","type":"string"},"x5c":{"description":"The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\nor more PKIX certificates [RFC5280]. The certificate chain is\nrepresented as a JSON array of certificate value strings. Each\nstring in the array is a base64-encoded (Section 4 of [RFC4648] --\nnot base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\nThe PKIX certificate containing the key value MUST be the first\ncertificate.","items":{"type":"string"},"type":"array"},"y":{"example":"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0","type":"string"}},"required":["use","kty","kid","alg"],"type":"object"},"jsonWebKeySet":{"description":"JSON Web Key Set","properties":{"keys":{"description":"List of JSON Web Keys\n\nThe value of the \"keys\" parameter is an array of JSON Web Key (JWK)\nvalues. By default, the order of the JWK values within the array does\nnot imply an order of preference among them, although applications\nof JWK Sets can choose to assign a meaning to the order for their\npurposes, if desired.","items":{"$ref":"#/components/schemas/jsonWebKey"},"type":"array"}},"type":"object"},"nullDuration":{"nullable":true,"pattern":"^[0-9]+(ns|us|ms|s|m|h)$","type":"string"},"nullInt64":{"nullable":true,"type":"integer"},"nullTime":{"format":"date-time","title":"NullTime implements sql.NullTime functionality.","type":"string"},"oAuth2Client":{"description":"OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","properties":{"access_token_strategy":{"description":"OAuth 2.0 Access Token Strategy\n\nAccessTokenStrategy is the strategy used to generate access tokens.\nValid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens\nSetting the stragegy here overrides the global setting in `strategies.access_token`.","type":"string"},"allowed_cors_origins":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"authorization_code_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"backchannel_logout_session_required":{"description":"OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout\nToken to identify the RP session with the OP when the backchannel_logout_uri is used.\nIf omitted, the default value is false.","type":"boolean"},"backchannel_logout_uri":{"description":"OpenID Connect Back-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when sent a Logout Token by the OP.","type":"string"},"client_credentials_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"client_id":{"description":"OAuth 2.0 Client ID\n\nThe ID is immutable. If no ID is provided, a UUID4 will be generated.","type":"string"},"client_name":{"description":"OAuth 2.0 Client Name\n\nThe human-readable name of the client to be presented to the\nend-user during authorization.","type":"string"},"client_secret":{"description":"OAuth 2.0 Client Secret\n\nThe secret will be included in the create request as cleartext, and then\nnever again. The secret is kept in hashed format and is not recoverable once lost.","type":"string"},"client_secret_expires_at":{"description":"OAuth 2.0 Client Secret Expires At\n\nThe field is currently not supported and its value is always 0.","format":"int64","type":"integer"},"client_uri":{"description":"OAuth 2.0 Client URI\n\nClientURI is a URL string of a web page providing information about the client.\nIf present, the server SHOULD display this URL to the end-user in\na clickable fashion.","type":"string"},"contacts":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"created_at":{"description":"OAuth 2.0 Client Creation Date\n\nCreatedAt returns the timestamp of the client's creation.","format":"date-time","type":"string"},"frontchannel_logout_session_required":{"description":"OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be\nincluded to identify the RP session with the OP when the frontchannel_logout_uri is used.\nIf omitted, the default value is false.","type":"boolean"},"frontchannel_logout_uri":{"description":"OpenID Connect Front-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query\nparameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the\nrequest and to determine which of the potentially multiple sessions is to be logged out; if either is\nincluded, both MUST be.","type":"string"},"grant_types":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"implicit_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"jwks":{"description":"OAuth 2.0 Client JSON Web Key Set\n\nClient's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as\nthe jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter\nis intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for\ninstance, by native applications that might not have a location to host the contents of the JWK Set. If a Client\ncan use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation\n(which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks\nparameters MUST NOT be used together."},"jwks_uri":{"description":"OAuth 2.0 Client JSON Web Key Set URL\n\nURL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains\nthe signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the\nClient's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing\nand encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced\nJWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both\nsignatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used\nto provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST\nmatch those in the certificate.","type":"string"},"jwt_bearer_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"logo_uri":{"description":"OAuth 2.0 Client Logo URI\n\nA URL string referencing the client's logo.","type":"string"},"metadata":{"$ref":"#/components/schemas/JSONRawMessage"},"owner":{"description":"OAuth 2.0 Client Owner\n\nOwner is a string identifying the owner of the OAuth 2.0 Client.","type":"string"},"policy_uri":{"description":"OAuth 2.0 Client Policy URI\n\nPolicyURI is a URL string that points to a human-readable privacy policy document\nthat describes how the deployment organization collects, uses,\nretains, and discloses personal data.","type":"string"},"post_logout_redirect_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"redirect_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"refresh_token_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"registration_access_token":{"description":"OpenID Connect Dynamic Client Registration Access Token\n\nRegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client\nusing Dynamic Client Registration.","type":"string"},"registration_client_uri":{"description":"OpenID Connect Dynamic Client Registration URL\n\nRegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.","type":"string"},"request_object_signing_alg":{"description":"OpenID Connect Request Object Signing Algorithm\n\nJWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects\nfrom this Client MUST be rejected, if not signed with this algorithm.","type":"string"},"request_uris":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"response_types":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"scope":{"description":"OAuth 2.0 Client Scope\n\nScope is a string containing a space-separated list of scope values (as\ndescribed in Section 3.3 of OAuth 2.0 [RFC6749]) that the client\ncan use when requesting access tokens.","example":"scope1 scope-2 scope.3 scope:4","type":"string"},"sector_identifier_uri":{"description":"OpenID Connect Sector Identifier URI\n\nURL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a\nfile with a single JSON array of redirect_uri values.","type":"string"},"skip_consent":{"description":"SkipConsent skips the consent screen for this client. This field can only\nbe set from the admin API.","type":"boolean"},"skip_logout_consent":{"description":"SkipLogoutConsent skips the logout consent screen for this client. This field can only\nbe set from the admin API.","type":"boolean"},"subject_type":{"description":"OpenID Connect Subject Type\n\nThe `subject_types_supported` Discovery parameter contains a\nlist of the supported subject_type values for this server. Valid types include `pairwise` and `public`.","type":"string"},"token_endpoint_auth_method":{"default":"client_secret_basic","description":"OAuth 2.0 Token Endpoint Authentication Method\n\nRequested Client Authentication method for the Token Endpoint. The options are:\n\n`client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header.\n`client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body.\n`private_key_jwt`: Use JSON Web Tokens to authenticate the client.\n`none`: Used for public clients (native apps, mobile apps) which can not have secrets.","type":"string"},"token_endpoint_auth_signing_alg":{"description":"OAuth 2.0 Token Endpoint Signing Algorithm\n\nRequested Client Authentication signing algorithm for the Token Endpoint.","type":"string"},"tos_uri":{"description":"OAuth 2.0 Client Terms of Service URI\n\nA URL string pointing to a human-readable terms of service\ndocument for the client that describes a contractual relationship\nbetween the end-user and the client that the end-user accepts when\nauthorizing the client.","type":"string"},"updated_at":{"description":"OAuth 2.0 Client Last Update Date\n\nUpdatedAt returns the timestamp of the last update.","format":"date-time","type":"string"},"userinfo_signed_response_alg":{"description":"OpenID Connect Request Userinfo Signed Response Algorithm\n\nJWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT\n[JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims\nas a UTF-8 encoded JSON object using the application/json content-type.","type":"string"}},"title":"OAuth 2.0 Client","type":"object"},"oAuth2ClientTokenLifespans":{"description":"Lifespans of different token types issued for this OAuth 2.0 Client.","properties":{"authorization_code_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"authorization_code_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"client_credentials_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"implicit_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"jwt_bearer_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_access_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_id_token_lifespan":{"$ref":"#/components/schemas/NullDuration"},"refresh_token_grant_refresh_token_lifespan":{"$ref":"#/components/schemas/NullDuration"}},"title":"OAuth 2.0 Client Token Lifespans","type":"object"},"oAuth2ConsentRequest":{"properties":{"acr":{"description":"ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.","type":"string"},"amr":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"challenge":{"description":"ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"login_challenge":{"description":"LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate\na login and consent request in the login & consent app.","type":"string"},"login_session_id":{"description":"LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.","type":"string"},"oidc_context":{"$ref":"#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext"},"request_url":{"description":"RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.","type":"string"},"requested_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"requested_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"skip":{"description":"Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you must not ask the user to grant the requested scopes. You must however either allow or deny the\nconsent request using the usual API call.","type":"boolean"},"subject":{"description":"Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client.","type":"string"}},"required":["challenge"],"title":"Contains information on an ongoing consent request.","type":"object"},"oAuth2ConsentRequestOpenIDConnectContext":{"properties":{"acr_values":{"description":"ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request.\nIt is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.\n\nOpenID Connect defines it as follows:\n> Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values\nthat the Authorization Server is being requested to use for processing this Authentication Request, with the\nvalues appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication\nperformed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a\nVoluntary Claim by this parameter.","items":{"type":"string"},"type":"array"},"display":{"description":"Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.\nThe defined values are:\npage: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode.\npopup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over.\ntouch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface.\nwap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display.\n\nThe Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.","type":"string"},"id_token_hint_claims":{"additionalProperties":{},"description":"IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the\nEnd-User's current or past authenticated session with the Client.","type":"object"},"login_hint":{"description":"LoginHint hints about the login identifier the End-User might use to log in (if necessary).\nThis hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier)\nand then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a\nphone number in the format specified for the phone_number Claim. The use of this parameter is optional.","type":"string"},"ui_locales":{"description":"UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a\nspace-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value\n\"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation),\nfollowed by English (without a region designation). An error SHOULD NOT result if some or all of the requested\nlocales are not supported by the OpenID Provider.","items":{"type":"string"},"type":"array"}},"title":"Contains optional information about the OpenID Connect request.","type":"object"},"oAuth2ConsentSession":{"description":"A completed OAuth 2.0 Consent Session.","properties":{"consent_request":{"$ref":"#/components/schemas/oAuth2ConsentRequest"},"context":{"$ref":"#/components/schemas/JSONRawMessage"},"expires_at":{"properties":{"access_token":{"format":"date-time","type":"string"},"authorize_code":{"format":"date-time","type":"string"},"id_token":{"format":"date-time","type":"string"},"par_context":{"format":"date-time","type":"string"},"refresh_token":{"format":"date-time","type":"string"}},"type":"object"},"grant_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"grant_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"handled_at":{"$ref":"#/components/schemas/nullTime"},"remember":{"description":"Remember Consent\n\nRemember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.","type":"boolean"},"remember_for":{"description":"Remember Consent For\n\nRememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.","format":"int64","type":"integer"},"session":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequestSession"}},"title":"OAuth 2.0 Consent Session","type":"object"},"oAuth2ConsentSessions":{"description":"List of OAuth 2.0 Consent Sessions","items":{"$ref":"#/components/schemas/oAuth2ConsentSession"},"type":"array"},"oAuth2LoginRequest":{"properties":{"challenge":{"description":"ID is the identifier (\"login challenge\") of the login request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"oidc_context":{"$ref":"#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext"},"request_url":{"description":"RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.","type":"string"},"requested_access_token_audience":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"requested_scope":{"$ref":"#/components/schemas/StringSliceJSONFormat"},"session_id":{"description":"SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.","type":"string"},"skip":{"description":"Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL.\n\nThis feature allows you to update / set session information.","type":"boolean"},"subject":{"description":"Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type\nwhen accepting the login request, or the request will fail.","type":"string"}},"required":["challenge","skip","subject","client","request_url"],"title":"Contains information on an ongoing login request.","type":"object"},"oAuth2LogoutRequest":{"properties":{"challenge":{"description":"Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to\nidentify the session.","type":"string"},"client":{"$ref":"#/components/schemas/oAuth2Client"},"request_url":{"description":"RequestURL is the original Logout URL requested.","type":"string"},"rp_initiated":{"description":"RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.","type":"boolean"},"sid":{"description":"SessionID is the login session ID that was requested to log out.","type":"string"},"subject":{"description":"Subject is the user for whom the logout was request.","type":"string"}},"title":"Contains information about an ongoing logout request.","type":"object"},"oAuth2RedirectTo":{"description":"Contains a redirect URL used to complete a login, consent, or logout request.","properties":{"redirect_to":{"description":"RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.","type":"string"}},"required":["redirect_to"],"title":"OAuth 2.0 Redirect Browser To","type":"object"},"oAuth2TokenExchange":{"description":"OAuth2 Token Exchange Result","properties":{"access_token":{"description":"The access token issued by the authorization server.","type":"string"},"expires_in":{"description":"The lifetime in seconds of the access token. For\nexample, the value \"3600\" denotes that the access token will\nexpire in one hour from the time the response was generated.","format":"int64","type":"integer"},"id_token":{"description":"To retrieve a refresh token request the id_token scope.","type":"string"},"refresh_token":{"description":"The refresh token, which can be used to obtain new\naccess tokens. To retrieve it add the scope \"offline\" to your access token request.","type":"string"},"scope":{"description":"The scope of the access token","type":"string"},"token_type":{"description":"The type of the token issued","type":"string"}},"type":"object"},"oidcConfiguration":{"description":"Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms\namong others.","properties":{"authorization_endpoint":{"description":"OAuth 2.0 Authorization Endpoint URL","example":"https://playground.ory.sh/ory-hydra/public/oauth2/auth","type":"string"},"backchannel_logout_session_supported":{"description":"OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP\nsession with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP","type":"boolean"},"backchannel_logout_supported":{"description":"OpenID Connect Back-Channel Logout Supported\n\nBoolean value specifying whether the OP supports back-channel logout, with true indicating support.","type":"boolean"},"claims_parameter_supported":{"description":"OpenID Connect Claims Parameter Parameter Supported\n\nBoolean value specifying whether the OP supports use of the claims parameter, with true indicating support.","type":"boolean"},"claims_supported":{"description":"OpenID Connect Supported Claims\n\nJSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply\nvalues for. Note that for privacy or other reasons, this might not be an exhaustive list.","items":{"type":"string"},"type":"array"},"code_challenge_methods_supported":{"description":"OAuth 2.0 PKCE Supported Code Challenge Methods\n\nJSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported\nby this authorization server.","items":{"type":"string"},"type":"array"},"credentials_endpoint_draft_00":{"description":"OpenID Connect Verifiable Credentials Endpoint\n\nContains the URL of the Verifiable Credentials Endpoint.","type":"string"},"credentials_supported_draft_00":{"description":"OpenID Connect Verifiable Credentials Supported\n\nJSON array containing a list of the Verifiable Credentials supported by this authorization server.","items":{"$ref":"#/components/schemas/credentialSupportedDraft00"},"type":"array"},"end_session_endpoint":{"description":"OpenID Connect End-Session Endpoint\n\nURL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.","type":"string"},"frontchannel_logout_session_supported":{"description":"OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify\nthe RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also\nincluded in ID Tokens issued by the OP.","type":"boolean"},"frontchannel_logout_supported":{"description":"OpenID Connect Front-Channel Logout Supported\n\nBoolean value specifying whether the OP supports HTTP-based logout, with true indicating support.","type":"boolean"},"grant_types_supported":{"description":"OAuth 2.0 Supported Grant Types\n\nJSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.","items":{"type":"string"},"type":"array"},"id_token_signed_response_alg":{"description":"OpenID Connect Default ID Token Signing Algorithms\n\nAlgorithm used to sign OpenID Connect ID Tokens.","items":{"type":"string"},"type":"array"},"id_token_signing_alg_values_supported":{"description":"OpenID Connect Supported ID Token Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token\nto encode the Claims in a JWT.","items":{"type":"string"},"type":"array"},"issuer":{"description":"OpenID Connect Issuer URL\n\nAn URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier.\nIf IssuerURL discovery is supported , this value MUST be identical to the issuer value returned\nby WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.","example":"https://playground.ory.sh/ory-hydra/public/","type":"string"},"jwks_uri":{"description":"OpenID Connect Well-Known JSON Web Keys URL\n\nURL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate\nsignatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs\nto encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)\nparameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.\nAlthough some algorithms allow the same key to be used for both signatures and encryption, doing so is\nNOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of\nkeys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.","example":"https://{slug}.projects.oryapis.com/.well-known/jwks.json","type":"string"},"registration_endpoint":{"description":"OpenID Connect Dynamic Client Registration Endpoint URL","example":"https://playground.ory.sh/ory-hydra/admin/client","type":"string"},"request_object_signing_alg_values_supported":{"description":"OpenID Connect Supported Request Object Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects,\nwhich are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when\nthe Request Object is passed by value (using the request parameter) and when it is passed by reference\n(using the request_uri parameter).","items":{"type":"string"},"type":"array"},"request_parameter_supported":{"description":"OpenID Connect Request Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request parameter, with true indicating support.","type":"boolean"},"request_uri_parameter_supported":{"description":"OpenID Connect Request URI Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.","type":"boolean"},"require_request_uri_registration":{"description":"OpenID Connect Requires Request URI Registration\n\nBoolean value specifying whether the OP requires any request_uri values used to be pre-registered\nusing the request_uris registration parameter.","type":"boolean"},"response_modes_supported":{"description":"OAuth 2.0 Supported Response Modes\n\nJSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.","items":{"type":"string"},"type":"array"},"response_types_supported":{"description":"OAuth 2.0 Supported Response Types\n\nJSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID\nProviders MUST support the code, id_token, and the token id_token Response Type values.","items":{"type":"string"},"type":"array"},"revocation_endpoint":{"description":"OAuth 2.0 Token Revocation URL\n\nURL of the authorization server's OAuth 2.0 revocation endpoint.","type":"string"},"scopes_supported":{"description":"OAuth 2.0 Supported Scope Values\n\nJSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST\nsupport the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used","items":{"type":"string"},"type":"array"},"subject_types_supported":{"description":"OpenID Connect Supported Subject Types\n\nJSON array containing a list of the Subject Identifier types that this OP supports. Valid types include\npairwise and public.","items":{"type":"string"},"type":"array"},"token_endpoint":{"description":"OAuth 2.0 Token Endpoint URL","example":"https://playground.ory.sh/ory-hydra/public/oauth2/token","type":"string"},"token_endpoint_auth_methods_supported":{"description":"OAuth 2.0 Supported Client Authentication Methods\n\nJSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are\nclient_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0","items":{"type":"string"},"type":"array"},"userinfo_endpoint":{"description":"OpenID Connect Userinfo URL\n\nURL of the OP's UserInfo Endpoint.","type":"string"},"userinfo_signed_response_alg":{"description":"OpenID Connect User Userinfo Signing Algorithm\n\nAlgorithm used to sign OpenID Connect Userinfo Responses.","items":{"type":"string"},"type":"array"},"userinfo_signing_alg_values_supported":{"description":"OpenID Connect Supported Userinfo Signing Algorithm\n\nJSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].","items":{"type":"string"},"type":"array"}},"required":["issuer","authorization_endpoint","token_endpoint","jwks_uri","subject_types_supported","response_types_supported","id_token_signing_alg_values_supported","id_token_signed_response_alg","userinfo_signed_response_alg"],"title":"OpenID Connect Discovery Metadata","type":"object"},"oidcUserInfo":{"description":"OpenID Connect Userinfo","properties":{"birthdate":{"description":"End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.","type":"string"},"email":{"description":"End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.","type":"string"},"email_verified":{"description":"True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.","type":"boolean"},"family_name":{"description":"Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.","type":"string"},"gender":{"description":"End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.","type":"string"},"given_name":{"description":"Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.","type":"string"},"locale":{"description":"End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.","type":"string"},"middle_name":{"description":"Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.","type":"string"},"name":{"description":"End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.","type":"string"},"nickname":{"description":"Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.","type":"string"},"phone_number":{"description":"End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.","type":"string"},"phone_number_verified":{"description":"True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.","type":"boolean"},"picture":{"description":"URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.","type":"string"},"preferred_username":{"description":"Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.","type":"string"},"profile":{"description":"URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.","type":"string"},"sub":{"description":"Subject - Identifier for the End-User at the IssuerURL.","type":"string"},"updated_at":{"description":"Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.","format":"int64","type":"integer"},"website":{"description":"URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.","type":"string"},"zoneinfo":{"description":"String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.","type":"string"}},"type":"object"},"pagination":{"properties":{"page_size":{"default":250,"description":"Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":1000,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"type":"object"},"paginationHeaders":{"properties":{"link":{"description":"The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header","type":"string"},"x-total-count":{"description":"The total number of clients.\n\nin: header","type":"string"}},"type":"object"},"rejectOAuth2Request":{"properties":{"error":{"description":"The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`).\n\nDefaults to `request_denied`.","type":"string"},"error_debug":{"description":"Debug contains information to help resolve the problem as a developer. Usually not exposed\nto the public but only in the server logs.","type":"string"},"error_description":{"description":"Description of the error in a human readable format.","type":"string"},"error_hint":{"description":"Hint to help resolve the error.","type":"string"},"status_code":{"description":"Represents the HTTP status code of the error (e.g. 401 or 403)\n\nDefaults to 400","format":"int64","type":"integer"}},"title":"The request payload used to accept a login or consent request.","type":"object"},"tokenPagination":{"properties":{"page_size":{"default":250,"description":"Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":1000,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"type":"object"},"tokenPaginationHeaders":{"properties":{"link":{"description":"The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header","type":"string"},"x-total-count":{"description":"The total number of clients.\n\nin: header","type":"string"}},"type":"object"},"tokenPaginationRequestParameters":{"description":"The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","properties":{"page_size":{"default":250,"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","format":"int64","maximum":500,"minimum":1,"type":"integer"},"page_token":{"default":"1","description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","minimum":1,"type":"string"}},"title":"Pagination Request Parameters","type":"object"},"tokenPaginationResponseHeaders":{"description":"The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","properties":{"link":{"description":"The Link HTTP Header\n\nThe `Link` header contains a comma-delimited list of links to the following pages:\n\nfirst: The first page of results.\nnext: The next page of results.\nprev: The previous page of results.\nlast: The last page of results.\n\nPages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples:\n\n; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\"","type":"string"},"x-total-count":{"description":"The X-Total-Count HTTP Header\n\nThe `X-Total-Count` header contains the total number of items in the collection.","format":"int64","type":"integer"}},"title":"Pagination Response Header","type":"object"},"trustOAuth2JwtGrantIssuer":{"description":"Trust OAuth2 JWT Bearer Grant Type Issuer Request Body","properties":{"allow_any_subject":{"description":"The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.","type":"boolean"},"expires_at":{"description":"The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".","format":"date-time","type":"string"},"issuer":{"description":"The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).","example":"https://jwt-idp.example.com","type":"string"},"jwk":{"$ref":"#/components/schemas/jsonWebKey"},"scope":{"description":"The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])","example":["openid","offline"],"items":{"type":"string"},"type":"array"},"subject":{"description":"The \"subject\" identifies the principal that is the subject of the JWT.","example":"mike@example.com","type":"string"}},"required":["issuer","scope","jwk","expires_at"],"type":"object"},"trustedOAuth2JwtGrantIssuer":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trust Relationship","properties":{"allow_any_subject":{"description":"The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.","type":"boolean"},"created_at":{"description":"The \"created_at\" indicates, when grant was created.","format":"date-time","type":"string"},"expires_at":{"description":"The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".","format":"date-time","type":"string"},"id":{"example":"9edc811f-4e28-453c-9b46-4de65f00217f","type":"string"},"issuer":{"description":"The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).","example":"https://jwt-idp.example.com","type":"string"},"public_key":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantJsonWebKey"},"scope":{"description":"The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])","example":["openid","offline"],"items":{"type":"string"},"type":"array"},"subject":{"description":"The \"subject\" identifies the principal that is the subject of the JWT.","example":"mike@example.com","type":"string"}},"type":"object"},"trustedOAuth2JwtGrantIssuers":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trust Relationships","items":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"},"type":"array"},"trustedOAuth2JwtGrantJsonWebKey":{"description":"OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key","properties":{"kid":{"description":"The \"key_id\" is key unique identifier (same as kid header in jws/jwt).","example":"123e4567-e89b-12d3-a456-426655440000","type":"string"},"set":{"description":"The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.","example":"https://jwt-idp.example.com","type":"string"}},"type":"object"},"unexpectedError":{"type":"string"},"verifiableCredentialPrimingResponse":{"properties":{"c_nonce":{"type":"string"},"c_nonce_expires_in":{"format":"int64","type":"integer"},"error":{"type":"string"},"error_debug":{"type":"string"},"error_description":{"type":"string"},"error_hint":{"type":"string"},"format":{"type":"string"},"status_code":{"format":"int64","type":"integer"}},"title":"VerifiableCredentialPrimingResponse contains the nonce to include in the proof-of-possession JWT.","type":"object"},"verifiableCredentialResponse":{"properties":{"credential_draft_00":{"type":"string"},"format":{"type":"string"}},"title":"VerifiableCredentialResponse contains the verifiable credential.","type":"object"},"version":{"properties":{"version":{"description":"Version is the service's version.","type":"string"}},"type":"object"}},"securitySchemes":{"basic":{"scheme":"basic","type":"http"},"bearer":{"scheme":"bearer","type":"http"},"oauth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://hydra.demo.ory.sh/oauth2/auth","scopes":{"offline":"A scope required when requesting refresh tokens (alias for `offline_access`)","offline_access":"A scope required when requesting refresh tokens","openid":"Request an OpenID Connect ID Token"},"tokenUrl":"https://hydra.demo.ory.sh/oauth2/token"}},"type":"oauth2"}}},"info":{"contact":{"email":"hi@ory.sh"},"description":"Documentation for all of Ory Hydra's APIs.\n","license":{"name":"Apache 2.0"},"title":"Ory Hydra API","version":"v2.2.1"},"openapi":"3.0.3","paths":{"/.well-known/jwks.json":{"get":{"description":"This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,\nif enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like\n[node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.","operationId":"discoverJsonWebKeys","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Discover Well-Known JSON Web Keys","tags":["wellknown"]}},"/.well-known/openid-configuration":{"get":{"description":"A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.\n\nPopular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others.\nFor a full list of clients go here: https://openid.net/developers/certified/","operationId":"discoverOidcConfiguration","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oidcConfiguration"}}},"description":"oidcConfiguration"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"OpenID Connect Discovery","tags":["oidc"]}},"/admin/clients":{"get":{"description":"This endpoint lists all clients in the database, and never returns client secrets.\nAs a default it lists the first 100 clients.","operationId":"listOAuth2Clients","parameters":[{"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_size","schema":{"default":250,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_token","schema":{"default":"1","minimum":1,"type":"string"}},{"description":"The name of the clients to filter by.","in":"query","name":"client_name","schema":{"type":"string"}},{"description":"The owner of the clients to filter by.","in":"query","name":"owner","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listOAuth2Clients"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"List OAuth 2.0 Clients","tags":["oAuth2"]},"post":{"description":"Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret\nis generated. The secret is echoed in the response. It is not possible to retrieve it later on.","operationId":"createOAuth2Client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Create OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/clients/{id}":{"delete":{"description":"Delete an existing OAuth 2.0 Client by its ID.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.\n\nMake sure that this endpoint is well protected and only callable by first-party components.","operationId":"deleteOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Delete OAuth 2.0 Client","tags":["oAuth2"]},"get":{"description":"Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"getOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Get an OAuth 2.0 Client","tags":["oAuth2"]},"patch":{"description":"Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`\nthe secret will be updated and returned via the API. This is the\nonly time you will be able to retrieve the client secret, so write it down and keep it safe.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"patchOAuth2Client","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonPatchDocument"}}},"description":"OAuth 2.0 Client JSON Patch Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Patch OAuth 2.0 Client","tags":["oAuth2"]},"put":{"description":"Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used,\notherwise the existing secret is used.\n\nIf set, the secret is echoed in the response. It is not possible to retrieve it later on.\n\nOAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"setOAuth2Client","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Set OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/clients/{id}/lifespans":{"put":{"description":"Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.","operationId":"setOAuth2ClientLifespans","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ClientTokenLifespans"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Set OAuth2 Client Token Lifespans","tags":["oAuth2"]}},"/admin/keys/{set}":{"delete":{"description":"Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"deleteJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete JSON Web Key Set","tags":["jwk"]},"get":{"description":"This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"getJsonWebKeySet","parameters":[{"description":"JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Retrieve a JSON Web Key Set","tags":["jwk"]},"post":{"description":"This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"createJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createJsonWebKeySet"}}},"required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Create JSON Web Key","tags":["jwk"]},"put":{"description":"Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"setJsonWebKeySet","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Update a JSON Web Key Set","tags":["jwk"]}},"/admin/keys/{set}/{kid}":{"delete":{"description":"Use this endpoint to delete a single JSON Web Key.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A\nJWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses\nthis functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens),\nand allows storing user-defined keys as well.","operationId":"deleteJsonWebKey","parameters":[{"description":"The JSON Web Key Set","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"The JSON Web Key ID (kid)","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete JSON Web Key","tags":["jwk"]},"get":{"description":"This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).","operationId":"getJsonWebKey","parameters":[{"description":"JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"JSON Web Key ID","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKeySet"}}},"description":"jsonWebKeySet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get JSON Web Key","tags":["jwk"]},"put":{"description":"Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.","operationId":"setJsonWebKey","parameters":[{"description":"The JSON Web Key Set ID","in":"path","name":"set","required":true,"schema":{"type":"string"}},{"description":"JSON Web Key ID","in":"path","name":"kid","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKey"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonWebKey"}}},"description":"jsonWebKey"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Set JSON Web Key","tags":["jwk"]}},"/admin/oauth2/auth/requests/consent":{"get":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"getOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ConsentRequest"}}},"description":"oAuth2ConsentRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/consent/accept":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider includes additional information, such as session data for access and ID tokens, and if the\nconsent request should be used as basis for future requests.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"acceptOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/acceptOAuth2ConsentRequest"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/consent/reject":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider must include a reason why the consent was not granted.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.","operationId":"rejectOAuth2ConsentRequest","parameters":[{"description":"OAuth 2.0 Consent Request Challenge","in":"query","name":"consent_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectOAuth2Request"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Consent Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login":{"get":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nPer default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app\nyou write and host, and it must be able to authenticate (\"show the subject a login screen\")\na subject (in OAuth2 the proper name for subject is \"resource owner\").\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.","operationId":"getOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2LoginRequest"}}},"description":"oAuth2LoginRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login/accept":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has successfully authenticated and includes additional information such as\nthe subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting\na cookie.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.","operationId":"acceptOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/acceptOAuth2LoginRequest"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/login/reject":{"put":{"description":"When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication\nwas denied.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.","operationId":"rejectOAuth2LoginRequest","parameters":[{"description":"OAuth 2.0 Login Request Challenge","in":"query","name":"login_challenge","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectOAuth2Request"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Login Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout":{"get":{"description":"Use this endpoint to fetch an Ory OAuth 2.0 logout request.","operationId":"getOAuth2LogoutRequest","parameters":[{"in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2LogoutRequest"}}},"description":"oAuth2LogoutRequest"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Get OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout/accept":{"put":{"description":"When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.","operationId":"acceptOAuth2LogoutRequest","parameters":[{"description":"OAuth 2.0 Logout Request Challenge","in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2RedirectTo"}}},"description":"oAuth2RedirectTo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Accept OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/requests/logout/reject":{"put":{"description":"When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request.\nNo HTTP request body is required.\n\nThe response is empty as the logout provider has to chose what action to perform next.","operationId":"rejectOAuth2LogoutRequest","parameters":[{"in":"query","name":"logout_challenge","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Reject OAuth 2.0 Session Logout Request","tags":["oAuth2"]}},"/admin/oauth2/auth/sessions/consent":{"delete":{"description":"This endpoint revokes a subject's granted consent sessions and invalidates all\nassociated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.","operationId":"revokeOAuth2ConsentSessions","parameters":[{"description":"OAuth 2.0 Consent Subject\n\nThe subject whose consent sessions should be deleted.","in":"query","name":"subject","required":true,"schema":{"type":"string"}},{"description":"OAuth 2.0 Client ID\n\nIf set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.","in":"query","name":"client","schema":{"type":"string"}},{"description":"Revoke All Consent Sessions\n\nIf set to `true` deletes all consent sessions by the Subject that have been granted.","in":"query","name":"all","schema":{"type":"boolean"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Revoke OAuth 2.0 Consent Sessions of a Subject","tags":["oAuth2"]},"get":{"description":"This endpoint lists all subject's granted consent sessions, including client and granted scope.\nIf the subject is unknown or has not granted any consent sessions yet, the endpoint returns an\nempty JSON array with status code 200 OK.","operationId":"listOAuth2ConsentSessions","parameters":[{"description":"Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_size","schema":{"default":250,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).","in":"query","name":"page_token","schema":{"default":"1","minimum":1,"type":"string"}},{"description":"The subject to list the consent sessions for.","in":"query","name":"subject","required":true,"schema":{"type":"string"}},{"description":"The login session id to list the consent sessions for.","in":"query","name":"login_session_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2ConsentSessions"}}},"description":"oAuth2ConsentSessions"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"List OAuth 2.0 Consent Sessions of a Subject","tags":["oAuth2"]}},"/admin/oauth2/auth/sessions/login":{"delete":{"description":"This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf you send the subject in a query param, all authentication sessions that belong to that subject are revoked.\nNo OpenID Connect Front- or Back-channel logout is performed in this case.\n\nAlternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected\nto that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.","operationId":"revokeOAuth2LoginSessions","parameters":[{"description":"OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.","in":"query","name":"subject","schema":{"type":"string"}},{"description":"OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.","in":"query","name":"sid","schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID","tags":["oAuth2"]}},"/admin/oauth2/introspect":{"post":{"description":"The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token\nis neither expired nor revoked. If a token is active, additional information on the token will be included. You can\nset additional data for a token by setting `session.access_token` during the consent flow.","operationId":"introspectOAuth2Token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"scope":{"description":"An optional, space separated list of required scopes. If the access token was not granted one of the\nscopes, the result of active will be false.","type":"string","x-formData-name":"scope"},"token":{"description":"The string value of the token. For access tokens, this\nis the \"access_token\" value returned from the token endpoint\ndefined in OAuth 2.0. For refresh tokens, this is the \"refresh_token\"\nvalue returned.","required":["token"],"type":"string","x-formData-name":"token"}},"required":["token"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/introspectedOAuth2Token"}}},"description":"introspectedOAuth2Token"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Introspect OAuth2 Access and Refresh Tokens","tags":["oAuth2"]}},"/admin/oauth2/tokens":{"delete":{"description":"This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.","operationId":"deleteOAuth2Token","parameters":[{"description":"OAuth 2.0 Client ID","in":"query","name":"client_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client","tags":["oAuth2"]}},"/admin/trust/grants/jwt-bearer/issuers":{"get":{"description":"Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.","operationId":"listTrustedOAuth2JwtGrantIssuers","parameters":[{"in":"query","name":"MaxItems","schema":{"format":"int64","type":"integer"}},{"in":"query","name":"DefaultItems","schema":{"format":"int64","type":"integer"}},{"description":"If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.","in":"query","name":"issuer","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuers"}}},"description":"trustedOAuth2JwtGrantIssuers"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"List Trusted OAuth2 JWT Bearer Grant Type Issuers","tags":["oAuth2"]},"post":{"description":"Use this endpoint to establish a trust relationship for a JWT issuer\nto perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication\nand Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).","operationId":"trustOAuth2JwtGrantIssuer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustOAuth2JwtGrantIssuer"}}},"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"}}},"description":"trustedOAuth2JwtGrantIssuer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Trust OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]}},"/admin/trust/grants/jwt-bearer/issuers/{id}":{"delete":{"description":"Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.\n\nOnce deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile\nfor OAuth 2.0 Client Authentication and Authorization Grant.","operationId":"deleteTrustedOAuth2JwtGrantIssuer","parameters":[{"description":"The id of the desired grant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Delete Trusted OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]},"get":{"description":"Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.","operationId":"getTrustedOAuth2JwtGrantIssuer","parameters":[{"description":"The id of the desired grant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/trustedOAuth2JwtGrantIssuer"}}},"description":"trustedOAuth2JwtGrantIssuer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Get Trusted OAuth2 JWT Bearer Grant Type Issuer","tags":["oAuth2"]}},"/credentials":{"post":{"description":"This endpoint creates a verifiable credential that attests that the user\nauthenticated with the provided access token owns a certain public/private key\npair.\n\nMore information can be found at\nhttps://openid.net/specs/openid-connect-userinfo-vc-1_0.html.","operationId":"createVerifiableCredential","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVerifiableCredentialRequestBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/verifiableCredentialResponse"}}},"description":"verifiableCredentialResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/verifiableCredentialPrimingResponse"}}},"description":"verifiableCredentialPrimingResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Issues a Verifiable Credential","tags":["oidc"]}},"/health/alive":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.","operationId":"isAlive","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/healthStatus"}}},"description":"Ory Hydra is ready to accept connections."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Check HTTP Server Status","tags":["metadata"]}},"/health/ready":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Hydra, the health status will never\nrefer to the cluster state, only to a single instance.","operationId":"isReady","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"Always \"ok\".","type":"string"}},"type":"object"}}},"description":"Ory Hydra is ready to accept requests."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"type":"object"}}},"description":"Ory Kratos is not yet ready to accept requests."}},"summary":"Check HTTP Server and Database Status","tags":["metadata"]}},"/oauth2/auth":{"get":{"description":"Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries at https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.","operationId":"oAuth2Authorize","responses":{"302":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"OAuth 2.0 Authorize Endpoint","tags":["oAuth2"]}},"/oauth2/register":{"post":{"description":"This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nPlease note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those\nvalues will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or\n`client_secret_post`.\n\nThe `client_secret` will be returned in the response and you will not be able to retrieve it later on.\nWrite the secret down and keep it somewhere safe.","operationId":"createOidcDynamicClient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"Dynamic Client Registration Request Body","required":true,"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"400":{"$ref":"#/components/responses/errorOAuth2BadRequest"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"summary":"Register OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]}},"/oauth2/register/{id}":{"delete":{"description":"This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"deleteOidcDynamicClient","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"security":[{"bearer":[]}],"summary":"Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol","tags":["oidc"]},"get":{"description":"This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.","operationId":"getOidcDynamicClient","parameters":[{"description":"The id of the OAuth 2.0 Client.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"security":[{"bearer":[]}],"summary":"Get OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]},"put":{"description":"This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the\npublic internet directly to be used by third parties. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nThis feature is disabled per default. It can be enabled by a system administrator.\n\nIf you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response.\nIt is not possible to retrieve it later on.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.","operationId":"setOidcDynamicClient","parameters":[{"description":"OAuth 2.0 Client ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"OAuth 2.0 Client Request Body","required":true,"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2Client"}}},"description":"oAuth2Client"},"404":{"$ref":"#/components/responses/errorOAuth2NotFound"},"default":{"$ref":"#/components/responses/errorOAuth2Default"}},"security":[{"bearer":[]}],"summary":"Set OAuth2 Client using OpenID Dynamic Client Registration","tags":["oidc"]}},"/oauth2/revoke":{"post":{"description":"Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by\nthe client the token was generated for.","operationId":"revokeOAuth2Token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"type":"string","x-formData-name":"client_id"},"client_secret":{"type":"string","x-formData-name":"client_secret"},"token":{"required":["token"],"type":"string","x-formData-name":"token"}},"required":["token"],"type":"object"}}}},"responses":{"200":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"basic":[]},{"oauth2":[]}],"summary":"Revoke OAuth 2.0 Access or Refresh Token","tags":["oAuth2"]}},"/oauth2/sessions/logout":{"get":{"description":"This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:\n\nhttps://openid.net/specs/openid-connect-frontchannel-1_0.html\nhttps://openid.net/specs/openid-connect-backchannel-1_0.html\n\nBack-channel logout is performed asynchronously and does not affect logout flow.","operationId":"revokeOidcSession","responses":{"302":{"$ref":"#/components/responses/emptyResponse"}},"summary":"OpenID Connect Front- and Back-channel Enabled Logout","tags":["oidc"]}},"/oauth2/token":{"post":{"description":"Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries here https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.","operationId":"oauth2TokenExchange","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"type":"string","x-formData-name":"client_id"},"code":{"type":"string","x-formData-name":"code"},"grant_type":{"required":["grant_type"],"type":"string","x-formData-name":"grant_type"},"redirect_uri":{"type":"string","x-formData-name":"redirect_uri"},"refresh_token":{"type":"string","x-formData-name":"refresh_token"}},"required":["grant_type"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oAuth2TokenExchange"}}},"description":"oAuth2TokenExchange"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"basic":[]},{"oauth2":[]}],"summary":"The OAuth 2.0 Token Endpoint","tags":["oAuth2"]}},"/userinfo":{"get":{"description":"This endpoint returns the payload of the ID Token, including `session.id_token` values, of\nthe provided OAuth 2.0 Access Token's consent request.\n\nIn the case of authentication error, a WWW-Authenticate header might be set in the response\nwith more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)\nfor more details about header format.","operationId":"getOidcUserInfo","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/oidcUserInfo"}}},"description":"oidcUserInfo"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"security":[{"oauth2":[]}],"summary":"OpenID Connect Userinfo","tags":["oidc"]}},"/version":{"get":{"description":"This endpoint returns the version of Ory Hydra.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the version will never\nrefer to the cluster state, only to a single instance.","operationId":"getVersion","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"version":{"description":"The version of Ory Hydra.","type":"string"}},"type":"object"}}},"description":"Returns the Ory Hydra version."}},"summary":"Return Running Software Version.","tags":["metadata"]}}},"tags":[{"description":"OAuth 2.0","name":"oAuth2"},{"description":"OpenID Connect","name":"oidc"},{"description":"JSON Web Keys","name":"jwk"},{"description":"Well-Known Endpoints","name":"wellknown"},{"description":"Service Metadata","name":"metadata"}],"x-forwarded-proto":"string","x-request-id":"string"}